[xwiki-devs] Problems building xwiki-core (checkstyle violations)
Asiri Rathnayake
asiri.rathnayake at gmail.com
Thu Apr 3 16:11:58 CEST 2008
I'm having a real hard-time with these check-style issues. Can someone fix
these issues ? Or perhaps tell me how to disable check-style in maven ? I
just need to do a simple test, now i'm spending more time on getting over
these check-style issues :(
Thanks.
- Asiri
On Thu, Apr 3, 2008 at 7:30 PM, Thomas Mortagne <thomas.mortagne at xwiki.com>
wrote:
> On Thu, Apr 3, 2008 at 3:55 PM, Asiri Rathnayake
> <asiri.rathnayake at gmail.com> wrote:
> > I thought there was a way to fix these check-style violations within
> > eclipse, Do we have that eclipse check-style definition file ? Anyway,
> I'll
> > try to find it out.
>
> See
> http://dev.xwiki.org/xwiki/bin/view/Community/DevelopmentTools#HEclipsecs
>
> >
> > Thanks.
> >
> > - Asiti
> >
> > On Thu, Apr 3, 2008 at 7:06 PM, Vincent Massol <vincent at massol.net>
> wrote:
> >
> > >
> > > On Apr 3, 2008, at 3:23 PM, Asiri Rathnayake wrote:
> > >
> > > > Some complaints seems to be somewhat pointless; like the string
> "date"
> > > > appearing twice in the file.
> > >
> > > None is pointless. See
> > > http://checkstyle.sourceforge.net/availablechecks.html
> > >
> > > > Is it suggesting that we should use a publlic static final String
> > > > field
> > > > instead ?
> > >
> > > yes or some other solution depending on the case at hand (like some
> > > resource bundles, etc).
> > >
> > > -Vincent
> > >
> > > > On Thu, Apr 3, 2008 at 6:34 PM, Vincent Massol <vincent at massol.net>
> > > > wrote:
> > > >
> > > >> You're using Maven 2.0.x (which works). The problem is that Maven
> > > >> 2.1.x has a bug where the checkstyle plugin is NOT working and
> thus
> > > >> these checkstyle errors have been introduced in the meantime.
> > > >>
> > > >> We need to:
> > > >> 1) fix them
> > > >> 2) probably use version 2.0.9 as our official version (at least
> make
> > > >> sure our C instance is using it), unless we can find a way to get
> > > >> checkstyle working in 2.1.
> > > >>
> > > >> I've known this for some time now but haven't had the time to fix
> it.
> > > >> If anyone wants to fix it that'd help.
> > > >>
> > > >> Thanks
> > > >> -Vincent
> > > >>
> > > >> On Apr 3, 2008, at 2:57 PM, Asiri Rathnayake wrote:
> > > >>
> > > >>> To reproduce, goto /trunks/xwiki-platform-core/xwiki-core and
> > > >>> execute `mvn
> > > >>> install`
> > > >>>
> > > >>> i get the following,
> > > >>>
> > > >>> <DUMP>
> > > >>>
> > > >>> [INFO] Starting audit...
> > > >>> /home/asiri/projects/xwiki-dev/trunks/xwiki-platform-core/xwiki-
> > > >>> core/
> > > >>> src/main/java/com/xpn/xwiki/web/XWikiMessageTool.java:110:
> > > >>> warning: Comment matches to-do format 'TODO:'.
> > > >>> /home/asiri/projects/xwiki-dev/trunks/xwiki-platform-core/xwiki-
> > > >>> core/
> > > >>> src/main/java/com/xpn/xwiki/web/XWikiMessageTool.java:256:
> > > >>> warning: Comment matches to-do format 'TODO:'.
> > > >>> /home/asiri/projects/xwiki-dev/trunks/xwiki-platform-core/xwiki-
> > > >>> core/
> > > >>> src/main/java/com/xpn/xwiki/web/XWikiMessageTool.java:258:27:
> > > >>> The String "Failed to load internationalization document bundle
> ["
> > > >>> appears 2
> > > >>> times in the file.
> > > >>> /home/asiri/projects/xwiki-dev/trunks/xwiki-platform-core/xwiki-
> > > >>> core/
> > > >>> src/main/java/com/xpn/xwiki/web/XWikiMessageTool.java:259:23:
> > > >>> The String "]." appears 2 times in the file.
> > > >>> /home/asiri/projects/xwiki-dev/trunks/xwiki-platform-core/xwiki-
> > > >>> core/
> > > >>> src/main/java/com/xpn/xwiki/web/XWikiMessageTool.java:276:64:
> > > >>> Expected @param tag for 'defaultLanguage'.
> > > >>> /home/asiri/projects/xwiki-dev/trunks/xwiki-platform-core/xwiki-
> > > >>> core/
> > > >>> src/main/java/com/xpn/xwiki/web/XWikiMessageTool.java:278:9:
> > > >>> Declaring variables, return values or parameters of type
> 'ArrayList'
> > > >>> is not
> > > >>> allowed.
> > > >>> /home/asiri/projects/xwiki-dev/trunks/xwiki-platform-core/xwiki-
> > > >>> core/
> > > >>> src/main/java/com/xpn/xwiki/web/XWikiMessageTool.java:297:
> > > >>> warning: Comment matches to-do format 'TODO:'.
> > > >>> /home/asiri/projects/xwiki-dev/trunks/xwiki-platform-core/xwiki-
> > > >>> core/
> > > >>> src/main/java/com/xpn/xwiki/web/XWikiMessageTool.java:307:5:
> > > >>> Missing a Javadoc comment.
> > > >>> /home/asiri/projects/xwiki-dev/trunks/xwiki-platform-core/xwiki-
> > > >>> core/
> > > >>>
> src/main/java/com/xpn/xwiki/plugin/fileupload/FileUploadPlugin.java:
> > > >>> 236:
> > > >>> warning: Comment matches to-do format 'TODO:'.
> > > >>> /home/asiri/projects/xwiki-dev/trunks/xwiki-platform-core/xwiki-
> > > >>> core/
> > > >>> src/main/java/com/xpn/xwiki/plugin/zipexplorer/
> > > >>> ZipExplorerPlugin.java:289:
> > > >>> warning: Comment matches to-do format 'TODO:'.
> > > >>> /home/asiri/projects/xwiki-dev/trunks/xwiki-platform-core/xwiki-
> > > >>> core/
> > > >>> src/main/java/com/xpn/xwiki/plugin/zipexplorer/
> > > >>> ZipExplorerPlugin.java:315:
> > > >>> warning: Comment matches to-do format 'TODO:'.
> > > >>> /home/asiri/projects/xwiki-dev/trunks/xwiki-platform-core/xwiki-
> > > >>> core/
> > > >>> src/main/java/com/xpn/xwiki/plugin/zipexplorer/
> > > >>> ZipExplorerPlugin.java:319:
> > > >>> warning: Comment matches to-do format 'TODO:'.
> > > >>> /home/asiri/projects/xwiki-dev/trunks/xwiki-platform-core/xwiki-
> > > >>> core/
> > > >>> src/main/java/com/xpn/xwiki/plugin/zipexplorer/
> > > >>> ZipExplorerPlugin.java:325:
> > > >>> warning: Comment matches to-do format 'TODO:'.
> > > >>> /home/asiri/projects/xwiki-dev/trunks/xwiki-platform-core/xwiki-
> > > >>> core/
> > > >>> src/main/java/com/xpn/xwiki/store/hibernate/
> > > >>> HibernateAttachmentRecycleBinStore.java:32:8:
> > > >>> Unused import - com.xpn.xwiki.XWiki.
> > > >>> /home/asiri/projects/xwiki-dev/trunks/xwiki-platform-core/xwiki-
> > > >>> core/
> > > >>> src/main/java/com/xpn/xwiki/store/hibernate/
> > > >>> HibernateAttachmentRecycleBinStore.java:125:31:
> > > >>> The String "unchecked" appears 2 times in the file.
> > > >>> /home/asiri/projects/xwiki-dev/trunks/xwiki-platform-core/xwiki-
> > > >>> core/
> > > >>> src/main/java/com/xpn/xwiki/store/hibernate/
> > > >>> HibernateAttachmentRecycleBinStore.java:131:43:
> > > >>> The String "docId" appears 2 times in the file.
> > > >>> /home/asiri/projects/xwiki-dev/trunks/xwiki-platform-core/xwiki-
> > > >>> core/
> > > >>> src/main/java/com/xpn/xwiki/store/hibernate/
> > > >>> HibernateAttachmentRecycleBinStore.java:136:69:
> > > >>> The String "date" appears 2 times in the file.
> > > >>> Audit done.
> > > >>>
> > > >>> [INFO] There are 9 checkstyle errors.
> > > >>> [WARNING] Unable to locate Source XRef to link to - DISABLED
> > > >>> [INFO] Ending forked execution [fork id: 341048484]
> > > >>> [ERROR]
> > > >>>
> > > >>> Mojo:
> > > >>>
> > > >>> org.apache.maven.plugins:maven-checkstyle-plugin:2.1:check
> > > >>>
> > > >>> FAILED for project:
> > > >>>
> > > >>> com.xpn.xwiki.platform:xwiki-core:jar:1.4-SNAPSHOT
> > > >>>
> > > >>> Reason:
> > > >>>
> > > >>> You have 9 checkstyle violations.
> > > >>>
> > > >>>
> > > >>>
> > > >>>
> > > >>> [INFO]
> > > >>>
> > >
> ------------------------------------------------------------------------
> > > >>> [INFO] For more information, run with the -e flag
> > > >>> [INFO]
> > > >>>
> > >
> ------------------------------------------------------------------------
> > > >>> [INFO] BUILD FAILED
> > > >>> [INFO]
> > > >>>
> > >
> ------------------------------------------------------------------------
> > > >>> [INFO] Total time: 1 minute 6 seconds
> > > >>> [INFO] Finished at: Thu Apr 03 18:18:24 LKT 2008
> > > >>> [INFO] Final Memory: 9M/24M
> > > >>> [INFO]
> > > >>>
> > >
> ------------------------------------------------------------------------
> > > >>>
> > > >>> </DUMP>
> > > >>>
> > > >>> Could I be doing anything wrong ?
> > > >>>
> > > >>> Thanks.
> > > >>>
> > > >>> - Asiri
> > > >>> _______________________________________________
> > > >>> devs mailing list
> > > >>> devs at xwiki.org
> > > >>> http://lists.xwiki.org/mailman/listinfo/devs
> > > >>
> > > >> _______________________________________________
> > > >> devs mailing list
> > > >> devs at xwiki.org
> > > >> http://lists.xwiki.org/mailman/listinfo/devs
> > > >>
> > > > _______________________________________________
> > > > devs mailing list
> > > > devs at xwiki.org
> > > > http://lists.xwiki.org/mailman/listinfo/devs
> > >
> > > _______________________________________________
> > > devs mailing list
> > > devs at xwiki.org
> > > http://lists.xwiki.org/mailman/listinfo/devs
> > >
> > _______________________________________________
> > devs mailing list
> > devs at xwiki.org
> > http://lists.xwiki.org/mailman/listinfo/devs
> >
>
>
>
> --
> Thomas Mortagne
> _______________________________________________
> devs mailing list
> devs at xwiki.org
> http://lists.xwiki.org/mailman/listinfo/devs
>
More information about the devs
mailing list