diff options
| author | 魏曹先生 <1992414357@qq.com> | 2026-08-04 20:33:11 +0800 |
|---|---|---|
| committer | 魏曹先生 <1992414357@qq.com> | 2026-08-07 16:57:24 +0800 |
| commit | 4d50904f282f68bca6d0c1facdbd4776a9ca41a0 (patch) | |
| tree | c7a58e4fe7f3063d5eaa12a0fa8d55ac36bd5905 /mingling_cli/src/linter.rs | |
| parent | 59bded599b57dc710cb04e8b1e5decef7d3f970f (diff) | |
docs: add help text for CLI commands and descriptions
Add help text for global flags, commands, and subcommands in
help.txt. Add metadata descriptions for linter and metadata
commands.
Diffstat (limited to 'mingling_cli/src/linter.rs')
| -rw-r--r-- | mingling_cli/src/linter.rs | 24 |
1 files changed, 23 insertions, 1 deletions
diff --git a/mingling_cli/src/linter.rs b/mingling_cli/src/linter.rs index 8be45c8..3182b4a 100644 --- a/mingling_cli/src/linter.rs +++ b/mingling_cli/src/linter.rs @@ -1,4 +1,7 @@ -use mingling::macros::{chain, dispatcher, entry}; +use mingling::{ + macros::{chain, dispatcher, entry, metadata}, + metadata::Description, +}; use crate::{linter::cmd_mlint::EntryLint, metadata::setup::ResUsingJson}; @@ -43,3 +46,22 @@ pub fn handle_ra_lint_clippy( use_json.using = true; entry!("--message-format=json", "--with-checker=cargo,clippy") } + +#[metadata(EntryLinterSupportRustAnalyzer)] +pub fn desc_ra_lint() -> Description { + "Run `mling lint` and output the results".to_string().into() +} + +#[metadata(EntryLinterSupportRustAnalyzerWithCheck)] +pub fn desc_ra_lint_check() -> Description { + "Run `mling lint` and `cargo check`, and output the combined results" + .to_string() + .into() +} + +#[metadata(EntryLinterSupportRustAnalyzerWithClippy)] +pub fn desc_ra_lint_clippy() -> Description { + "Run `mling lint` and `cargo clippy`, and output the combined results" + .to_string() + .into() +} |
