Last modified: 2014-05-19 15:16:25 UTC

Wikimedia Bugzilla is closed!

Wikimedia migrated from Bugzilla to Phabricator. Bug reports are handled in Wikimedia Phabricator.
This static website is read-only and for historical purposes. It is not possible to log in and except for displaying bug reports and their history, links might be broken. See T58110, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 56110 - Setup checkstyle based linting for apps/android/java-mwapi
Setup checkstyle based linting for apps/android/java-mwapi
Status: NEW
Product: Wikimedia
Classification: Unclassified
Continuous integration (Other open bugs)
wmf-deployment
All All
: Normal normal (vote)
: ---
Assigned To: Nobody - You can work on this!
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2013-10-24 17:33 UTC by Yuvi Panda
Modified: 2014-05-19 15:16 UTC (History)
4 users (show)

See Also:
Web browser: ---
Mobile Platform: ---
Assignee Huggle Beta Tester: ---


Attachments
mvn checkstyle:checkstyle failing to produce report (8.35 KB, text/plain)
2013-10-25 12:33 UTC, Antoine "hashar" Musso (WMF)
Details

Description Yuvi Panda 2013-10-24 17:33:12 UTC
checkstyle[http://checkstyle.sourceforge.net/] is a java code linting utility similar to jshint for JS. Can it run on apps/android/java-mwapi, with the config file the checkstyle.xml in the repo itself, and be made voting?
Comment 1 Gerrit Notification Bot 2013-10-24 21:01:21 UTC
Change 91767 had a related patch set uploaded by Hashar:
contint: add in checkstyle package

https://gerrit.wikimedia.org/r/91767
Comment 2 Antoine "hashar" Musso (WMF) 2013-10-24 21:05:33 UTC
Checkstyle is packaged in Ubuntu Precise, above change would install it on the Jenkins slaves.

From there, I have ZERO clue how to run checkstyle myself, if you guys could write down here the commands that need to be run I can then write the basic jenkins job that will make it happen.

Jenkins will use a plugin for that https://wiki.jenkins-ci.org/display/JENKINS/Checkstyle+Plugin
Comment 3 Gerrit Notification Bot 2013-10-24 21:17:28 UTC
Change 91767 abandoned by Hashar:
contint: add in checkstyle package

Reason:
maven handle all of it for us :]

https://gerrit.wikimedia.org/r/91767
Comment 4 Antoine "hashar" Musso (WMF) 2013-10-24 21:18:05 UTC
The package is not needed. One can "just" run:

 mvn checkstyle:checkstyle
Comment 5 Antoine "hashar" Musso (WMF) 2013-10-25 12:33:07 UTC
Created attachment 13585 [details]
mvn checkstyle:checkstyle failing to produce report

I created a Jenkins test job that runs 'mvn checkstyle:checkstyle'.  It is based on https://gerrit.wikimedia.org/r/#/c/91770/ which introduce a style issue.

The run does complete:

[INFO] Starting audit...
../test-checkstyle-maven/src/main/java/org/mediawiki/api/RequestBuilder.java:11: First sentence should end with a period.
Audit done.


But the report eventually fail. Attached is console output.
Comment 6 Antoine "hashar" Musso (WMF) 2013-10-25 12:36:59 UTC
Note the:

log4j:WARN No appenders could be found for logger (org.apache.commons.beanutils.converters.BooleanConverter).
log4j:WARN Please initialize the log4j system properly.

The Jenkins page is https://integration.wikimedia.org/ci/job/test-checkstyle-maven/5/

And the japi plugin does have some error reported:

Using Jenkins 'checkstyle' plugin:
 https://integration.wikimedia.org/ci/job/test-checkstyle-maven/5/org.mediawiki$api/

With the Jenkins 'violations' plugin, that is the same:
 https://integration.wikimedia.org/ci/job/test-checkstyle-maven/6/org.mediawiki$api/console


I reproduce the issue on my laptop.
Comment 7 Antoine "hashar" Musso (WMF) 2014-05-19 15:16:25 UTC
Yuvi is that working for you?

Note You need to log in before you can comment on or make changes to this bug.


Navigation
Links