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

有帮助吗?

解决方案

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.

许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top