Can I disable somehow Checkstyle warning?
Missing package-info.java file.
My IDE is IntelliJ IDEA.
package-info. java is a way to apply java annotations at the package level. In this case Jaxb is using package-level annotations to indicate the namespace, and to specify namespace qualification for attributes (source).
The package-info. java is a Java file that can be added to any Java source package. Its purpose is to provide a home for package level documentation and package level annotations. Simply create the package-info. java file and add the package declaration that it relates to in the file.
Configuring Checkstyle-IDEA Install the Checkstyle-IDEA plugin by going to File > Settings (Windows/Linux), or IntelliJ IDEA > Preferences… (macOS). Select Plugins , press Browse Repository , and find the plugin. Restart the IDE to complete the installation.
If you haven't configured anything yet, and you are using IntelliJ, this means you are using the Sun checks configuration. You may not like this answer, but don't shoot the messenger ...
<module name="JavadocPackage">...</module>
from the XML.There is currently (as of Checkstyle 7.1.1) no other way to disable a rule from the standard configuration.
If you just want to suppress a single violation, or a group of violations, you may also consider the many suppression configuration options. In order to suppress one rule entirely, you would still have to change the XML, so the above method is better.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With