use mingling::macros::{chain, dispatcher, entry}; use crate::{linter::cmd_mlint::EntryLint, metadata::setup::ResUsingJson}; pub mod cmd_mlint; pub mod mlint_attr; pub mod mlint_report; // Aliases dispatcher!("ra-lint-clippy", CMDLinterSupportRustAnalyzerWithClippy => EntryLinterSupportRustAnalyzerWithClippy ); dispatcher!("ra-lint-check", CMDLinterSupportRustAnalyzerWithCheck => EntryLinterSupportRustAnalyzerWithCheck ); dispatcher!("ra-lint", CMDLinterSupportRustAnalyzer => EntryLinterSupportRustAnalyzer ); #[chain] pub fn handle_ra_lint(_: EntryLinterSupportRustAnalyzer, use_json: &mut ResUsingJson) -> EntryLint { use_json.using = true; entry!("--message-format=json") } #[chain] pub fn handle_ra_lint_check( _: EntryLinterSupportRustAnalyzerWithCheck, use_json: &mut ResUsingJson, ) -> EntryLint { use_json.using = true; entry!("--message-format=json", "--with-checker=cargo,check") } #[chain] pub fn handle_ra_lint_clippy( _: EntryLinterSupportRustAnalyzerWithClippy, use_json: &mut ResUsingJson, ) -> EntryLint { use_json.using = true; entry!("--message-format=json", "--with-checker=cargo,clippy") }