Code Quality: let teams exclude individual rules, and dismiss findings through the API #214079
Replies: 2 comments 1 reply
|
💬 Your Product Feedback Has Been Submitted 🎉 Thank you for taking the time to share your insights with us! Your feedback is invaluable as we build a better GitHub experience for all our users. Here's what you can expect moving forward ⏩
Where to look to see what's shipping 👀
What you can do in the meantime 💻
As a member of the GitHub community, your participation is essential. While we can't promise that every suggestion will be implemented, we want to emphasize that your feedback is instrumental in guiding our decisions and priorities. Thank you once again for your contribution to making GitHub even better! We're grateful for your ongoing support and collaboration in shaping the future of our platform. ⭐ |
|
You're describing three separate gaps, and I'd file them separately. There isn't a per-rule exclusion mechanism for Code Quality comparable to CodeQL's For the findings that do arrive, there's a REST surface for Code Quality now ( The "moved code counts as new" behaviour is the one I'd push hardest on. A pure file move producing six blocking comments is a workflow bug, not a quality signal. If your branch rule requires every conversation resolved, you end up rubber-stamping findings, which trains people to ignore them. I'd ask for: rule filters in a checked-in config, API dismissal, and move-aware diffing. Three small requests beat one giant one. |
Uh oh!
There was an error while loading. Please reload this page.
🏷️ Discussion Type
Product Feedback
💬 Feature/Topic Area
Code quality
Discussion Details
We've enabled GitHub Code Quality across our organisation, and it's been catching real issues. One gap makes it a chore on PRs, though: there's no way to switch off a rule that conflicts with a deliberate team convention.
The problem
Our C# style deliberately uses
if (x == false)rather thanif (!x), because!is visually easy to miss next to an opening parenthesis, either for people with accessibility needs like visual problems and dyslexia. We find The Unnecessarily complex Boolean expression query (cs/simplifiable-boolean-expression, severity Recommendation) flags every one of these.Other analyzers flag the same pattern, but each lets us switch it off: SonarAnalyzer's S1125 with
dotnet_diagnostic.S1125.severity = none, Microsoft's IDE0100 withdotnet_diagnostic.IDE0100.severity = none, and the ReSharper/RiderRedundantBoolCompareinspection withresharper_redundant_bool_compare_highlighting = none, all from.editorconfig.As far as we can tell from the docs:
query-filtersin a config file. Code Quality has no equivalent.What would help
query-filters) or a setting, with an org-level default that repos can inherit.All reactions