Is it possible to Suppress Warnings in properties file? Warnings are generated by SonarQube Java Properties Plugin.
Warning key *jproperties:** is (for example jproperties:key-naming-convention)
I tried to add comment with
#@SuppressWarnings("jproperties:key-naming-convention")
Before offending line but it does not work.
I know I could do one of
- disable those rules in my quality profile
- suppress warning in Sonar Web UI
I do not want solution 1) because it will ignore rule for all files, not just for single place.
I do not like solution 2) because I have separate sonar project for each branch (master, develop, feature branches) and separate project for each developer (for ad-hoc analysis). I do not want to suppress warnings in webUI for each project separately, I prefer to suppress warnings once-in source code.
It is not possible and there's no plan to add such a feature. The only thing that you might want to do is to exclude this rule for this very specific file by setting exclusions: http://docs.sonarqube.org/display/SONAR/Narrowing+the+Focus#NarrowingtheFocus-IgnoreIssues (Ignore Issues on Multiple Criteria criterion)