From 93525f783b1066d1239be953aafd67432da5bd25 Mon Sep 17 00:00:00 2001 From: Alan Zimmerman Date: Thu, 22 Aug 2024 08:47:54 -0700 Subject: [PATCH] Add a comment for elp lint filtering Summary: Add a clarification comment to elp lint about when exactly the enabled/disabled lints from config are used. Reviewed By: robertoaloi Differential Revision: D61649402 fbshipit-source-id: 1fae823a30605e9c301c34e6a7624021421aeaa9 --- crates/elp/src/bin/lint_cli.rs | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/crates/elp/src/bin/lint_cli.rs b/crates/elp/src/bin/lint_cli.rs index 75ec3fc42..13e46a181 100644 --- a/crates/elp/src/bin/lint_cli.rs +++ b/crates/elp/src/bin/lint_cli.rs @@ -362,6 +362,11 @@ fn filter_diagnostics<'a>( diags: &'a [(String, FileId, DiagnosticCollection)], changed_forms: &FxHashSet>, ) -> Result)>> { + // The initial set of diagnostics is filtered with a `Some` value + // for allowed_diagnostics. Thereafter, during the simplification + // stage, it is called with `None`. This means + // `Category::SimplificationRule` is always enabled for that + // usage. Ok(diags .to_owned() .into_iter()