Sonar violation to show Java files without license/copyright information?
-
12-06-2021 - |
Question
Is there a Sonar plugin available, which is able to identify Java files without a license/copyright header?
Solution
you just have to activate one of the following rules on your Java quality profile, and the files w/o a header will have a violation after the next analysis:
- "Header" (Checkstyle: com.puppycrawl.tools.checkstyle.checks.header.HeaderCheck)
- "Regexp Header" (Checkstyle: com.puppycrawl.tools.checkstyle.checks.header.RegexpHeaderCheck)
See them on Nemo for instance.
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow