FFFF moss/cli: Add more expectation management aliases by ermo · Pull Request #912 · aerynOS/os-tools · GitHub
[go: up one dir, main page]

Skip to content
10000
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 11 additions & 4 deletions moss/src/cli.rs
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@
#[derive(Debug, Error)]
pub enum Error {
#[error("cache")]
Cache(#[from] cache::Error),

Check failure on line 47 in moss/src/cli.rs

View workflow job for this annotation

GitHub Actions / Build & Test Project

[clippy] reported by reviewdog 🐶 error: the `Err`-variant returned from this function is very large --> moss/src/cli/inspect.rs:178:59 | 178 | fn check_stone_integrity(mut source: impl Read + Seek) -> Result<Vec<String>, Error> { | ^^^^^^^^^^^^^^^^^^^^^^^^^^ | ::: moss/src/cli.rs:47:5 | 47 | Cache(#[from] cache::Error), | --------------------------- the largest variant contains at least 128 bytes ... 62 | Package(#[from] pkg::Error), | --------------------------- the variant `Package` contains at least 128 bytes | = help: try reducing the size of `cli::Error`, for example by boxing large elements or replacing it with `Box<cli::Error>` = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.94.0/index.html#result_large_err Raw Output: moss/src/cli.rs:47:5:e:error: the `Err`-variant returned from this function is very large --> moss/src/cli/inspect.rs:178:59 | 178 | fn check_stone_integrity(mut source: impl Read + Seek) -> Result<Vec<String>, Error> { | ^^^^^^^^^^^^^^^^^^^^^^^^^^ | ::: moss/src/cli.rs:47:5 | 47 | Cache(#[from] cache::Error), | --------------------------- the largest variant contains at least 128 bytes ... 62 | Package(#[from] pkg::Error), | --------------------------- the variant `Package` contains at least 128 bytes | = help: try reducing the size of `cli::Error`, for example by boxing large elements or replacing it with `Box<cli::Error>` = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.94.0/index.html#result_large_err __END__

Check failure on line 47 in moss/src/cli.rs

View workflow job for this annotation

GitHub Actions / Build & Test Project

[clippy] reported by reviewdog 🐶 error: the `Err`-variant returned from this function is very large --> moss/src/cli/inspect.rs:75:44 | 75 | fn handle_detailed(paths: Vec<PathBuf>) -> Result<(), Error> { | ^^^^^^^^^^^^^^^^^ | ::: moss/src/cli.rs:47:5 | 47 | Cache(#[from] cache::Error), | --------------------------- the largest variant contains at least 128 bytes ... 62 | Package(#[from] pkg::Error), | --------------------------- the variant `Package` contains at least 128 bytes | = help: try reducing the size of `cli::Error`, for example by boxing large elements or replacing it with `Box<cli::Error>` = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.94.0/index.html#result_large_err Raw Output: moss/src/cli.rs:47:5:e:error: the `Err`-variant returned from this function is very large --> moss/src/cli/inspect.rs:75:44 | 75 | fn handle_detailed(paths: Vec<PathBuf>) -> Result<(), Error> { | ^^^^^^^^^^^^^^^^^ | ::: moss/src/cli.rs:47:5 | 47 | Cache(#[from] cache::Error), | --------------------------- the largest variant contains at least 128 bytes ... 62 | Package(#[from] pkg::Error), | --------------------------- the variant `Package` contains at least 128 bytes | = help: try reducing the size of `cli::Error`, for example by boxing large elements or replacing it with `Box<cli::Error>` = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.94.0/index.html#result_large_err __END__

Check failure on line 47 in moss/src/cli.rs

View workflow job for this annotation

GitHub Actions / Build & Test Project

[clippy] reported by reviewdog 🐶 error: the `Err`-variant returned from this function is very large --> moss/src/cli/inspect.rs:43:54 | 43 | fn handle_check(paths: Vec<PathBuf>, quiet: bool) -> Result<(), Error> { | ^^^^^^^^^^^^^^^^^ | ::: moss/src/cli.rs:47:5 | 47 | Cache(#[from] cache::Error), | --------------------------- the largest variant contains at least 128 bytes ... 62 | Package(#[from] pkg::Error), | --------------------------- the variant `Package` contains at least 128 bytes | = help: try reducing the size of `cli::Error`, for example by boxing large elements or replacing it with `Box<cli::Error>` = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.94.0/index.html#result_large_err Raw Output: moss/src/cli.rs:47:5:e:error: the `Err`-variant returned from this function is very large --> moss/src/cli/inspect.rs:43:54 | 43 | fn handle_check(paths: Vec<PathBuf>, quiet: bool) -> Result<(), Error> { | ^^^^^^^^^^^^^^^^^ | ::: moss/src/cli.rs:47:5 | 47 | Cache(#[from] cache::Error), | --------------------------- the largest variant contains at least 128 bytes ... 62 | Package(#[from] pkg::Error), | --------------------------- the variant `Package` contains at least 128 bytes | = help: try reducing the size of `cli::Error`, for example by boxing large elements or replacing it with `Box<cli::Error>` = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.94.0/index.html#result_large_err __END__

Check failure on line 47 in moss/src/cli.rs

View workflow job for this annotation

GitHub Actions / Build & Test Project

[clippy] reported by reviewdog 🐶 error: the `Err`-variant returned from this function is very large --> moss/src/cli/inspect.rs:32:28 | 32 | pub fn handle(self) -> Result<(), Error> { | ^^^^^^^^^^^^^^^^^ | ::: moss/src/cli.rs:47:5 | 47 | Cache(#[from] cache::Error), | --------------------------- the largest variant contains at least 128 bytes ... 62 | Package(#[from] pkg::Error), | --------------------------- the variant `Package` contains at least 128 bytes | = help: try reducing the size of `cli::Error`, for example by boxing large elements or replacing it with `Box<cli::Error>` = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.94.0/index.html#result_large_err = note: `-D clippy::result-large-err` implied by `-D warnings` = help: to override `-D warnings` add `#[allow(clippy::result_large_err)]` Raw Output: moss/src/cli.rs:47:5:e:error: the `Err`-variant returned from this function is very large --> moss/src/cli/inspect.rs:32:28 | 32 | pub fn handle(self) -> Result<(), Error> { | ^^^^^^^^^^^^^^^^^ | ::: moss/src/cli.rs:47:5 | 47 | Cache(#[from] cache::Error), | --------------------------- the largest variant contains at least 128 bytes ... 62 | Package(#[from] pkg::Error), | --------------------------- the variant `Package` contains at least 128 bytes | = help: try reducing the size of `cli::Error`, for example by boxing large elements or replacing it with `Box<cli::Error>` = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.94.0/index.html#result_large_err = note: `-D clippy::result-large-err` implied by `-D warnings` = help: to override `-D warnings` add `#[allow(clippy::result_large_err)]` __END__

#[error(transparent)]
Client(#[from] client::Error),
Expand Down Expand Up @@ -225,8 +225,11 @@
// Ideally we would sort this list at compile time,
// but there's no such feature at the moment.
const ALIASES: &[(&str, &[&str])] = &[
("install", &["pkg", "add", "-h"]), // expectation management alias
("it", &["pkg", "add", "-h"]), // - ditto -
("info", &["pkg", "info", "-h"]),
("install", &["pkg", "add", "-h"]),
("it", &["pkg", "add", "-h"]),
("li", &["pkg", "list", "-h"]),
("list", &["pkg", "list", "-h"]),
("pad", &["pkg", "add"]),
("pex", &["pkg", "extract"]),
("pfe", &["pkg", "fetch"]),
Expand All @@ -238,10 +241,10 @@
("prm", &["pkg", "remove"]),
("rad", &["repo", "add"]),
("rdi", &["repo", "disable"]),
("remove", &["pkg", "remove", "-h"]), // expectation management alias
("remove", &["pkg", "remove", "-h"]),
("ren", &["repo", "enable"]),
("rls", &["repo", "list"]),
("rm", &["pkg", "remove", "-h"]), // expectation management alias
("rm", &["pkg", "remove", "-h"]),
("rrm", &["repo", "remove"]),
("rup", &["repo", "update"]),
("sr", &["search"]), // The least bad option (still not good)
Expand All @@ -254,6 +257,10 @@
("str", &["state", "remove"]),
("sts", &["state", "search"]),
("stv", &["state", "verify"]),
("sy", &["sync", "-h"]),
("up", &["sync", "-h"]),
("update", &["sync", "-h"]),
("upgrade", &["sync", "-h"]),
];
}

Expand Down
Loading
0