[ 
https://issues.apache.org/jira/browse/NUMBERS-50?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16276012#comment-16276012
 ] 

Amey Jadiye commented on NUMBERS-50:
------------------------------------


bq. Do you mean in directory commons-numbers-complex/target?
Yes, I was checking checkstyle error for only complex for now,  for limitting 
scope of this jira.

bq. When I call mvn site, CheckStyle does not report anything there! How do you 
call the report generation in order to get a different result?

I have changed two lines in pom.xml 
{{<logViolationsToConsole>true</logViolationsToConsole><failOnViolation>true</failOnViolation>}}
 not sure if you also did this on your local machine? I'm simply executing 
{{mvn clean verify checkstyle:check}} here. afer this change I can't call {{mvn 
site}} thats also failing. below is the short snip with reason. after adding 
target to suppression I'm able to build complex clean.

{code}
[INFO] --- maven-checkstyle-plugin:2.17:check (default-cli) @ 
commons-numbers-complex ---
[INFO] There is 1 error reported by Checkstyle 6.11.2 with 
/home/amey/work/opensource/apache/commons/commons-numbers/commons-numbers-complex/../src/main/resources/checkstyle/checkstyle.xml
 ruleset.
[ERROR] target/maven-archiver/pom.properties:[1] (header) Header: Missing a 
header - not enough lines in file.
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 34.253 s
[INFO] Finished at: 2017-12-03T22:28:15+05:30
[INFO] Final Memory: 37M/453M
[INFO] ------------------------------------------------------------------------
{code}

bq.  I rather think that we should heed the suggestions from CheckStyle unless 
there is a good reason.
Agreed, removed all except target and generated source which is important here, 
we dont really target included in checkstyle checks ,I think.

 
bq.  also tend to think that failing the build because of picky rules (like 
trailing whitespace) may not be pleasant when developing.
I think enfourcing those rules are good, that cleans the code while developing 
it self , atleast I'm in favour of it.

bq. here was a discussion about mandating that contributors should run a 
specific command (with options that would then fail the build, namely if 
CheckStyle is not happy) before submitting a pull request. But I don't recall 
that it has been done.

Yes, I did that in commons-text and its working like charm, enforceing that 
makes code clean before merge to trunk. will do that for commons-numbers after 
we finish with all the cleanup activities which includes pmd, checkstyle, 
findbug, rat etc ...

> Clean checkstyle for Complex
> ----------------------------
>
>                 Key: NUMBERS-50
>                 URL: https://issues.apache.org/jira/browse/NUMBERS-50
>             Project: Commons Numbers
>          Issue Type: Bug
>            Reporter: Eric Barnhill
>            Priority: Trivial
>
> Clean up trailing whitespaces and other checkstyle violations in 
> commons-numbers-complex



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

Reply via email to