In my Flutter project, local variables are intentionally marked as final
to ensure immutability, and single quotes are used for package imports according to our coding standards. However, SonarQube is flagging these as issues:
- Local Variables Should Not Be
final
: SonarQube raises unnecessary issues on local variables marked asfinal
, which is crucial to our project structure. - Single Quotes in Imports: It flags single quotes in imports, although they are consistent with our project style.
Questions:
- Can these rules be disabled or ignored in SonarQube while maintaining other linting checks?
- What is the best way to update our
analysis_options.yaml
or SonarQube configuration to prevent these false positives without altering our project structure?
Impact:
These rules generate numerous false positives, making it harder to focus on genuine issues.