aboutsummaryrefslogtreecommitdiff
path: root/mingling_cli/src/linter.rs
diff options
context:
space:
mode:
Diffstat (limited to 'mingling_cli/src/linter.rs')
-rw-r--r--mingling_cli/src/linter.rs18
1 files changed, 10 insertions, 8 deletions
diff --git a/mingling_cli/src/linter.rs b/mingling_cli/src/linter.rs
index c85afc1..5d20900 100644
--- a/mingling_cli/src/linter.rs
+++ b/mingling_cli/src/linter.rs
@@ -4,11 +4,15 @@ use mingling::{
};
use crate::{
- linter::cmd_mlint::{CMDMinglingLinter, EntryMinglingLinter},
+ linter::{
+ cmd_mlint::{CMDLint, EntryLint},
+ cmd_mlint_install::CMDLintInstall,
+ },
metadata::setup::ResUsingJson,
};
pub mod cmd_mlint;
+pub mod cmd_mlint_install;
pub mod mlint_attr;
pub mod mlint_report;
@@ -19,7 +23,8 @@ pub fn mingling_linter_setup(program: &mut Program<crate::ThisProgram>) {
#[program_setup]
pub fn mingling_linter_command_setup(program: &mut Program<crate::ThisProgram>) {
- program.with_dispatcher(CMDMinglingLinter);
+ program.with_dispatcher(CMDLint);
+ program.with_dispatcher(CMDLintInstall);
program.with_dispatcher(CMDLinterSupportRustAnalyzer);
program.with_dispatcher(CMDLinterSupportRustAnalyzerWithClippy);
program.with_dispatcher(CMDLinterSupportRustAnalyzerWithCheck);
@@ -40,10 +45,7 @@ dispatcher!("ra-lint",
);
#[chain]
-pub fn handle_ra_lint(
- _: EntryLinterSupportRustAnalyzer,
- use_json: &mut ResUsingJson,
-) -> EntryMinglingLinter {
+pub fn handle_ra_lint(_: EntryLinterSupportRustAnalyzer, use_json: &mut ResUsingJson) -> EntryLint {
use_json.using = true;
entry!("--message-format=json")
}
@@ -52,7 +54,7 @@ pub fn handle_ra_lint(
pub fn handle_ra_lint_check(
_: EntryLinterSupportRustAnalyzerWithCheck,
use_json: &mut ResUsingJson,
-) -> EntryMinglingLinter {
+) -> EntryLint {
use_json.using = true;
entry!("--message-format=json", "--with-checker=cargo,check")
}
@@ -61,7 +63,7 @@ pub fn handle_ra_lint_check(
pub fn handle_ra_lint_clippy(
_: EntryLinterSupportRustAnalyzerWithClippy,
use_json: &mut ResUsingJson,
-) -> EntryMinglingLinter {
+) -> EntryLint {
use_json.using = true;
entry!("--message-format=json", "--with-checker=cargo,clippy")
}