Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to remove default checkstyle in eclipse?

I have a custom checkstyle.xml imported and set as the default. It works great. I just upgraded to the newest version of checkstyle and now I have a warning on just about every line of code. It looks like the warnings are coming from the two build in checkstyle xml's but they are not removable!

How can I disable these two checkstyle rule files so they stop bothering me?

like image 625
Cameron McBride Avatar asked Nov 03 '22 01:11

Cameron McBride


1 Answers

The built-in configurations are not removable and cannot be changed or edited. Instead, people are supposed to create their own configurations, which is just what you did.

There are a few things you can try:

  • Make sure that your upgrade of the Checkstyle Eclipse plugin was performed correctly. Stop Eclipse. Check the plugins and features folders for contained folders called edu.umd.cs.findbugs.plugin.eclipse_version. There should only be one such folder in plugins and one in features, both with the same version number. If there are more, delete the ones with the older version numbers. Restart Eclipse with the -clean option as first argument.

  • Make sure that your custom Checkstyle configuration is still the default after the plugin upgrade.

  • Check the Eclipse projects in your workspace and make sure that they do not have project-specific settings for Checkstyle. Right-click on project, select Properties, then Checkstyle. Make sure that the selected configuration is correct.

  • Configuration names are case sensitive. This can be an issue if someone made a case mistake in the .checkstyle file located in each project's root directory. Or the configuration name was mistyped on import. This last point should result in different errors though (such as configuration not found).

like image 67
barfuin Avatar answered Nov 08 '22 05:11

barfuin