CheckStyle Eclipse plugin. Installation |
Tunning your CheckStyle and Formatter |
Every programmer working as only one |
What if... I get a "Fileset from project [projectname] has no valid check configuration" Error? |
CheckStyle configuration distribution |
One solution for the following error:
Errors occurred during the build.
Errors running builder 'Checkstyle Builder' on project [projectname].
Fileset from project [projectname] has no valid check configuration.
Fileset from project [projectname] has no valid check configuration.
Fileset from project [projectname] has no valid check configuration.
Fileset from project [projectname] has no valid check configuration.
Analysis:
It looks like to me that you configured CheckStyle in a workspace scope (Window->Preferences->CheckStyle...). Any of your team did the same, but his/her configuration, although it is the same, he/she put a different name to the configuration.
The other person generated a checkstyle project configuration, like ignored folders, and shared it with you, through Subversion for example.
As soon as you get that configuration, Checkstyle search for a specific configuration name, your pal's one, and yours name is different. That's the error.
Solution:
Please check your .checkstyle file in the root folder of the project. Specially "fileset" node, "check-config-name" property. Its value MUST be coherent with your CheckStyle configuration name. That file must be under version control repository Subversion and is shared between developers, so it is possible that some guy imported its workspace configuration.
Example of mistaken configuration .checkstyle file:
<?xml version="1.0" encoding="UTF-8"?>
<fileset-config file-format-version="1.2.0" simple-config="true" sync-formatter="false">
<fileset name="all" enabled="true" check-config-name="Sun Checks" local="false">
<file-match-pattern match-pattern="." include-pattern="true"/>
</fileset>
<filter name="WriteProtectedFiles" enabled="true"/>
</fileset-config>
Coherent CheckStyle configuration at Window menu -> Preferences.
If the configuration doesn't defaults to the same name, or a project local configuration doesn't either, the error will appear. Check both IDE and project checkstyle configuration.
For avoiding the same error in the future, you can agree a name for that configuration with your team. A possible better solution is described here, and consist of configuring CheckStyle inside the project, and such information will travel with it, no more name mistaken will happen.
Did it work? Leave a comment.
See you! :)
Very helpful. Solved my problem. Thanks a lot.
ResponderEliminarYou are very welcome, and thanks for your comment, they are scarce ^^
ResponderEliminarGreat post!! solved my problem too. Thanks!
ResponderEliminarVery helpful. Thank you very much!
ResponderEliminarYou are a star - thanks for this. Fixed the issue for me :-)
ResponderEliminar+1
ResponderEliminarThanks for this...
ResponderEliminarYou're helping people, even 8 years later ;)
ResponderEliminarThank you.
Thank you, your post helped me, even 9 years later!
ResponderEliminarAwesome :)
Eliminar