Question

Is there a Sonar plugin available, which is able to identify Java files without a license/copyright header?

Was it helpful?

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
scroll top