In our project, we have a global rule for cognitive complexity (specifically, max-depth) that works well for production code. However, we often need to go deeper in test files (e.g. due to nested describe and it), and the current rule flags these cases unnecessarily.
Unfortunately, SonarQube doesn’t allow us to override rules conditionally based on the file path. It only allows us to disable the rule for specific paths or increase the number globally.
It would be very helpful if SonarQube allowed per-path or pattern-based rule overrides — similar to how ESLint allows rule configuration based on glob patterns (e.g. different rules for **/*.test.js files).
Is this kind of enhancement on the roadmap, or would the team consider supporting it?