Skip to content

Commit

Permalink
Add a comment for elp lint filtering
Browse files Browse the repository at this point in the history
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
  • Loading branch information
alanz authored and facebook-github-bot committed Aug 22, 2024
1 parent 61700b1 commit 93525f7
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions crates/elp/src/bin/lint_cli.rs
Original file line number Diff line number Diff line change
Expand Up @@ -362,6 +362,11 @@ fn filter_diagnostics<'a>(
diags: &'a [(String, FileId, DiagnosticCollection)],
changed_forms: &FxHashSet<InFile<FormIdx>>,
) -> Result<Vec<(String, FileId, Vec<diagnostics::Diagnostic>)>> {
// 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()
Expand Down

0 comments on commit 93525f7

Please sign in to comment.