3

I am interested to know how to use CheckStyle.

I am doing static code analysis in Hudson, as first part, I installed Static Analyser and CheckStyle plugins in Hudson. But I am not able to find out how to use it in official Hudson checkstyple page also.

official page : http://wiki.hudson-ci.org/display/HUDSON/Checkstyle+Plugin

If you can show me a step by step procedure, that is more helpful to me.

halfer
  • 19,824
  • 17
  • 99
  • 186
Sun
  • 3,444
  • 7
  • 53
  • 83
  • 2
    You need to run CheckStyle as part of your build job; Hudson just displays the results from your build. What build framework (Ant, Maven, Gradle etc.) are you using ? – gareth_bowles Sep 10 '13 at 02:24
  • @gareth_bowles I think you should post this commment as reply. Because it is a very good answer. People thougt hudson's checkstyle plugin analyse and generate results but actually it just displays the results – Yusuf K. Oct 23 '13 at 08:14

2 Answers2

3

Posting this as an answer per request:

You need to run CheckStyle as part of your build job; Hudson just displays the results from your build. Here is documentation for the Ant task and the Maven plugin.

gareth_bowles
  • 20,760
  • 5
  • 52
  • 82
0

In the Hudson build job configuration screen you should find a checkbox that turns on Checkstyle. You don't need to change your Maven scripts. I don't know if Ant scripts would need adjustment as we always use Maven.

kiwiron
  • 1,677
  • 11
  • 17