{"id":2660,"date":"2017-12-09T09:47:17","date_gmt":"2017-12-09T09:47:17","guid":{"rendered":"http:\/\/www.scmgalaxy.com\/tutorials\/?p=2660"},"modified":"2020-01-09T07:31:48","modified_gmt":"2020-01-09T07:31:48","slug":"checkstyle-reports-different-issues-on-different-r","status":"publish","type":"post","link":"https:\/\/www.devopsschool.com\/blog\/checkstyle-reports-different-issues-on-different-r\/","title":{"rendered":"Checkstyle reports different issues on different r"},"content":{"rendered":"<p><strong>rajeshkumar created the topic: Checkstyle reports different issues on different r<\/strong><\/p>\n<p>Checkstyle reports different issues on different runs<\/p>\n<p>I&#8217;m seeing something strange with the checkstyle plugin.<\/p>\n<p>We are using Checkstyle plugin 2.5 and configure it using a checkstyle<br \/>\nfile in a jar that is an extension of our pom.<\/p>\n<p>Thus:<br \/>\n[code language=&#8221;css&#8221;]<br \/>\n&lt;project&gt;<br \/>\n&lt;properties&gt;<br \/>\n&lt;checkstyle-maven-plugin.version&gt;2.5&lt;\/checkstyle-maven-plugin.version&gt;<br \/>\n&lt;\/properties&gt;<br \/>\n&lt;build&gt;<\/p>\n<p>&lt;plugins&gt;<br \/>\n&lt;plugin&gt;<br \/>\n&lt;groupId&gt;org.apache.maven.plugins&lt;\/groupId&gt;<br \/>\n&lt;artifactId&gt;maven-checkstyle-plugin&lt;\/artifactId&gt;<br \/>\n&lt;version&gt;${checkstyle-maven-plugin.version}&lt;\/version&gt;<br \/>\n&lt;configuration&gt;<br \/>\n&lt;includeTestSourceDirectory&gt;true&lt;\/includeTestSourceDirectory&gt;<br \/>\n&lt;configLocation&gt;iris_checks.xml&lt;\/configLocation&gt;<br \/>\n&lt;\/configuration&gt;<br \/>\n&lt;\/plugin&gt;<br \/>\n&lt;\/plugins&gt;<br \/>\n&lt;extensions&gt;<br \/>\n&lt;extension&gt;<br \/>\n&lt;groupId&gt;org.example&lt;\/groupId&gt;<br \/>\n&lt;artifactId&gt;build-resources&lt;\/artifactId&gt;<br \/>\n&lt;version&gt;1.0.4&lt;\/version&gt;<br \/>\n&lt;\/extension&gt;<br \/>\n&lt;\/extensions&gt;<br \/>\n&lt;\/build&gt;<br \/>\n&lt;\/project&gt;<br \/>\n[\/code]<br \/>\nWhen I run the following command line:<br \/>\nmvn clean checkstyle:checkstyle &amp;&amp; cp target\/checkstyle-result.xml .<br \/>\n&amp;&amp; mvn clean checkstyle:checkstyle &amp;&amp; diff checkstyle-result.xml<br \/>\ntarget\/checkstyle-result.xml<\/p>\n<p>I sometimes see differences like:<br \/>\n[code language=&#8221;css&#8221;]<br \/>\n&gt; &lt;error line=&#8221;12&#8243; column=&#8221;5&#8243; severity=&#8221;warning&#8221; message=&#8221;Missing a Javadoc<br \/>\n&gt; comment.&#8221;<br \/>\n&gt; source=&#8221;com.puppycrawl.tools.checkstyle.checks.javadoc.JavadocVariableCheck&#8221;\/&gt;<br \/>\n279a281,286<br \/>\n&gt; &lt;error line=&#8221;122&#8243; column=&#8221;9&#8243; severity=&#8221;warning&#8221; message=&#8221;Missing a Javadoc<br \/>\n&gt; comment.&#8221;<br \/>\n&gt; source=&#8221;com.puppycrawl.tools.checkstyle.checks.javadoc.JavadocVariableCheck&#8221;\/&gt;<br \/>\n&gt; &lt;error line=&#8221;123&#8243; column=&#8221;9&#8243; severity=&#8221;warning&#8221; message=&#8221;Missing a Javadoc<br \/>\n&gt; comment.&#8221;<br \/>\n&gt; source=&#8221;com.puppycrawl.tools.checkstyle.checks.javadoc.JavadocVariableCheck&#8221;\/&gt;<br \/>\n&gt; &lt;error line=&#8221;124&#8243; column=&#8221;9&#8243; severity=&#8221;warning&#8221; message=&#8221;Missing a Javadoc<br \/>\n&gt; comment.&#8221;<br \/>\n&gt; source=&#8221;com.puppycrawl.tools.checkstyle.checks.javadoc.JavadocVariableCheck&#8221;\/&gt;<br \/>\n&gt; &lt;error line=&#8221;125&#8243; column=&#8221;9&#8243; severity=&#8221;warning&#8221; message=&#8221;Missing a Javadoc<br \/>\n&gt; comment.&#8221;<br \/>\n&gt; source=&#8221;com.puppycrawl.tools.checkstyle.checks.javadoc.JavadocVariableCheck&#8221;\/&gt;<br \/>\n&gt; &lt;error line=&#8221;126&#8243; column=&#8221;9&#8243; severity=&#8221;warning&#8221; message=&#8221;Missing a Javadoc<br \/>\n&gt; comment.&#8221;<br \/>\n&gt; source=&#8221;com.puppycrawl.tools.checkstyle.checks.javadoc.JavadocVariableCheck&#8221;\/&gt;<br \/>\n&gt; &lt;error line=&#8221;127&#8243; column=&#8221;9&#8243; severity=&#8221;warning&#8221; message=&#8221;Missing a Javadoc<br \/>\n&gt; comment.&#8221;<br \/>\n&gt; source=&#8221;com.puppycrawl.tools.checkstyle.checks.javadoc.JavadocVariableCheck&#8221;\/&gt;<br \/>\n[\/code]<br \/>\nI don&#8217;t change code between runs, so I assume this may never happen.<br \/>\nWhat could cause this?<\/p>\n<p>With regards,<br \/>\nRegards,<br \/>\nRajesh Kumar<br \/>\nTwitt me @ twitter.com\/RajeshKumarIn<\/p>\n","protected":false},"excerpt":{"rendered":"<p>rajeshkumar created the topic: Checkstyle reports different issues on different r Checkstyle reports different issues on different runs I&#8217;m seeing something strange with the checkstyle plugin. We are using Checkstyle&#8230; <\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_joinchat":[],"footnotes":""},"categories":[2],"tags":[526],"class_list":["post-2660","post","type-post","status-publish","format-standard","hentry","category-uncategorised","tag-checkstyle"],"_links":{"self":[{"href":"https:\/\/www.devopsschool.com\/blog\/wp-json\/wp\/v2\/posts\/2660","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.devopsschool.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.devopsschool.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.devopsschool.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.devopsschool.com\/blog\/wp-json\/wp\/v2\/comments?post=2660"}],"version-history":[{"count":2,"href":"https:\/\/www.devopsschool.com\/blog\/wp-json\/wp\/v2\/posts\/2660\/revisions"}],"predecessor-version":[{"id":8520,"href":"https:\/\/www.devopsschool.com\/blog\/wp-json\/wp\/v2\/posts\/2660\/revisions\/8520"}],"wp:attachment":[{"href":"https:\/\/www.devopsschool.com\/blog\/wp-json\/wp\/v2\/media?parent=2660"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.devopsschool.com\/blog\/wp-json\/wp\/v2\/categories?post=2660"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.devopsschool.com\/blog\/wp-json\/wp\/v2\/tags?post=2660"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}