Skip to content

Commit

Permalink
Merge pull request #73933 from GiovanniBraconi/patch-1
Browse files Browse the repository at this point in the history
Fix typos in DiagnosticSuppressorDesign.md
  • Loading branch information
CyrusNajmabadi authored Jun 11, 2024
2 parents 4f6cdc3 + a91d770 commit b4dc2a1
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions docs/analyzers/DiagnosticSuppressorDesign.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ An analyzer/compiler diagnostic would be considered a candidate for programmatic
1. Declaratively provide all the analyzer and/or compiler diagnostic IDs that can be suppressed by it.
2. For each such suppressible diagnostic ID, provide a unique suppression ID and justification. These are required to enable proper diagnosis and configuration of each suppression (covered in detail [later](https://gist.github.com/mavasani/fcac17a9581b5c54cef8a689eeec954a#example-experience-with-screenshots)).
3. Register callbacks for reported analyzer and/or compiler diagnostics with these suppressible diagnostic IDs. The callback can analyze the syntax and/or semantics of the diagnostic location and report a suppression for it.
4. DiagnosticSuppressors would *not* be able to register any another analysis callbacks, and hence cannot report any new diagnostics.
4. DiagnosticSuppressors would *not* be able to register any other analysis callbacks, and hence cannot report any new diagnostics.
2. _For end users:_
1. Seamless development experience when targeting such a platform/library, whereby the users do not see false positives from analyzers/compiler in their development context.
2. End users do not need to manually add and/or maintain source suppressions through pragmas/SuppressMessageAttributes for such context-specific false positives.
Expand All @@ -26,7 +26,7 @@ An analyzer/compiler diagnostic would be considered a candidate for programmatic
2. Configuration: Each diagnostic suppression has an associated suppression ID. This is clearly indicated in the logged "Info" diagnostics for suppressions, and the end users can disable the bucket of suppressions under any specific suppression ID with simple command line argument or ruleset entries.
3. _For analyzer driver:_
1. Order of execution between analyzers/compiler and suppressors: For command line builds, all diagnostic suppressors will run **after** all the analyzer and compiler diagnostics have been computed. For live analysis in Visual Studio, diagnostic suppressors may be invoked with a subset of the full set of reported diagnostics, as an optimization for supporting incremental and partial analysis scenarios.
2. Order of execution between individual suppressors: Execution of diagnostic suppressors would be independent of other suppressors. Diagnostic suppressions reported by one suppressor would not affect the input set of reported diagnostics passed to any other suppressor. Each diagnostic might be programmatically suppressed by more then one suppressor, so the analyzer driver will union all the reported suppressions for each diagnostic. Command line compiler will log one suppression diagnostic per-suppression for each programmatically suppressed diagnostic.
2. Order of execution between individual suppressors: Execution of diagnostic suppressors would be independent of other suppressors. Diagnostic suppressions reported by one suppressor would not affect the input set of reported diagnostics passed to any other suppressor. Each diagnostic might be programmatically suppressed by more than one suppressor, so the analyzer driver will union all the reported suppressions for each diagnostic. Command line compiler will log one suppression diagnostic per-suppression for each programmatically suppressed diagnostic.

# Development Experience Example

Expand Down

0 comments on commit b4dc2a1

Please sign in to comment.