[configuration] checkstyle fails build

classic Classic list List threaded Threaded
17 messages Options
Reply | Threaded
Open this post in threaded view
|

[configuration] checkstyle fails build

garydgregory
FYI, to whom can take the time to fix this.

When I run 'mvn clean install', I get:

[INFO] --- maven-checkstyle-plugin:2.15:check (default) @
commons-configuration2 ---
[INFO] There are 23 errors reported by Checkstyle 6.1.1 with
C:\vcs\svn\apache\commons\trunks-proper\configuration/conf/checkstyle.xml
ruleset.
[ERROR]
src\main\java\org\apache\commons\configuration2\AbstractHierarchicalConfiguration.java[976]
(regexp) RegexpSingleline: Line has trailing spaces.
[ERROR]
src\main\java\org\apache\commons\configuration2\AbstractHierarchicalConfiguration.java[978:30]
(blocks) LeftCurly: '{' should be on a new line.
[ERROR]
src\main\java\org\apache\commons\configuration2\AbstractYAMLBasedConfiguration.java[0]
(misc) NewlineAtEndOfFile: File does not end with a newline.
[ERROR]
src\main\java\org\apache\commons\configuration2\builder\fluent\INIBuilderParameters.java[0]
(misc) NewlineAtEndOfFile: File does not end with a newline.
[ERROR]
src\main\java\org\apache\commons\configuration2\builder\INIBuilderParametersImpl.java[0]
(misc) NewlineAtEndOfFile: File does not end with a newline.
[ERROR]
src\main\java\org\apache\commons\configuration2\builder\INIBuilderParametersImpl.java[42:5]
(whitespace) FileTabCharacter: File contains tab characters (this is the
first instance).
[ERROR]
src\main\java\org\apache\commons\configuration2\builder\INIBuilderParametersImpl.java[52:84]
(blocks) LeftCurly: '{' should be on a new line.
[ERROR]
src\main\java\org\apache\commons\configuration2\builder\INIBuilderProperties.java[0]
(misc) NewlineAtEndOfFile: File does not end with a newline.
[ERROR]
src\main\java\org\apache\commons\configuration2\ex\ConfigurationRuntimeException.java[68]
(regexp) RegexpSingleline: Line has trailing spaces.
[ERROR]
src\main\java\org\apache\commons\configuration2\JSONConfiguration.java[0]
(misc) NewlineAtEndOfFile: File does not end with a newline.
[ERROR]
src\main\java\org\apache\commons\configuration2\JSONConfiguration.java[43:5]
(javadoc) JavadocVariable: Missing a Javadoc comment.
[ERROR]
src\main\java\org\apache\commons\configuration2\JSONConfiguration.java[44:5]
(javadoc) JavadocVariable: Missing a Javadoc comment.
[ERROR]
src\main\java\org\apache\commons\configuration2\tree\ImmutableNode.java[106]
(regexp) RegexpSingleline: Line has trailing spaces.
[ERROR]
src\main\java\org\apache\commons\configuration2\tree\ImmutableNode.java[114:27]
(blocks) LeftCurly: '{' should be on a new line.
[ERROR]
src\main\java\org\apache\commons\configuration2\tree\ImmutableNode.java[117]
(regexp) RegexpSingleline: Line has trailing spaces.
[ERROR]
src\main\java\org\apache\commons\configuration2\tree\ImmutableNode.java[666]
(regexp) RegexpSingleline: Line has trailing spaces.
[ERROR]
src\main\java\org\apache\commons\configuration2\XMLConfiguration.java[1169:15]
(whitespace) WhitespaceAround: 'if' is not followed by whitespace.
[ERROR]
src\main\java\org\apache\commons\configuration2\XMLConfiguration.java[1210:15]
(whitespace) WhitespaceAround: 'if' is not followed by whitespace.
[ERROR]
src\main\java\org\apache\commons\configuration2\XMLConfiguration.java[1212:19]
(whitespace) WhitespaceAround: 'if' is not followed by whitespace.
[ERROR]
src\main\java\org\apache\commons\configuration2\XMLConfiguration.java[1311:20]
(whitespace) WhitespaceAround: 'if' is not followed by whitespace.
[ERROR]
src\main\java\org\apache\commons\configuration2\XMLListReference.java[0]
(misc) NewlineAtEndOfFile: File does not end with a newline.
[ERROR]
src\main\java\org\apache\commons\configuration2\XMLListReference.java[45]
(design) FinalClass: Class XMLListReference should be declared as final.
[ERROR]
src\main\java\org\apache\commons\configuration2\YAMLConfiguration.java[0]
(misc) NewlineAtEndOfFile: File does not end with a newline.
[WARNING] checkstyle:check violations detected but failOnViolation set to
false

Gary
Reply | Threaded
Open this post in threaded view
|

Re: [configuration] checkstyle fails build

Allon Mureinik
The root cause, IMHO, is having failValidation=false configured in the
pom.xml. This way, when you introduce a new problem your only option to
notice it is if you visually scan mvn's output. As evident by the current
state of the build, not everyone notices these.
A more robust approach would be to set failValidation=true, and actively
fail the build if checkstyle's rules are violated.

I've submitted a PR to fix all the existing issues and enable this
validation. Reviews are welcome:
https://github.com/apache/commons-configuration/pull/5


On Thu, Jun 22, 2017 at 11:10 PM, Gary Gregory <[hidden email]>
wrote:

> FYI, to whom can take the time to fix this.
>
> When I run 'mvn clean install', I get:
>
> [INFO] --- maven-checkstyle-plugin:2.15:check (default) @
> commons-configuration2 ---
> [INFO] There are 23 errors reported by Checkstyle 6.1.1 with
> C:\vcs\svn\apache\commons\trunks-proper\configuration/conf/checkstyle.xml
> ruleset.
> [ERROR]
> src\main\java\org\apache\commons\configuration2\
> AbstractHierarchicalConfiguration.java[976]
> (regexp) RegexpSingleline: Line has trailing spaces.
> [ERROR]
> src\main\java\org\apache\commons\configuration2\
> AbstractHierarchicalConfiguration.java[978:30]
> (blocks) LeftCurly: '{' should be on a new line.
> [ERROR]
> src\main\java\org\apache\commons\configuration2\
> AbstractYAMLBasedConfiguration.java[0]
> (misc) NewlineAtEndOfFile: File does not end with a newline.
> [ERROR]
> src\main\java\org\apache\commons\configuration2\builder\fluent\
> INIBuilderParameters.java[0]
> (misc) NewlineAtEndOfFile: File does not end with a newline.
> [ERROR]
> src\main\java\org\apache\commons\configuration2\builder\
> INIBuilderParametersImpl.java[0]
> (misc) NewlineAtEndOfFile: File does not end with a newline.
> [ERROR]
> src\main\java\org\apache\commons\configuration2\builder\
> INIBuilderParametersImpl.java[42:5]
> (whitespace) FileTabCharacter: File contains tab characters (this is the
> first instance).
> [ERROR]
> src\main\java\org\apache\commons\configuration2\builder\
> INIBuilderParametersImpl.java[52:84]
> (blocks) LeftCurly: '{' should be on a new line.
> [ERROR]
> src\main\java\org\apache\commons\configuration2\
> builder\INIBuilderProperties.java[0]
> (misc) NewlineAtEndOfFile: File does not end with a newline.
> [ERROR]
> src\main\java\org\apache\commons\configuration2\ex\
> ConfigurationRuntimeException.java[68]
> (regexp) RegexpSingleline: Line has trailing spaces.
> [ERROR]
> src\main\java\org\apache\commons\configuration2\JSONConfiguration.java[0]
> (misc) NewlineAtEndOfFile: File does not end with a newline.
> [ERROR]
> src\main\java\org\apache\commons\configuration2\
> JSONConfiguration.java[43:5]
> (javadoc) JavadocVariable: Missing a Javadoc comment.
> [ERROR]
> src\main\java\org\apache\commons\configuration2\
> JSONConfiguration.java[44:5]
> (javadoc) JavadocVariable: Missing a Javadoc comment.
> [ERROR]
> src\main\java\org\apache\commons\configuration2\tree\
> ImmutableNode.java[106]
> (regexp) RegexpSingleline: Line has trailing spaces.
> [ERROR]
> src\main\java\org\apache\commons\configuration2\tree\
> ImmutableNode.java[114:27]
> (blocks) LeftCurly: '{' should be on a new line.
> [ERROR]
> src\main\java\org\apache\commons\configuration2\tree\
> ImmutableNode.java[117]
> (regexp) RegexpSingleline: Line has trailing spaces.
> [ERROR]
> src\main\java\org\apache\commons\configuration2\tree\
> ImmutableNode.java[666]
> (regexp) RegexpSingleline: Line has trailing spaces.
> [ERROR]
> src\main\java\org\apache\commons\configuration2\
> XMLConfiguration.java[1169:15]
> (whitespace) WhitespaceAround: 'if' is not followed by whitespace.
> [ERROR]
> src\main\java\org\apache\commons\configuration2\
> XMLConfiguration.java[1210:15]
> (whitespace) WhitespaceAround: 'if' is not followed by whitespace.
> [ERROR]
> src\main\java\org\apache\commons\configuration2\
> XMLConfiguration.java[1212:19]
> (whitespace) WhitespaceAround: 'if' is not followed by whitespace.
> [ERROR]
> src\main\java\org\apache\commons\configuration2\
> XMLConfiguration.java[1311:20]
> (whitespace) WhitespaceAround: 'if' is not followed by whitespace.
> [ERROR]
> src\main\java\org\apache\commons\configuration2\XMLListReference.java[0]
> (misc) NewlineAtEndOfFile: File does not end with a newline.
> [ERROR]
> src\main\java\org\apache\commons\configuration2\XMLListReference.java[45]
> (design) FinalClass: Class XMLListReference should be declared as final.
> [ERROR]
> src\main\java\org\apache\commons\configuration2\YAMLConfiguration.java[0]
> (misc) NewlineAtEndOfFile: File does not end with a newline.
> [WARNING] checkstyle:check violations detected but failOnViolation set to
> false
>
> Gary
>
Reply | Threaded
Open this post in threaded view
|

Re: [configuration] checkstyle fails build

Oliver Heger-3


Am 23.06.2017 um 08:58 schrieb Allon Mureinik:

> The root cause, IMHO, is having failValidation=false configured in the
> pom.xml. This way, when you introduce a new problem your only option to
> notice it is if you visually scan mvn's output. As evident by the current
> state of the build, not everyone notices these.
> A more robust approach would be to set failValidation=true, and actively
> fail the build if checkstyle's rules are violated.
>
> I've submitted a PR to fix all the existing issues and enable this
> validation. Reviews are welcome:
> https://github.com/apache/commons-configuration/pull/5
>

Thanks for the PR, I will have a look.

However, letting the build fail because of checkstyle error is too
restrictive IMHO. My approach is to work through the errors before
creating a new release. This has the disadvantage that errors might
accumulate; but from one release to the next one there is typically not
that much.

Oliver

>
> On Thu, Jun 22, 2017 at 11:10 PM, Gary Gregory <[hidden email]>
> wrote:
>
>> FYI, to whom can take the time to fix this.
>>
>> When I run 'mvn clean install', I get:
>>
>> [INFO] --- maven-checkstyle-plugin:2.15:check (default) @
>> commons-configuration2 ---
>> [INFO] There are 23 errors reported by Checkstyle 6.1.1 with
>> C:\vcs\svn\apache\commons\trunks-proper\configuration/conf/checkstyle.xml
>> ruleset.
>> [ERROR]
>> src\main\java\org\apache\commons\configuration2\
>> AbstractHierarchicalConfiguration.java[976]
>> (regexp) RegexpSingleline: Line has trailing spaces.
>> [ERROR]
>> src\main\java\org\apache\commons\configuration2\
>> AbstractHierarchicalConfiguration.java[978:30]
>> (blocks) LeftCurly: '{' should be on a new line.
>> [ERROR]
>> src\main\java\org\apache\commons\configuration2\
>> AbstractYAMLBasedConfiguration.java[0]
>> (misc) NewlineAtEndOfFile: File does not end with a newline.
>> [ERROR]
>> src\main\java\org\apache\commons\configuration2\builder\fluent\
>> INIBuilderParameters.java[0]
>> (misc) NewlineAtEndOfFile: File does not end with a newline.
>> [ERROR]
>> src\main\java\org\apache\commons\configuration2\builder\
>> INIBuilderParametersImpl.java[0]
>> (misc) NewlineAtEndOfFile: File does not end with a newline.
>> [ERROR]
>> src\main\java\org\apache\commons\configuration2\builder\
>> INIBuilderParametersImpl.java[42:5]
>> (whitespace) FileTabCharacter: File contains tab characters (this is the
>> first instance).
>> [ERROR]
>> src\main\java\org\apache\commons\configuration2\builder\
>> INIBuilderParametersImpl.java[52:84]
>> (blocks) LeftCurly: '{' should be on a new line.
>> [ERROR]
>> src\main\java\org\apache\commons\configuration2\
>> builder\INIBuilderProperties.java[0]
>> (misc) NewlineAtEndOfFile: File does not end with a newline.
>> [ERROR]
>> src\main\java\org\apache\commons\configuration2\ex\
>> ConfigurationRuntimeException.java[68]
>> (regexp) RegexpSingleline: Line has trailing spaces.
>> [ERROR]
>> src\main\java\org\apache\commons\configuration2\JSONConfiguration.java[0]
>> (misc) NewlineAtEndOfFile: File does not end with a newline.
>> [ERROR]
>> src\main\java\org\apache\commons\configuration2\
>> JSONConfiguration.java[43:5]
>> (javadoc) JavadocVariable: Missing a Javadoc comment.
>> [ERROR]
>> src\main\java\org\apache\commons\configuration2\
>> JSONConfiguration.java[44:5]
>> (javadoc) JavadocVariable: Missing a Javadoc comment.
>> [ERROR]
>> src\main\java\org\apache\commons\configuration2\tree\
>> ImmutableNode.java[106]
>> (regexp) RegexpSingleline: Line has trailing spaces.
>> [ERROR]
>> src\main\java\org\apache\commons\configuration2\tree\
>> ImmutableNode.java[114:27]
>> (blocks) LeftCurly: '{' should be on a new line.
>> [ERROR]
>> src\main\java\org\apache\commons\configuration2\tree\
>> ImmutableNode.java[117]
>> (regexp) RegexpSingleline: Line has trailing spaces.
>> [ERROR]
>> src\main\java\org\apache\commons\configuration2\tree\
>> ImmutableNode.java[666]
>> (regexp) RegexpSingleline: Line has trailing spaces.
>> [ERROR]
>> src\main\java\org\apache\commons\configuration2\
>> XMLConfiguration.java[1169:15]
>> (whitespace) WhitespaceAround: 'if' is not followed by whitespace.
>> [ERROR]
>> src\main\java\org\apache\commons\configuration2\
>> XMLConfiguration.java[1210:15]
>> (whitespace) WhitespaceAround: 'if' is not followed by whitespace.
>> [ERROR]
>> src\main\java\org\apache\commons\configuration2\
>> XMLConfiguration.java[1212:19]
>> (whitespace) WhitespaceAround: 'if' is not followed by whitespace.
>> [ERROR]
>> src\main\java\org\apache\commons\configuration2\
>> XMLConfiguration.java[1311:20]
>> (whitespace) WhitespaceAround: 'if' is not followed by whitespace.
>> [ERROR]
>> src\main\java\org\apache\commons\configuration2\XMLListReference.java[0]
>> (misc) NewlineAtEndOfFile: File does not end with a newline.
>> [ERROR]
>> src\main\java\org\apache\commons\configuration2\XMLListReference.java[45]
>> (design) FinalClass: Class XMLListReference should be declared as final.
>> [ERROR]
>> src\main\java\org\apache\commons\configuration2\YAMLConfiguration.java[0]
>> (misc) NewlineAtEndOfFile: File does not end with a newline.
>> [WARNING] checkstyle:check violations detected but failOnViolation set to
>> false
>>
>> Gary
>>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

Re: [configuration] checkstyle fails build

Claude Warren
How about an eclipse format configuration that will correct the error on
demand.  Granted you have to run eclipse but if such a file were created
(and checked in) then it would be easy for anyone running eclipse to fix it.

Claude

On Fri, Jun 23, 2017 at 4:03 PM, Oliver Heger <[hidden email]>
wrote:

>
>
> Am 23.06.2017 um 08:58 schrieb Allon Mureinik:
> > The root cause, IMHO, is having failValidation=false configured in the
> > pom.xml. This way, when you introduce a new problem your only option to
> > notice it is if you visually scan mvn's output. As evident by the current
> > state of the build, not everyone notices these.
> > A more robust approach would be to set failValidation=true, and actively
> > fail the build if checkstyle's rules are violated.
> >
> > I've submitted a PR to fix all the existing issues and enable this
> > validation. Reviews are welcome:
> > https://github.com/apache/commons-configuration/pull/5
> >
>
> Thanks for the PR, I will have a look.
>
> However, letting the build fail because of checkstyle error is too
> restrictive IMHO. My approach is to work through the errors before
> creating a new release. This has the disadvantage that errors might
> accumulate; but from one release to the next one there is typically not
> that much.
>
> Oliver
>
> >
> > On Thu, Jun 22, 2017 at 11:10 PM, Gary Gregory <[hidden email]>
> > wrote:
> >
> >> FYI, to whom can take the time to fix this.
> >>
> >> When I run 'mvn clean install', I get:
> >>
> >> [INFO] --- maven-checkstyle-plugin:2.15:check (default) @
> >> commons-configuration2 ---
> >> [INFO] There are 23 errors reported by Checkstyle 6.1.1 with
> >> C:\vcs\svn\apache\commons\trunks-proper\configuration/
> conf/checkstyle.xml
> >> ruleset.
> >> [ERROR]
> >> src\main\java\org\apache\commons\configuration2\
> >> AbstractHierarchicalConfiguration.java[976]
> >> (regexp) RegexpSingleline: Line has trailing spaces.
> >> [ERROR]
> >> src\main\java\org\apache\commons\configuration2\
> >> AbstractHierarchicalConfiguration.java[978:30]
> >> (blocks) LeftCurly: '{' should be on a new line.
> >> [ERROR]
> >> src\main\java\org\apache\commons\configuration2\
> >> AbstractYAMLBasedConfiguration.java[0]
> >> (misc) NewlineAtEndOfFile: File does not end with a newline.
> >> [ERROR]
> >> src\main\java\org\apache\commons\configuration2\builder\fluent\
> >> INIBuilderParameters.java[0]
> >> (misc) NewlineAtEndOfFile: File does not end with a newline.
> >> [ERROR]
> >> src\main\java\org\apache\commons\configuration2\builder\
> >> INIBuilderParametersImpl.java[0]
> >> (misc) NewlineAtEndOfFile: File does not end with a newline.
> >> [ERROR]
> >> src\main\java\org\apache\commons\configuration2\builder\
> >> INIBuilderParametersImpl.java[42:5]
> >> (whitespace) FileTabCharacter: File contains tab characters (this is the
> >> first instance).
> >> [ERROR]
> >> src\main\java\org\apache\commons\configuration2\builder\
> >> INIBuilderParametersImpl.java[52:84]
> >> (blocks) LeftCurly: '{' should be on a new line.
> >> [ERROR]
> >> src\main\java\org\apache\commons\configuration2\
> >> builder\INIBuilderProperties.java[0]
> >> (misc) NewlineAtEndOfFile: File does not end with a newline.
> >> [ERROR]
> >> src\main\java\org\apache\commons\configuration2\ex\
> >> ConfigurationRuntimeException.java[68]
> >> (regexp) RegexpSingleline: Line has trailing spaces.
> >> [ERROR]
> >> src\main\java\org\apache\commons\configuration2\
> JSONConfiguration.java[0]
> >> (misc) NewlineAtEndOfFile: File does not end with a newline.
> >> [ERROR]
> >> src\main\java\org\apache\commons\configuration2\
> >> JSONConfiguration.java[43:5]
> >> (javadoc) JavadocVariable: Missing a Javadoc comment.
> >> [ERROR]
> >> src\main\java\org\apache\commons\configuration2\
> >> JSONConfiguration.java[44:5]
> >> (javadoc) JavadocVariable: Missing a Javadoc comment.
> >> [ERROR]
> >> src\main\java\org\apache\commons\configuration2\tree\
> >> ImmutableNode.java[106]
> >> (regexp) RegexpSingleline: Line has trailing spaces.
> >> [ERROR]
> >> src\main\java\org\apache\commons\configuration2\tree\
> >> ImmutableNode.java[114:27]
> >> (blocks) LeftCurly: '{' should be on a new line.
> >> [ERROR]
> >> src\main\java\org\apache\commons\configuration2\tree\
> >> ImmutableNode.java[117]
> >> (regexp) RegexpSingleline: Line has trailing spaces.
> >> [ERROR]
> >> src\main\java\org\apache\commons\configuration2\tree\
> >> ImmutableNode.java[666]
> >> (regexp) RegexpSingleline: Line has trailing spaces.
> >> [ERROR]
> >> src\main\java\org\apache\commons\configuration2\
> >> XMLConfiguration.java[1169:15]
> >> (whitespace) WhitespaceAround: 'if' is not followed by whitespace.
> >> [ERROR]
> >> src\main\java\org\apache\commons\configuration2\
> >> XMLConfiguration.java[1210:15]
> >> (whitespace) WhitespaceAround: 'if' is not followed by whitespace.
> >> [ERROR]
> >> src\main\java\org\apache\commons\configuration2\
> >> XMLConfiguration.java[1212:19]
> >> (whitespace) WhitespaceAround: 'if' is not followed by whitespace.
> >> [ERROR]
> >> src\main\java\org\apache\commons\configuration2\
> >> XMLConfiguration.java[1311:20]
> >> (whitespace) WhitespaceAround: 'if' is not followed by whitespace.
> >> [ERROR]
> >> src\main\java\org\apache\commons\configuration2\
> XMLListReference.java[0]
> >> (misc) NewlineAtEndOfFile: File does not end with a newline.
> >> [ERROR]
> >> src\main\java\org\apache\commons\configuration2\
> XMLListReference.java[45]
> >> (design) FinalClass: Class XMLListReference should be declared as final.
> >> [ERROR]
> >> src\main\java\org\apache\commons\configuration2\
> YAMLConfiguration.java[0]
> >> (misc) NewlineAtEndOfFile: File does not end with a newline.
> >> [WARNING] checkstyle:check violations detected but failOnViolation set
> to
> >> false
> >>
> >> Gary
> >>
> >
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [hidden email]
> For additional commands, e-mail: [hidden email]
>
>


--
I like: Like Like - The likeliest place on the web
<http://like-like.xenei.com>
LinkedIn: http://www.linkedin.com/in/claudewarren
Reply | Threaded
Open this post in threaded view
|

Re: [configuration] checkstyle fails build

Allon Mureinik
In reply to this post by Oliver Heger-3
On Fri, Jun 23, 2017 at 6:03 PM, Oliver Heger <[hidden email]>
wrote:

>
>
> Am 23.06.2017 um 08:58 schrieb Allon Mureinik:
> > The root cause, IMHO, is having failValidation=false configured in the
> > pom.xml. This way, when you introduce a new problem your only option to
> > notice it is if you visually scan mvn's output. As evident by the current
> > state of the build, not everyone notices these.
> > A more robust approach would be to set failValidation=true, and actively
> > fail the build if checkstyle's rules are violated.
> >
> > I've submitted a PR to fix all the existing issues and enable this
> > validation. Reviews are welcome:
> > https://github.com/apache/commons-configuration/pull/5
> >
>
> Thanks for the PR, I will have a look.
>
> However, letting the build fail because of checkstyle error is too
> restrictive IMHO. My approach is to work through the errors before
> creating a new release. This has the disadvantage that errors might
> accumulate; but from one release to the next one there is typically not
> that much.
>
> Oliver
>

This is ultimately a matter of taste, but let me try to explain this point
of view better.
The baseline is that the project should pass checkstyle with no issues (the
first three patches in this PR will get us there).

From that point on, the goal is not accept any patch that would break the
styling.
Think of it way - If you were reviewing a patch that didn't comply to the
project's style, you'd comment about it and ask the author to fix it before
merging.
Having checkstyle do this *as part of the CI* has the same effect, but it
takes some responsibility off the maintainers' shoulders.
First, contributers can easily see if they need to improve their patch by
running mvn install (arguably, they could do this even without enabling
checkstyle validations, but it makes it much easier to notice). Second, and
more importantly, it allows the CI to block such patches, so maintainers
can decide whether to reject them (or even fix them themselves, if they are
so inclined) so that checking checkstyle before the release becomes a
non-issue - it just always passes.



>
> >
> > On Thu, Jun 22, 2017 at 11:10 PM, Gary Gregory <[hidden email]>
> > wrote:
> >
> >> FYI, to whom can take the time to fix this.
> >>
> >> When I run 'mvn clean install', I get:
> >>
> >> [INFO] --- maven-checkstyle-plugin:2.15:check (default) @
> >> commons-configuration2 ---
> >> [INFO] There are 23 errors reported by Checkstyle 6.1.1 with
> >> C:\vcs\svn\apache\commons\trunks-proper\configuration/conf/
> checkstyle.xml
> >> ruleset.
> >> [ERROR]
> >> src\main\java\org\apache\commons\configuration2\
> >> AbstractHierarchicalConfiguration.java[976]
> >> (regexp) RegexpSingleline: Line has trailing spaces.
> >> [ERROR]
> >> src\main\java\org\apache\commons\configuration2\
> >> AbstractHierarchicalConfiguration.java[978:30]
> >> (blocks) LeftCurly: '{' should be on a new line.
> >> [ERROR]
> >> src\main\java\org\apache\commons\configuration2\
> >> AbstractYAMLBasedConfiguration.java[0]
> >> (misc) NewlineAtEndOfFile: File does not end with a newline.
> >> [ERROR]
> >> src\main\java\org\apache\commons\configuration2\builder\fluent\
> >> INIBuilderParameters.java[0]
> >> (misc) NewlineAtEndOfFile: File does not end with a newline.
> >> [ERROR]
> >> src\main\java\org\apache\commons\configuration2\builder\
> >> INIBuilderParametersImpl.java[0]
> >> (misc) NewlineAtEndOfFile: File does not end with a newline.
> >> [ERROR]
> >> src\main\java\org\apache\commons\configuration2\builder\
> >> INIBuilderParametersImpl.java[42:5]
> >> (whitespace) FileTabCharacter: File contains tab characters (this is the
> >> first instance).
> >> [ERROR]
> >> src\main\java\org\apache\commons\configuration2\builder\
> >> INIBuilderParametersImpl.java[52:84]
> >> (blocks) LeftCurly: '{' should be on a new line.
> >> [ERROR]
> >> src\main\java\org\apache\commons\configuration2\
> >> builder\INIBuilderProperties.java[0]
> >> (misc) NewlineAtEndOfFile: File does not end with a newline.
> >> [ERROR]
> >> src\main\java\org\apache\commons\configuration2\ex\
> >> ConfigurationRuntimeException.java[68]
> >> (regexp) RegexpSingleline: Line has trailing spaces.
> >> [ERROR]
> >> src\main\java\org\apache\commons\configuration2\JSONConfigur
> ation.java[0]
> >> (misc) NewlineAtEndOfFile: File does not end with a newline.
> >> [ERROR]
> >> src\main\java\org\apache\commons\configuration2\
> >> JSONConfiguration.java[43:5]
> >> (javadoc) JavadocVariable: Missing a Javadoc comment.
> >> [ERROR]
> >> src\main\java\org\apache\commons\configuration2\
> >> JSONConfiguration.java[44:5]
> >> (javadoc) JavadocVariable: Missing a Javadoc comment.
> >> [ERROR]
> >> src\main\java\org\apache\commons\configuration2\tree\
> >> ImmutableNode.java[106]
> >> (regexp) RegexpSingleline: Line has trailing spaces.
> >> [ERROR]
> >> src\main\java\org\apache\commons\configuration2\tree\
> >> ImmutableNode.java[114:27]
> >> (blocks) LeftCurly: '{' should be on a new line.
> >> [ERROR]
> >> src\main\java\org\apache\commons\configuration2\tree\
> >> ImmutableNode.java[117]
> >> (regexp) RegexpSingleline: Line has trailing spaces.
> >> [ERROR]
> >> src\main\java\org\apache\commons\configuration2\tree\
> >> ImmutableNode.java[666]
> >> (regexp) RegexpSingleline: Line has trailing spaces.
> >> [ERROR]
> >> src\main\java\org\apache\commons\configuration2\
> >> XMLConfiguration.java[1169:15]
> >> (whitespace) WhitespaceAround: 'if' is not followed by whitespace.
> >> [ERROR]
> >> src\main\java\org\apache\commons\configuration2\
> >> XMLConfiguration.java[1210:15]
> >> (whitespace) WhitespaceAround: 'if' is not followed by whitespace.
> >> [ERROR]
> >> src\main\java\org\apache\commons\configuration2\
> >> XMLConfiguration.java[1212:19]
> >> (whitespace) WhitespaceAround: 'if' is not followed by whitespace.
> >> [ERROR]
> >> src\main\java\org\apache\commons\configuration2\
> >> XMLConfiguration.java[1311:20]
> >> (whitespace) WhitespaceAround: 'if' is not followed by whitespace.
> >> [ERROR]
> >> src\main\java\org\apache\commons\configuration2\XMLListRefer
> ence.java[0]
> >> (misc) NewlineAtEndOfFile: File does not end with a newline.
> >> [ERROR]
> >> src\main\java\org\apache\commons\configuration2\XMLListRefer
> ence.java[45]
> >> (design) FinalClass: Class XMLListReference should be declared as final.
> >> [ERROR]
> >> src\main\java\org\apache\commons\configuration2\YAMLConfigur
> ation.java[0]
> >> (misc) NewlineAtEndOfFile: File does not end with a newline.
> >> [WARNING] checkstyle:check violations detected but failOnViolation set
> to
> >> false
> >>
> >> Gary
> >>
> >
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [hidden email]
> For additional commands, e-mail: [hidden email]
>
>
Reply | Threaded
Open this post in threaded view
|

Re: [configuration] checkstyle fails build

garydgregory
In reply to this post by Claude Warren
On Fri, Jun 23, 2017 at 8:21 AM, Claude Warren <[hidden email]> wrote:

> How about an eclipse format configuration that will correct the error on
> demand.  Granted you have to run eclipse but if such a file were created
> (and checked in) then it would be easy for anyone running eclipse to fix
> it.
>

I use Eclipse and would appreciate such a file. In the past we've not
included IDE files in the repo but making it easier would be nice.

Gary

>
> Claude
>
> On Fri, Jun 23, 2017 at 4:03 PM, Oliver Heger <
> [hidden email]>
> wrote:
>
> >
> >
> > Am 23.06.2017 um 08:58 schrieb Allon Mureinik:
> > > The root cause, IMHO, is having failValidation=false configured in the
> > > pom.xml. This way, when you introduce a new problem your only option to
> > > notice it is if you visually scan mvn's output. As evident by the
> current
> > > state of the build, not everyone notices these.
> > > A more robust approach would be to set failValidation=true, and
> actively
> > > fail the build if checkstyle's rules are violated.
> > >
> > > I've submitted a PR to fix all the existing issues and enable this
> > > validation. Reviews are welcome:
> > > https://github.com/apache/commons-configuration/pull/5
> > >
> >
> > Thanks for the PR, I will have a look.
> >
> > However, letting the build fail because of checkstyle error is too
> > restrictive IMHO. My approach is to work through the errors before
> > creating a new release. This has the disadvantage that errors might
> > accumulate; but from one release to the next one there is typically not
> > that much.
> >
> > Oliver
> >
> > >
> > > On Thu, Jun 22, 2017 at 11:10 PM, Gary Gregory <[hidden email]
> >
> > > wrote:
> > >
> > >> FYI, to whom can take the time to fix this.
> > >>
> > >> When I run 'mvn clean install', I get:
> > >>
> > >> [INFO] --- maven-checkstyle-plugin:2.15:check (default) @
> > >> commons-configuration2 ---
> > >> [INFO] There are 23 errors reported by Checkstyle 6.1.1 with
> > >> C:\vcs\svn\apache\commons\trunks-proper\configuration/
> > conf/checkstyle.xml
> > >> ruleset.
> > >> [ERROR]
> > >> src\main\java\org\apache\commons\configuration2\
> > >> AbstractHierarchicalConfiguration.java[976]
> > >> (regexp) RegexpSingleline: Line has trailing spaces.
> > >> [ERROR]
> > >> src\main\java\org\apache\commons\configuration2\
> > >> AbstractHierarchicalConfiguration.java[978:30]
> > >> (blocks) LeftCurly: '{' should be on a new line.
> > >> [ERROR]
> > >> src\main\java\org\apache\commons\configuration2\
> > >> AbstractYAMLBasedConfiguration.java[0]
> > >> (misc) NewlineAtEndOfFile: File does not end with a newline.
> > >> [ERROR]
> > >> src\main\java\org\apache\commons\configuration2\builder\fluent\
> > >> INIBuilderParameters.java[0]
> > >> (misc) NewlineAtEndOfFile: File does not end with a newline.
> > >> [ERROR]
> > >> src\main\java\org\apache\commons\configuration2\builder\
> > >> INIBuilderParametersImpl.java[0]
> > >> (misc) NewlineAtEndOfFile: File does not end with a newline.
> > >> [ERROR]
> > >> src\main\java\org\apache\commons\configuration2\builder\
> > >> INIBuilderParametersImpl.java[42:5]
> > >> (whitespace) FileTabCharacter: File contains tab characters (this is
> the
> > >> first instance).
> > >> [ERROR]
> > >> src\main\java\org\apache\commons\configuration2\builder\
> > >> INIBuilderParametersImpl.java[52:84]
> > >> (blocks) LeftCurly: '{' should be on a new line.
> > >> [ERROR]
> > >> src\main\java\org\apache\commons\configuration2\
> > >> builder\INIBuilderProperties.java[0]
> > >> (misc) NewlineAtEndOfFile: File does not end with a newline.
> > >> [ERROR]
> > >> src\main\java\org\apache\commons\configuration2\ex\
> > >> ConfigurationRuntimeException.java[68]
> > >> (regexp) RegexpSingleline: Line has trailing spaces.
> > >> [ERROR]
> > >> src\main\java\org\apache\commons\configuration2\
> > JSONConfiguration.java[0]
> > >> (misc) NewlineAtEndOfFile: File does not end with a newline.
> > >> [ERROR]
> > >> src\main\java\org\apache\commons\configuration2\
> > >> JSONConfiguration.java[43:5]
> > >> (javadoc) JavadocVariable: Missing a Javadoc comment.
> > >> [ERROR]
> > >> src\main\java\org\apache\commons\configuration2\
> > >> JSONConfiguration.java[44:5]
> > >> (javadoc) JavadocVariable: Missing a Javadoc comment.
> > >> [ERROR]
> > >> src\main\java\org\apache\commons\configuration2\tree\
> > >> ImmutableNode.java[106]
> > >> (regexp) RegexpSingleline: Line has trailing spaces.
> > >> [ERROR]
> > >> src\main\java\org\apache\commons\configuration2\tree\
> > >> ImmutableNode.java[114:27]
> > >> (blocks) LeftCurly: '{' should be on a new line.
> > >> [ERROR]
> > >> src\main\java\org\apache\commons\configuration2\tree\
> > >> ImmutableNode.java[117]
> > >> (regexp) RegexpSingleline: Line has trailing spaces.
> > >> [ERROR]
> > >> src\main\java\org\apache\commons\configuration2\tree\
> > >> ImmutableNode.java[666]
> > >> (regexp) RegexpSingleline: Line has trailing spaces.
> > >> [ERROR]
> > >> src\main\java\org\apache\commons\configuration2\
> > >> XMLConfiguration.java[1169:15]
> > >> (whitespace) WhitespaceAround: 'if' is not followed by whitespace.
> > >> [ERROR]
> > >> src\main\java\org\apache\commons\configuration2\
> > >> XMLConfiguration.java[1210:15]
> > >> (whitespace) WhitespaceAround: 'if' is not followed by whitespace.
> > >> [ERROR]
> > >> src\main\java\org\apache\commons\configuration2\
> > >> XMLConfiguration.java[1212:19]
> > >> (whitespace) WhitespaceAround: 'if' is not followed by whitespace.
> > >> [ERROR]
> > >> src\main\java\org\apache\commons\configuration2\
> > >> XMLConfiguration.java[1311:20]
> > >> (whitespace) WhitespaceAround: 'if' is not followed by whitespace.
> > >> [ERROR]
> > >> src\main\java\org\apache\commons\configuration2\
> > XMLListReference.java[0]
> > >> (misc) NewlineAtEndOfFile: File does not end with a newline.
> > >> [ERROR]
> > >> src\main\java\org\apache\commons\configuration2\
> > XMLListReference.java[45]
> > >> (design) FinalClass: Class XMLListReference should be declared as
> final.
> > >> [ERROR]
> > >> src\main\java\org\apache\commons\configuration2\
> > YAMLConfiguration.java[0]
> > >> (misc) NewlineAtEndOfFile: File does not end with a newline.
> > >> [WARNING] checkstyle:check violations detected but failOnViolation set
> > to
> > >> false
> > >>
> > >> Gary
> > >>
> > >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: [hidden email]
> > For additional commands, e-mail: [hidden email]
> >
> >
>
>
> --
> I like: Like Like - The likeliest place on the web
> <http://like-like.xenei.com>
> LinkedIn: http://www.linkedin.com/in/claudewarren
>
Reply | Threaded
Open this post in threaded view
|

Re: [configuration] checkstyle fails build

garydgregory
In reply to this post by Allon Mureinik
On Fri, Jun 23, 2017 at 8:24 AM, Allon Mureinik <[hidden email]> wrote:

> On Fri, Jun 23, 2017 at 6:03 PM, Oliver Heger <
> [hidden email]>
> wrote:
>
> >
> >
> > Am 23.06.2017 um 08:58 schrieb Allon Mureinik:
> > > The root cause, IMHO, is having failValidation=false configured in the
> > > pom.xml. This way, when you introduce a new problem your only option to
> > > notice it is if you visually scan mvn's output. As evident by the
> current
> > > state of the build, not everyone notices these.
> > > A more robust approach would be to set failValidation=true, and
> actively
> > > fail the build if checkstyle's rules are violated.
> > >
> > > I've submitted a PR to fix all the existing issues and enable this
> > > validation. Reviews are welcome:
> > > https://github.com/apache/commons-configuration/pull/5
> > >
> >
> > Thanks for the PR, I will have a look.
> >
> > However, letting the build fail because of checkstyle error is too
> > restrictive IMHO. My approach is to work through the errors before
> > creating a new release. This has the disadvantage that errors might
> > accumulate; but from one release to the next one there is typically not
> > that much.
> >
> > Oliver
> >
>
> This is ultimately a matter of taste, but let me try to explain this point
> of view better.
> The baseline is that the project should pass checkstyle with no issues (the
> first three patches in this PR will get us there).
>
> From that point on, the goal is not accept any patch that would break the
> styling.
>

Over at HttpComponents, checkstyle can break the build and that helps keeps
the code tidy.

Gary


> Think of it way - If you were reviewing a patch that didn't comply to the
> project's style, you'd comment about it and ask the author to fix it before
> merging.
> Having checkstyle do this *as part of the CI* has the same effect, but it
> takes some responsibility off the maintainers' shoulders.
> First, contributers can easily see if they need to improve their patch by
> running mvn install (arguably, they could do this even without enabling
> checkstyle validations, but it makes it much easier to notice). Second, and
> more importantly, it allows the CI to block such patches, so maintainers
> can decide whether to reject them (or even fix them themselves, if they are
> so inclined) so that checking checkstyle before the release becomes a
> non-issue - it just always passes.
>
>
>
> >
> > >
> > > On Thu, Jun 22, 2017 at 11:10 PM, Gary Gregory <[hidden email]
> >
> > > wrote:
> > >
> > >> FYI, to whom can take the time to fix this.
> > >>
> > >> When I run 'mvn clean install', I get:
> > >>
> > >> [INFO] --- maven-checkstyle-plugin:2.15:check (default) @
> > >> commons-configuration2 ---
> > >> [INFO] There are 23 errors reported by Checkstyle 6.1.1 with
> > >> C:\vcs\svn\apache\commons\trunks-proper\configuration/conf/
> > checkstyle.xml
> > >> ruleset.
> > >> [ERROR]
> > >> src\main\java\org\apache\commons\configuration2\
> > >> AbstractHierarchicalConfiguration.java[976]
> > >> (regexp) RegexpSingleline: Line has trailing spaces.
> > >> [ERROR]
> > >> src\main\java\org\apache\commons\configuration2\
> > >> AbstractHierarchicalConfiguration.java[978:30]
> > >> (blocks) LeftCurly: '{' should be on a new line.
> > >> [ERROR]
> > >> src\main\java\org\apache\commons\configuration2\
> > >> AbstractYAMLBasedConfiguration.java[0]
> > >> (misc) NewlineAtEndOfFile: File does not end with a newline.
> > >> [ERROR]
> > >> src\main\java\org\apache\commons\configuration2\builder\fluent\
> > >> INIBuilderParameters.java[0]
> > >> (misc) NewlineAtEndOfFile: File does not end with a newline.
> > >> [ERROR]
> > >> src\main\java\org\apache\commons\configuration2\builder\
> > >> INIBuilderParametersImpl.java[0]
> > >> (misc) NewlineAtEndOfFile: File does not end with a newline.
> > >> [ERROR]
> > >> src\main\java\org\apache\commons\configuration2\builder\
> > >> INIBuilderParametersImpl.java[42:5]
> > >> (whitespace) FileTabCharacter: File contains tab characters (this is
> the
> > >> first instance).
> > >> [ERROR]
> > >> src\main\java\org\apache\commons\configuration2\builder\
> > >> INIBuilderParametersImpl.java[52:84]
> > >> (blocks) LeftCurly: '{' should be on a new line.
> > >> [ERROR]
> > >> src\main\java\org\apache\commons\configuration2\
> > >> builder\INIBuilderProperties.java[0]
> > >> (misc) NewlineAtEndOfFile: File does not end with a newline.
> > >> [ERROR]
> > >> src\main\java\org\apache\commons\configuration2\ex\
> > >> ConfigurationRuntimeException.java[68]
> > >> (regexp) RegexpSingleline: Line has trailing spaces.
> > >> [ERROR]
> > >> src\main\java\org\apache\commons\configuration2\JSONConfigur
> > ation.java[0]
> > >> (misc) NewlineAtEndOfFile: File does not end with a newline.
> > >> [ERROR]
> > >> src\main\java\org\apache\commons\configuration2\
> > >> JSONConfiguration.java[43:5]
> > >> (javadoc) JavadocVariable: Missing a Javadoc comment.
> > >> [ERROR]
> > >> src\main\java\org\apache\commons\configuration2\
> > >> JSONConfiguration.java[44:5]
> > >> (javadoc) JavadocVariable: Missing a Javadoc comment.
> > >> [ERROR]
> > >> src\main\java\org\apache\commons\configuration2\tree\
> > >> ImmutableNode.java[106]
> > >> (regexp) RegexpSingleline: Line has trailing spaces.
> > >> [ERROR]
> > >> src\main\java\org\apache\commons\configuration2\tree\
> > >> ImmutableNode.java[114:27]
> > >> (blocks) LeftCurly: '{' should be on a new line.
> > >> [ERROR]
> > >> src\main\java\org\apache\commons\configuration2\tree\
> > >> ImmutableNode.java[117]
> > >> (regexp) RegexpSingleline: Line has trailing spaces.
> > >> [ERROR]
> > >> src\main\java\org\apache\commons\configuration2\tree\
> > >> ImmutableNode.java[666]
> > >> (regexp) RegexpSingleline: Line has trailing spaces.
> > >> [ERROR]
> > >> src\main\java\org\apache\commons\configuration2\
> > >> XMLConfiguration.java[1169:15]
> > >> (whitespace) WhitespaceAround: 'if' is not followed by whitespace.
> > >> [ERROR]
> > >> src\main\java\org\apache\commons\configuration2\
> > >> XMLConfiguration.java[1210:15]
> > >> (whitespace) WhitespaceAround: 'if' is not followed by whitespace.
> > >> [ERROR]
> > >> src\main\java\org\apache\commons\configuration2\
> > >> XMLConfiguration.java[1212:19]
> > >> (whitespace) WhitespaceAround: 'if' is not followed by whitespace.
> > >> [ERROR]
> > >> src\main\java\org\apache\commons\configuration2\
> > >> XMLConfiguration.java[1311:20]
> > >> (whitespace) WhitespaceAround: 'if' is not followed by whitespace.
> > >> [ERROR]
> > >> src\main\java\org\apache\commons\configuration2\XMLListRefer
> > ence.java[0]
> > >> (misc) NewlineAtEndOfFile: File does not end with a newline.
> > >> [ERROR]
> > >> src\main\java\org\apache\commons\configuration2\XMLListRefer
> > ence.java[45]
> > >> (design) FinalClass: Class XMLListReference should be declared as
> final.
> > >> [ERROR]
> > >> src\main\java\org\apache\commons\configuration2\YAMLConfigur
> > ation.java[0]
> > >> (misc) NewlineAtEndOfFile: File does not end with a newline.
> > >> [WARNING] checkstyle:check violations detected but failOnViolation set
> > to
> > >> false
> > >>
> > >> Gary
> > >>
> > >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: [hidden email]
> > For additional commands, e-mail: [hidden email]
> >
> >
>
Reply | Threaded
Open this post in threaded view
|

Re: [configuration] checkstyle fails build

sebb-2-2
In reply to this post by garydgregory
On 23 June 2017 at 17:29, Gary Gregory <[hidden email]> wrote:

> On Fri, Jun 23, 2017 at 8:21 AM, Claude Warren <[hidden email]> wrote:
>
>> How about an eclipse format configuration that will correct the error on
>> demand.  Granted you have to run eclipse but if such a file were created
>> (and checked in) then it would be easy for anyone running eclipse to fix
>> it.
>>
>
> I use Eclipse and would appreciate such a file. In the past we've not
> included IDE files in the repo but making it easier would be nice.

If added, these should be optional.
i.e. don't use the same name as Eclipse uses, but copy the required
settings to another file.

See for example how Tomcat do it:

http://svn.apache.org/repos/asf/tomcat/trunk/res/ide-support/eclipse/

> Gary
>
>>
>> Claude
>>
>> On Fri, Jun 23, 2017 at 4:03 PM, Oliver Heger <
>> [hidden email]>
>> wrote:
>>
>> >
>> >
>> > Am 23.06.2017 um 08:58 schrieb Allon Mureinik:
>> > > The root cause, IMHO, is having failValidation=false configured in the
>> > > pom.xml. This way, when you introduce a new problem your only option to
>> > > notice it is if you visually scan mvn's output. As evident by the
>> current
>> > > state of the build, not everyone notices these.
>> > > A more robust approach would be to set failValidation=true, and
>> actively
>> > > fail the build if checkstyle's rules are violated.
>> > >
>> > > I've submitted a PR to fix all the existing issues and enable this
>> > > validation. Reviews are welcome:
>> > > https://github.com/apache/commons-configuration/pull/5
>> > >
>> >
>> > Thanks for the PR, I will have a look.
>> >
>> > However, letting the build fail because of checkstyle error is too
>> > restrictive IMHO. My approach is to work through the errors before
>> > creating a new release. This has the disadvantage that errors might
>> > accumulate; but from one release to the next one there is typically not
>> > that much.
>> >
>> > Oliver
>> >
>> > >
>> > > On Thu, Jun 22, 2017 at 11:10 PM, Gary Gregory <[hidden email]
>> >
>> > > wrote:
>> > >
>> > >> FYI, to whom can take the time to fix this.
>> > >>
>> > >> When I run 'mvn clean install', I get:
>> > >>
>> > >> [INFO] --- maven-checkstyle-plugin:2.15:check (default) @
>> > >> commons-configuration2 ---
>> > >> [INFO] There are 23 errors reported by Checkstyle 6.1.1 with
>> > >> C:\vcs\svn\apache\commons\trunks-proper\configuration/
>> > conf/checkstyle.xml
>> > >> ruleset.
>> > >> [ERROR]
>> > >> src\main\java\org\apache\commons\configuration2\
>> > >> AbstractHierarchicalConfiguration.java[976]
>> > >> (regexp) RegexpSingleline: Line has trailing spaces.
>> > >> [ERROR]
>> > >> src\main\java\org\apache\commons\configuration2\
>> > >> AbstractHierarchicalConfiguration.java[978:30]
>> > >> (blocks) LeftCurly: '{' should be on a new line.
>> > >> [ERROR]
>> > >> src\main\java\org\apache\commons\configuration2\
>> > >> AbstractYAMLBasedConfiguration.java[0]
>> > >> (misc) NewlineAtEndOfFile: File does not end with a newline.
>> > >> [ERROR]
>> > >> src\main\java\org\apache\commons\configuration2\builder\fluent\
>> > >> INIBuilderParameters.java[0]
>> > >> (misc) NewlineAtEndOfFile: File does not end with a newline.
>> > >> [ERROR]
>> > >> src\main\java\org\apache\commons\configuration2\builder\
>> > >> INIBuilderParametersImpl.java[0]
>> > >> (misc) NewlineAtEndOfFile: File does not end with a newline.
>> > >> [ERROR]
>> > >> src\main\java\org\apache\commons\configuration2\builder\
>> > >> INIBuilderParametersImpl.java[42:5]
>> > >> (whitespace) FileTabCharacter: File contains tab characters (this is
>> the
>> > >> first instance).
>> > >> [ERROR]
>> > >> src\main\java\org\apache\commons\configuration2\builder\
>> > >> INIBuilderParametersImpl.java[52:84]
>> > >> (blocks) LeftCurly: '{' should be on a new line.
>> > >> [ERROR]
>> > >> src\main\java\org\apache\commons\configuration2\
>> > >> builder\INIBuilderProperties.java[0]
>> > >> (misc) NewlineAtEndOfFile: File does not end with a newline.
>> > >> [ERROR]
>> > >> src\main\java\org\apache\commons\configuration2\ex\
>> > >> ConfigurationRuntimeException.java[68]
>> > >> (regexp) RegexpSingleline: Line has trailing spaces.
>> > >> [ERROR]
>> > >> src\main\java\org\apache\commons\configuration2\
>> > JSONConfiguration.java[0]
>> > >> (misc) NewlineAtEndOfFile: File does not end with a newline.
>> > >> [ERROR]
>> > >> src\main\java\org\apache\commons\configuration2\
>> > >> JSONConfiguration.java[43:5]
>> > >> (javadoc) JavadocVariable: Missing a Javadoc comment.
>> > >> [ERROR]
>> > >> src\main\java\org\apache\commons\configuration2\
>> > >> JSONConfiguration.java[44:5]
>> > >> (javadoc) JavadocVariable: Missing a Javadoc comment.
>> > >> [ERROR]
>> > >> src\main\java\org\apache\commons\configuration2\tree\
>> > >> ImmutableNode.java[106]
>> > >> (regexp) RegexpSingleline: Line has trailing spaces.
>> > >> [ERROR]
>> > >> src\main\java\org\apache\commons\configuration2\tree\
>> > >> ImmutableNode.java[114:27]
>> > >> (blocks) LeftCurly: '{' should be on a new line.
>> > >> [ERROR]
>> > >> src\main\java\org\apache\commons\configuration2\tree\
>> > >> ImmutableNode.java[117]
>> > >> (regexp) RegexpSingleline: Line has trailing spaces.
>> > >> [ERROR]
>> > >> src\main\java\org\apache\commons\configuration2\tree\
>> > >> ImmutableNode.java[666]
>> > >> (regexp) RegexpSingleline: Line has trailing spaces.
>> > >> [ERROR]
>> > >> src\main\java\org\apache\commons\configuration2\
>> > >> XMLConfiguration.java[1169:15]
>> > >> (whitespace) WhitespaceAround: 'if' is not followed by whitespace.
>> > >> [ERROR]
>> > >> src\main\java\org\apache\commons\configuration2\
>> > >> XMLConfiguration.java[1210:15]
>> > >> (whitespace) WhitespaceAround: 'if' is not followed by whitespace.
>> > >> [ERROR]
>> > >> src\main\java\org\apache\commons\configuration2\
>> > >> XMLConfiguration.java[1212:19]
>> > >> (whitespace) WhitespaceAround: 'if' is not followed by whitespace.
>> > >> [ERROR]
>> > >> src\main\java\org\apache\commons\configuration2\
>> > >> XMLConfiguration.java[1311:20]
>> > >> (whitespace) WhitespaceAround: 'if' is not followed by whitespace.
>> > >> [ERROR]
>> > >> src\main\java\org\apache\commons\configuration2\
>> > XMLListReference.java[0]
>> > >> (misc) NewlineAtEndOfFile: File does not end with a newline.
>> > >> [ERROR]
>> > >> src\main\java\org\apache\commons\configuration2\
>> > XMLListReference.java[45]
>> > >> (design) FinalClass: Class XMLListReference should be declared as
>> final.
>> > >> [ERROR]
>> > >> src\main\java\org\apache\commons\configuration2\
>> > YAMLConfiguration.java[0]
>> > >> (misc) NewlineAtEndOfFile: File does not end with a newline.
>> > >> [WARNING] checkstyle:check violations detected but failOnViolation set
>> > to
>> > >> false
>> > >>
>> > >> Gary
>> > >>
>> > >
>> >
>> > ---------------------------------------------------------------------
>> > To unsubscribe, e-mail: [hidden email]
>> > For additional commands, e-mail: [hidden email]
>> >
>> >
>>
>>
>> --
>> I like: Like Like - The likeliest place on the web
>> <http://like-like.xenei.com>
>> LinkedIn: http://www.linkedin.com/in/claudewarren
>>

---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

Re: [configuration] checkstyle fails build

Allon Mureinik
Instead of a per-IDE specific file, it may be useful to look into
EditorConfig [1]. A lot of IDEs support it either natively or via plugin,
and it may help having to replicate the same styling "logic" per IDE.

[1] http://editorconfig.org/

On Fri, Jun 23, 2017 at 7:35 PM, sebb <[hidden email]> wrote:

> On 23 June 2017 at 17:29, Gary Gregory <[hidden email]> wrote:
> > On Fri, Jun 23, 2017 at 8:21 AM, Claude Warren <[hidden email]> wrote:
> >
> >> How about an eclipse format configuration that will correct the error on
> >> demand.  Granted you have to run eclipse but if such a file were created
> >> (and checked in) then it would be easy for anyone running eclipse to fix
> >> it.
> >>
> >
> > I use Eclipse and would appreciate such a file. In the past we've not
> > included IDE files in the repo but making it easier would be nice.
>
> If added, these should be optional.
> i.e. don't use the same name as Eclipse uses, but copy the required
> settings to another file.
>
> See for example how Tomcat do it:
>
> http://svn.apache.org/repos/asf/tomcat/trunk/res/ide-support/eclipse/
>
> > Gary
> >
> >>
> >> Claude
> >>
> >> On Fri, Jun 23, 2017 at 4:03 PM, Oliver Heger <
> >> [hidden email]>
> >> wrote:
> >>
> >> >
> >> >
> >> > Am 23.06.2017 um 08:58 schrieb Allon Mureinik:
> >> > > The root cause, IMHO, is having failValidation=false configured in
> the
> >> > > pom.xml. This way, when you introduce a new problem your only
> option to
> >> > > notice it is if you visually scan mvn's output. As evident by the
> >> current
> >> > > state of the build, not everyone notices these.
> >> > > A more robust approach would be to set failValidation=true, and
> >> actively
> >> > > fail the build if checkstyle's rules are violated.
> >> > >
> >> > > I've submitted a PR to fix all the existing issues and enable this
> >> > > validation. Reviews are welcome:
> >> > > https://github.com/apache/commons-configuration/pull/5
> >> > >
> >> >
> >> > Thanks for the PR, I will have a look.
> >> >
> >> > However, letting the build fail because of checkstyle error is too
> >> > restrictive IMHO. My approach is to work through the errors before
> >> > creating a new release. This has the disadvantage that errors might
> >> > accumulate; but from one release to the next one there is typically
> not
> >> > that much.
> >> >
> >> > Oliver
> >> >
> >> > >
> >> > > On Thu, Jun 22, 2017 at 11:10 PM, Gary Gregory <
> [hidden email]
> >> >
> >> > > wrote:
> >> > >
> >> > >> FYI, to whom can take the time to fix this.
> >> > >>
> >> > >> When I run 'mvn clean install', I get:
> >> > >>
> >> > >> [INFO] --- maven-checkstyle-plugin:2.15:check (default) @
> >> > >> commons-configuration2 ---
> >> > >> [INFO] There are 23 errors reported by Checkstyle 6.1.1 with
> >> > >> C:\vcs\svn\apache\commons\trunks-proper\configuration/
> >> > conf/checkstyle.xml
> >> > >> ruleset.
> >> > >> [ERROR]
> >> > >> src\main\java\org\apache\commons\configuration2\
> >> > >> AbstractHierarchicalConfiguration.java[976]
> >> > >> (regexp) RegexpSingleline: Line has trailing spaces.
> >> > >> [ERROR]
> >> > >> src\main\java\org\apache\commons\configuration2\
> >> > >> AbstractHierarchicalConfiguration.java[978:30]
> >> > >> (blocks) LeftCurly: '{' should be on a new line.
> >> > >> [ERROR]
> >> > >> src\main\java\org\apache\commons\configuration2\
> >> > >> AbstractYAMLBasedConfiguration.java[0]
> >> > >> (misc) NewlineAtEndOfFile: File does not end with a newline.
> >> > >> [ERROR]
> >> > >> src\main\java\org\apache\commons\configuration2\builder\fluent\
> >> > >> INIBuilderParameters.java[0]
> >> > >> (misc) NewlineAtEndOfFile: File does not end with a newline.
> >> > >> [ERROR]
> >> > >> src\main\java\org\apache\commons\configuration2\builder\
> >> > >> INIBuilderParametersImpl.java[0]
> >> > >> (misc) NewlineAtEndOfFile: File does not end with a newline.
> >> > >> [ERROR]
> >> > >> src\main\java\org\apache\commons\configuration2\builder\
> >> > >> INIBuilderParametersImpl.java[42:5]
> >> > >> (whitespace) FileTabCharacter: File contains tab characters (this
> is
> >> the
> >> > >> first instance).
> >> > >> [ERROR]
> >> > >> src\main\java\org\apache\commons\configuration2\builder\
> >> > >> INIBuilderParametersImpl.java[52:84]
> >> > >> (blocks) LeftCurly: '{' should be on a new line.
> >> > >> [ERROR]
> >> > >> src\main\java\org\apache\commons\configuration2\
> >> > >> builder\INIBuilderProperties.java[0]
> >> > >> (misc) NewlineAtEndOfFile: File does not end with a newline.
> >> > >> [ERROR]
> >> > >> src\main\java\org\apache\commons\configuration2\ex\
> >> > >> ConfigurationRuntimeException.java[68]
> >> > >> (regexp) RegexpSingleline: Line has trailing spaces.
> >> > >> [ERROR]
> >> > >> src\main\java\org\apache\commons\configuration2\
> >> > JSONConfiguration.java[0]
> >> > >> (misc) NewlineAtEndOfFile: File does not end with a newline.
> >> > >> [ERROR]
> >> > >> src\main\java\org\apache\commons\configuration2\
> >> > >> JSONConfiguration.java[43:5]
> >> > >> (javadoc) JavadocVariable: Missing a Javadoc comment.
> >> > >> [ERROR]
> >> > >> src\main\java\org\apache\commons\configuration2\
> >> > >> JSONConfiguration.java[44:5]
> >> > >> (javadoc) JavadocVariable: Missing a Javadoc comment.
> >> > >> [ERROR]
> >> > >> src\main\java\org\apache\commons\configuration2\tree\
> >> > >> ImmutableNode.java[106]
> >> > >> (regexp) RegexpSingleline: Line has trailing spaces.
> >> > >> [ERROR]
> >> > >> src\main\java\org\apache\commons\configuration2\tree\
> >> > >> ImmutableNode.java[114:27]
> >> > >> (blocks) LeftCurly: '{' should be on a new line.
> >> > >> [ERROR]
> >> > >> src\main\java\org\apache\commons\configuration2\tree\
> >> > >> ImmutableNode.java[117]
> >> > >> (regexp) RegexpSingleline: Line has trailing spaces.
> >> > >> [ERROR]
> >> > >> src\main\java\org\apache\commons\configuration2\tree\
> >> > >> ImmutableNode.java[666]
> >> > >> (regexp) RegexpSingleline: Line has trailing spaces.
> >> > >> [ERROR]
> >> > >> src\main\java\org\apache\commons\configuration2\
> >> > >> XMLConfiguration.java[1169:15]
> >> > >> (whitespace) WhitespaceAround: 'if' is not followed by whitespace.
> >> > >> [ERROR]
> >> > >> src\main\java\org\apache\commons\configuration2\
> >> > >> XMLConfiguration.java[1210:15]
> >> > >> (whitespace) WhitespaceAround: 'if' is not followed by whitespace.
> >> > >> [ERROR]
> >> > >> src\main\java\org\apache\commons\configuration2\
> >> > >> XMLConfiguration.java[1212:19]
> >> > >> (whitespace) WhitespaceAround: 'if' is not followed by whitespace.
> >> > >> [ERROR]
> >> > >> src\main\java\org\apache\commons\configuration2\
> >> > >> XMLConfiguration.java[1311:20]
> >> > >> (whitespace) WhitespaceAround: 'if' is not followed by whitespace.
> >> > >> [ERROR]
> >> > >> src\main\java\org\apache\commons\configuration2\
> >> > XMLListReference.java[0]
> >> > >> (misc) NewlineAtEndOfFile: File does not end with a newline.
> >> > >> [ERROR]
> >> > >> src\main\java\org\apache\commons\configuration2\
> >> > XMLListReference.java[45]
> >> > >> (design) FinalClass: Class XMLListReference should be declared as
> >> final.
> >> > >> [ERROR]
> >> > >> src\main\java\org\apache\commons\configuration2\
> >> > YAMLConfiguration.java[0]
> >> > >> (misc) NewlineAtEndOfFile: File does not end with a newline.
> >> > >> [WARNING] checkstyle:check violations detected but failOnViolation
> set
> >> > to
> >> > >> false
> >> > >>
> >> > >> Gary
> >> > >>
> >> > >
> >> >
> >> > ---------------------------------------------------------------------
> >> > To unsubscribe, e-mail: [hidden email]
> >> > For additional commands, e-mail: [hidden email]
> >> >
> >> >
> >>
> >>
> >> --
> >> I like: Like Like - The likeliest place on the web
> >> <http://like-like.xenei.com>
> >> LinkedIn: http://www.linkedin.com/in/claudewarren
> >>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [hidden email]
> For additional commands, e-mail: [hidden email]
>
>
Reply | Threaded
Open this post in threaded view
|

Re: [configuration] checkstyle fails build

garydgregory
In reply to this post by sebb-2-2
On Fri, Jun 23, 2017 at 9:35 AM, sebb <[hidden email]> wrote:

> On 23 June 2017 at 17:29, Gary Gregory <[hidden email]> wrote:
> > On Fri, Jun 23, 2017 at 8:21 AM, Claude Warren <[hidden email]> wrote:
> >
> >> How about an eclipse format configuration that will correct the error on
> >> demand.  Granted you have to run eclipse but if such a file were created
> >> (and checked in) then it would be easy for anyone running eclipse to fix
> >> it.
> >>
> >
> > I use Eclipse and would appreciate such a file. In the past we've not
> > included IDE files in the repo but making it easier would be nice.
>
> If added, these should be optional.
> i.e. don't use the same name as Eclipse uses, but copy the required
> settings to another file.
>
> See for example how Tomcat do it:
>
> http://svn.apache.org/repos/asf/tomcat/trunk/res/ide-support/eclipse/


Putting the files in a separate folder is one thing but flattening the
folders and changing file names is -1. Just put the Eclipse .settings
folder I should be using so I can overlay it on top of my project.
Otherwise, a user has to know where to sprinkle each file in each place.
Maybe something like:

.../eclipse/.classpath
.../eclipse/.project
.../eclipse/.settings/fileA
.../eclipse/.settings/fileB
.../eclipse/.settings/folderA

and so on.

Gary

>
>
> > Gary
> >
> >>
> >> Claude
> >>
> >> On Fri, Jun 23, 2017 at 4:03 PM, Oliver Heger <
> >> [hidden email]>
> >> wrote:
> >>
> >> >
> >> >
> >> > Am 23.06.2017 um 08:58 schrieb Allon Mureinik:
> >> > > The root cause, IMHO, is having failValidation=false configured in
> the
> >> > > pom.xml. This way, when you introduce a new problem your only
> option to
> >> > > notice it is if you visually scan mvn's output. As evident by the
> >> current
> >> > > state of the build, not everyone notices these.
> >> > > A more robust approach would be to set failValidation=true, and
> >> actively
> >> > > fail the build if checkstyle's rules are violated.
> >> > >
> >> > > I've submitted a PR to fix all the existing issues and enable this
> >> > > validation. Reviews are welcome:
> >> > > https://github.com/apache/commons-configuration/pull/5
> >> > >
> >> >
> >> > Thanks for the PR, I will have a look.
> >> >
> >> > However, letting the build fail because of checkstyle error is too
> >> > restrictive IMHO. My approach is to work through the errors before
> >> > creating a new release. This has the disadvantage that errors might
> >> > accumulate; but from one release to the next one there is typically
> not
> >> > that much.
> >> >
> >> > Oliver
> >> >
> >> > >
> >> > > On Thu, Jun 22, 2017 at 11:10 PM, Gary Gregory <
> [hidden email]
> >> >
> >> > > wrote:
> >> > >
> >> > >> FYI, to whom can take the time to fix this.
> >> > >>
> >> > >> When I run 'mvn clean install', I get:
> >> > >>
> >> > >> [INFO] --- maven-checkstyle-plugin:2.15:check (default) @
> >> > >> commons-configuration2 ---
> >> > >> [INFO] There are 23 errors reported by Checkstyle 6.1.1 with
> >> > >> C:\vcs\svn\apache\commons\trunks-proper\configuration/
> >> > conf/checkstyle.xml
> >> > >> ruleset.
> >> > >> [ERROR]
> >> > >> src\main\java\org\apache\commons\configuration2\
> >> > >> AbstractHierarchicalConfiguration.java[976]
> >> > >> (regexp) RegexpSingleline: Line has trailing spaces.
> >> > >> [ERROR]
> >> > >> src\main\java\org\apache\commons\configuration2\
> >> > >> AbstractHierarchicalConfiguration.java[978:30]
> >> > >> (blocks) LeftCurly: '{' should be on a new line.
> >> > >> [ERROR]
> >> > >> src\main\java\org\apache\commons\configuration2\
> >> > >> AbstractYAMLBasedConfiguration.java[0]
> >> > >> (misc) NewlineAtEndOfFile: File does not end with a newline.
> >> > >> [ERROR]
> >> > >> src\main\java\org\apache\commons\configuration2\builder\fluent\
> >> > >> INIBuilderParameters.java[0]
> >> > >> (misc) NewlineAtEndOfFile: File does not end with a newline.
> >> > >> [ERROR]
> >> > >> src\main\java\org\apache\commons\configuration2\builder\
> >> > >> INIBuilderParametersImpl.java[0]
> >> > >> (misc) NewlineAtEndOfFile: File does not end with a newline.
> >> > >> [ERROR]
> >> > >> src\main\java\org\apache\commons\configuration2\builder\
> >> > >> INIBuilderParametersImpl.java[42:5]
> >> > >> (whitespace) FileTabCharacter: File contains tab characters (this
> is
> >> the
> >> > >> first instance).
> >> > >> [ERROR]
> >> > >> src\main\java\org\apache\commons\configuration2\builder\
> >> > >> INIBuilderParametersImpl.java[52:84]
> >> > >> (blocks) LeftCurly: '{' should be on a new line.
> >> > >> [ERROR]
> >> > >> src\main\java\org\apache\commons\configuration2\
> >> > >> builder\INIBuilderProperties.java[0]
> >> > >> (misc) NewlineAtEndOfFile: File does not end with a newline.
> >> > >> [ERROR]
> >> > >> src\main\java\org\apache\commons\configuration2\ex\
> >> > >> ConfigurationRuntimeException.java[68]
> >> > >> (regexp) RegexpSingleline: Line has trailing spaces.
> >> > >> [ERROR]
> >> > >> src\main\java\org\apache\commons\configuration2\
> >> > JSONConfiguration.java[0]
> >> > >> (misc) NewlineAtEndOfFile: File does not end with a newline.
> >> > >> [ERROR]
> >> > >> src\main\java\org\apache\commons\configuration2\
> >> > >> JSONConfiguration.java[43:5]
> >> > >> (javadoc) JavadocVariable: Missing a Javadoc comment.
> >> > >> [ERROR]
> >> > >> src\main\java\org\apache\commons\configuration2\
> >> > >> JSONConfiguration.java[44:5]
> >> > >> (javadoc) JavadocVariable: Missing a Javadoc comment.
> >> > >> [ERROR]
> >> > >> src\main\java\org\apache\commons\configuration2\tree\
> >> > >> ImmutableNode.java[106]
> >> > >> (regexp) RegexpSingleline: Line has trailing spaces.
> >> > >> [ERROR]
> >> > >> src\main\java\org\apache\commons\configuration2\tree\
> >> > >> ImmutableNode.java[114:27]
> >> > >> (blocks) LeftCurly: '{' should be on a new line.
> >> > >> [ERROR]
> >> > >> src\main\java\org\apache\commons\configuration2\tree\
> >> > >> ImmutableNode.java[117]
> >> > >> (regexp) RegexpSingleline: Line has trailing spaces.
> >> > >> [ERROR]
> >> > >> src\main\java\org\apache\commons\configuration2\tree\
> >> > >> ImmutableNode.java[666]
> >> > >> (regexp) RegexpSingleline: Line has trailing spaces.
> >> > >> [ERROR]
> >> > >> src\main\java\org\apache\commons\configuration2\
> >> > >> XMLConfiguration.java[1169:15]
> >> > >> (whitespace) WhitespaceAround: 'if' is not followed by whitespace.
> >> > >> [ERROR]
> >> > >> src\main\java\org\apache\commons\configuration2\
> >> > >> XMLConfiguration.java[1210:15]
> >> > >> (whitespace) WhitespaceAround: 'if' is not followed by whitespace.
> >> > >> [ERROR]
> >> > >> src\main\java\org\apache\commons\configuration2\
> >> > >> XMLConfiguration.java[1212:19]
> >> > >> (whitespace) WhitespaceAround: 'if' is not followed by whitespace.
> >> > >> [ERROR]
> >> > >> src\main\java\org\apache\commons\configuration2\
> >> > >> XMLConfiguration.java[1311:20]
> >> > >> (whitespace) WhitespaceAround: 'if' is not followed by whitespace.
> >> > >> [ERROR]
> >> > >> src\main\java\org\apache\commons\configuration2\
> >> > XMLListReference.java[0]
> >> > >> (misc) NewlineAtEndOfFile: File does not end with a newline.
> >> > >> [ERROR]
> >> > >> src\main\java\org\apache\commons\configuration2\
> >> > XMLListReference.java[45]
> >> > >> (design) FinalClass: Class XMLListReference should be declared as
> >> final.
> >> > >> [ERROR]
> >> > >> src\main\java\org\apache\commons\configuration2\
> >> > YAMLConfiguration.java[0]
> >> > >> (misc) NewlineAtEndOfFile: File does not end with a newline.
> >> > >> [WARNING] checkstyle:check violations detected but failOnViolation
> set
> >> > to
> >> > >> false
> >> > >>
> >> > >> Gary
> >> > >>
> >> > >
> >> >
> >> > ---------------------------------------------------------------------
> >> > To unsubscribe, e-mail: [hidden email]
> >> > For additional commands, e-mail: [hidden email]
> >> >
> >> >
> >>
> >>
> >> --
> >> I like: Like Like - The likeliest place on the web
> >> <http://like-like.xenei.com>
> >> LinkedIn: http://www.linkedin.com/in/claudewarren
> >>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [hidden email]
> For additional commands, e-mail: [hidden email]
>
>
Reply | Threaded
Open this post in threaded view
|

Re: [configuration] checkstyle fails build

Simon Spero
In reply to this post by Oliver Heger-3
On Jun 23, 2017 11:03 AM, "Oliver Heger" <[hidden email]>
wrote:

However, letting the build fail because of checkstyle error is too
restrictive IMHO. My approach is to work through the errors before creating
a new release. This has the disadvantage that errors might accumulate; but
from one release to the next one there is typically not that much.


That's still my gut feeling- checkstyle build fails are infuriating - but
annoyingly there are issues doing things at the release stage that are
worse  😡

The big problem is related to recent discussions about code styles and
commits, and the diff bloats and blame/praise shifting that happen when
formatting drifts during a development cycle.  Things turn out much better
if formatting / style checking is done before a commit, or at least fails
the build so that things can be fixed and disappeared if a PR is merged as
a SquashBase (so a change  + a revert cancels out ).

IntelliJ has a checkstyle plugin, which, um, checks for checkstyle
violations. This can run as a real time inspection, or during pre-commit
analysis. It can also adjust code formatting options to match the
checkstyle profile,which helps avoid many issues in the first place.
Eclipse has  similar support, but I am not an Eclipse user so I don't know
the details.

The validate phase checkstyle execution then becomes more of a backstop
(validation is usually the right phase, since that is prior to
compilation).  It's a lot less annoying if it doesn't have too many
"violations".

Since checkstyle can be configured to allow a small number of violations,
and to only treat rule-breakings above a certain severity  as violations
(error by default, but a pre-release execution could increase fussiness to
include warnings).

One thing that is tricky, but which can be worth it, is having a pseudo
flag-day reformatting, where you use an ide to apply the code style to the
entire project, then apply the changes all at once (possibly using a
disposable committer, though this isn't as important if the annotate view
you use shows a bit of commit message).

It is a bit more effort if there a bunch of unmerged branches, but since
the formatting changes  are automated, they can be applied on the branch so
it's not *that* horrible to get a mergeable branch back.

History checking for a few lines may require going one revision back, but
having all the format fixes in a single commit is a lot better than having
them mixed in with real changes.

Simon
 P. S.

I prefer the builtin /google_checks.xml styleguide to the older sun_checks,
partly because it's more up to date, and partly because Google provides
native  ide configuration files for Eclipse and intellij so there's no need
to import the checkstyle file.
The Checkstyle plugin  tracks the Google style guide pretty closely, so as
long as the plugin is up to date, there won't be much divergence. The most
significant changes happen when there are new constructs to consider (e.g.
lambda).

P.P.S.
I do think the google rules are wrong about horizontal alignment (at least
for continuation lines). It makes a huge difference when you have to use
obnoxious amounts of chained methods (can't say fluent without saying flu).


P.P.S.
I do like their tip on the appropriate use of finalize:

*Tip:* Don't do it. If you absolutely must, first read and understand
*Effective
Java* Item 7, <http://books.google.com/books?isbn=8131726592> "Avoid
Finalizers," very carefully, and *then* don't do it.

I say finalizers are OK as long as they  warn, and don't actually  do
anything ("you didn't commit a batch insert of 10M items. Were you sure?
Yes / Tough").
Reply | Threaded
Open this post in threaded view
|

Re: [configuration] checkstyle fails build

garydgregory
I

P.S.

Agree

P.P.S.

With

P.P.P.S.

you!

Gary

On Jun 23, 2017 10:28, "Simon Spero" <[hidden email]> wrote:

> On Jun 23, 2017 11:03 AM, "Oliver Heger" <[hidden email]>
> wrote:
>
> However, letting the build fail because of checkstyle error is too
> restrictive IMHO. My approach is to work through the errors before creating
> a new release. This has the disadvantage that errors might accumulate; but
> from one release to the next one there is typically not that much.
>
>
> That's still my gut feeling- checkstyle build fails are infuriating - but
> annoyingly there are issues doing things at the release stage that are
> worse  😡
>
> The big problem is related to recent discussions about code styles and
> commits, and the diff bloats and blame/praise shifting that happen when
> formatting drifts during a development cycle.  Things turn out much better
> if formatting / style checking is done before a commit, or at least fails
> the build so that things can be fixed and disappeared if a PR is merged as
> a SquashBase (so a change  + a revert cancels out ).
>
> IntelliJ has a checkstyle plugin, which, um, checks for checkstyle
> violations. This can run as a real time inspection, or during pre-commit
> analysis. It can also adjust code formatting options to match the
> checkstyle profile,which helps avoid many issues in the first place.
> Eclipse has  similar support, but I am not an Eclipse user so I don't know
> the details.
>
> The validate phase checkstyle execution then becomes more of a backstop
> (validation is usually the right phase, since that is prior to
> compilation).  It's a lot less annoying if it doesn't have too many
> "violations".
>
> Since checkstyle can be configured to allow a small number of violations,
> and to only treat rule-breakings above a certain severity  as violations
> (error by default, but a pre-release execution could increase fussiness to
> include warnings).
>
> One thing that is tricky, but which can be worth it, is having a pseudo
> flag-day reformatting, where you use an ide to apply the code style to the
> entire project, then apply the changes all at once (possibly using a
> disposable committer, though this isn't as important if the annotate view
> you use shows a bit of commit message).
>
> It is a bit more effort if there a bunch of unmerged branches, but since
> the formatting changes  are automated, they can be applied on the branch so
> it's not *that* horrible to get a mergeable branch back.
>
> History checking for a few lines may require going one revision back, but
> having all the format fixes in a single commit is a lot better than having
> them mixed in with real changes.
>
> Simon
>  P. S.
>
> I prefer the builtin /google_checks.xml styleguide to the older sun_checks,
> partly because it's more up to date, and partly because Google provides
> native  ide configuration files for Eclipse and intellij so there's no need
> to import the checkstyle file.
> The Checkstyle plugin  tracks the Google style guide pretty closely, so as
> long as the plugin is up to date, there won't be much divergence. The most
> significant changes happen when there are new constructs to consider (e.g.
> lambda).
>
> P.P.S.
> I do think the google rules are wrong about horizontal alignment (at least
> for continuation lines). It makes a huge difference when you have to use
> obnoxious amounts of chained methods (can't say fluent without saying flu).
>
>
> P.P.S.
> I do like their tip on the appropriate use of finalize:
>
> *Tip:* Don't do it. If you absolutely must, first read and understand
> *Effective
> Java* Item 7, <http://books.google.com/books?isbn=8131726592> "Avoid
> Finalizers," very carefully, and *then* don't do it.
>
> I say finalizers are OK as long as they  warn, and don't actually  do
> anything ("you didn't commit a batch insert of 10M items. Were you sure?
> Yes / Tough").
>
Reply | Threaded
Open this post in threaded view
|

Re: [configuration] checkstyle fails build

Oliver Heger-3
Should changes related to the setup and handling of checkstyle then be
done for Commons as a whole?

Oliver

(No P.S.)

Am 23.06.2017 um 21:19 schrieb Gary Gregory:

> I
>
> P.S.
>
> Agree
>
> P.P.S.
>
> With
>
> P.P.P.S.
>
> you!
>
> Gary
>
> On Jun 23, 2017 10:28, "Simon Spero" <[hidden email]> wrote:
>
>> On Jun 23, 2017 11:03 AM, "Oliver Heger" <[hidden email]>
>> wrote:
>>
>> However, letting the build fail because of checkstyle error is too
>> restrictive IMHO. My approach is to work through the errors before creating
>> a new release. This has the disadvantage that errors might accumulate; but
>> from one release to the next one there is typically not that much.
>>
>>
>> That's still my gut feeling- checkstyle build fails are infuriating - but
>> annoyingly there are issues doing things at the release stage that are
>> worse  😡
>>
>> The big problem is related to recent discussions about code styles and
>> commits, and the diff bloats and blame/praise shifting that happen when
>> formatting drifts during a development cycle.  Things turn out much better
>> if formatting / style checking is done before a commit, or at least fails
>> the build so that things can be fixed and disappeared if a PR is merged as
>> a SquashBase (so a change  + a revert cancels out ).
>>
>> IntelliJ has a checkstyle plugin, which, um, checks for checkstyle
>> violations. This can run as a real time inspection, or during pre-commit
>> analysis. It can also adjust code formatting options to match the
>> checkstyle profile,which helps avoid many issues in the first place.
>> Eclipse has  similar support, but I am not an Eclipse user so I don't know
>> the details.
>>
>> The validate phase checkstyle execution then becomes more of a backstop
>> (validation is usually the right phase, since that is prior to
>> compilation).  It's a lot less annoying if it doesn't have too many
>> "violations".
>>
>> Since checkstyle can be configured to allow a small number of violations,
>> and to only treat rule-breakings above a certain severity  as violations
>> (error by default, but a pre-release execution could increase fussiness to
>> include warnings).
>>
>> One thing that is tricky, but which can be worth it, is having a pseudo
>> flag-day reformatting, where you use an ide to apply the code style to the
>> entire project, then apply the changes all at once (possibly using a
>> disposable committer, though this isn't as important if the annotate view
>> you use shows a bit of commit message).
>>
>> It is a bit more effort if there a bunch of unmerged branches, but since
>> the formatting changes  are automated, they can be applied on the branch so
>> it's not *that* horrible to get a mergeable branch back.
>>
>> History checking for a few lines may require going one revision back, but
>> having all the format fixes in a single commit is a lot better than having
>> them mixed in with real changes.
>>
>> Simon
>>  P. S.
>>
>> I prefer the builtin /google_checks.xml styleguide to the older sun_checks,
>> partly because it's more up to date, and partly because Google provides
>> native  ide configuration files for Eclipse and intellij so there's no need
>> to import the checkstyle file.
>> The Checkstyle plugin  tracks the Google style guide pretty closely, so as
>> long as the plugin is up to date, there won't be much divergence. The most
>> significant changes happen when there are new constructs to consider (e.g.
>> lambda).
>>
>> P.P.S.
>> I do think the google rules are wrong about horizontal alignment (at least
>> for continuation lines). It makes a huge difference when you have to use
>> obnoxious amounts of chained methods (can't say fluent without saying flu).
>>
>>
>> P.P.S.
>> I do like their tip on the appropriate use of finalize:
>>
>> *Tip:* Don't do it. If you absolutely must, first read and understand
>> *Effective
>> Java* Item 7, <http://books.google.com/books?isbn=8131726592> "Avoid
>> Finalizers," very carefully, and *then* don't do it.
>>
>> I say finalizers are OK as long as they  warn, and don't actually  do
>> anything ("you didn't commit a batch insert of 10M items. Were you sure?
>> Yes / Tough").
>>
>


---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

Re: [configuration] checkstyle fails build

Claude Warren
In reply to this post by garydgregory
Eclipse lets you export the format rules as separate files.  My suggestion
was intended to mean that these files should be included, not the entire
.settings as that contains a number of local settings and my leak
confidential information. (I have not verified that it will leak
confidential information).

Another option would be to use something like:
http://code.revelc.net/formatter-maven-plugin/formatter-maven-plugin/usage.html
to format the code during the maven build.

On Fri, Jun 23, 2017 at 5:44 PM, Gary Gregory <[hidden email]>
wrote:

> On Fri, Jun 23, 2017 at 9:35 AM, sebb <[hidden email]> wrote:
>
> > On 23 June 2017 at 17:29, Gary Gregory <[hidden email]> wrote:
> > > On Fri, Jun 23, 2017 at 8:21 AM, Claude Warren <[hidden email]>
> wrote:
> > >
> > >> How about an eclipse format configuration that will correct the error
> on
> > >> demand.  Granted you have to run eclipse but if such a file were
> created
> > >> (and checked in) then it would be easy for anyone running eclipse to
> fix
> > >> it.
> > >>
> > >
> > > I use Eclipse and would appreciate such a file. In the past we've not
> > > included IDE files in the repo but making it easier would be nice.
> >
> > If added, these should be optional.
> > i.e. don't use the same name as Eclipse uses, but copy the required
> > settings to another file.
> >
> > See for example how Tomcat do it:
> >
> > http://svn.apache.org/repos/asf/tomcat/trunk/res/ide-support/eclipse/
>
>
> Putting the files in a separate folder is one thing but flattening the
> folders and changing file names is -1. Just put the Eclipse .settings
> folder I should be using so I can overlay it on top of my project.
> Otherwise, a user has to know where to sprinkle each file in each place.
> Maybe something like:
>
> .../eclipse/.classpath
> .../eclipse/.project
> .../eclipse/.settings/fileA
> .../eclipse/.settings/fileB
> .../eclipse/.settings/folderA
>
> and so on.
>
> Gary
>
> >
> >
> > > Gary
> > >
> > >>
> > >> Claude
> > >>
> > >> On Fri, Jun 23, 2017 at 4:03 PM, Oliver Heger <
> > >> [hidden email]>
> > >> wrote:
> > >>
> > >> >
> > >> >
> > >> > Am 23.06.2017 um 08:58 schrieb Allon Mureinik:
> > >> > > The root cause, IMHO, is having failValidation=false configured in
> > the
> > >> > > pom.xml. This way, when you introduce a new problem your only
> > option to
> > >> > > notice it is if you visually scan mvn's output. As evident by the
> > >> current
> > >> > > state of the build, not everyone notices these.
> > >> > > A more robust approach would be to set failValidation=true, and
> > >> actively
> > >> > > fail the build if checkstyle's rules are violated.
> > >> > >
> > >> > > I've submitted a PR to fix all the existing issues and enable this
> > >> > > validation. Reviews are welcome:
> > >> > > https://github.com/apache/commons-configuration/pull/5
> > >> > >
> > >> >
> > >> > Thanks for the PR, I will have a look.
> > >> >
> > >> > However, letting the build fail because of checkstyle error is too
> > >> > restrictive IMHO. My approach is to work through the errors before
> > >> > creating a new release. This has the disadvantage that errors might
> > >> > accumulate; but from one release to the next one there is typically
> > not
> > >> > that much.
> > >> >
> > >> > Oliver
> > >> >
> > >> > >
> > >> > > On Thu, Jun 22, 2017 at 11:10 PM, Gary Gregory <
> > [hidden email]
> > >> >
> > >> > > wrote:
> > >> > >
> > >> > >> FYI, to whom can take the time to fix this.
> > >> > >>
> > >> > >> When I run 'mvn clean install', I get:
> > >> > >>
> > >> > >> [INFO] --- maven-checkstyle-plugin:2.15:check (default) @
> > >> > >> commons-configuration2 ---
> > >> > >> [INFO] There are 23 errors reported by Checkstyle 6.1.1 with
> > >> > >> C:\vcs\svn\apache\commons\trunks-proper\configuration/
> > >> > conf/checkstyle.xml
> > >> > >> ruleset.
> > >> > >> [ERROR]
> > >> > >> src\main\java\org\apache\commons\configuration2\
> > >> > >> AbstractHierarchicalConfiguration.java[976]
> > >> > >> (regexp) RegexpSingleline: Line has trailing spaces.
> > >> > >> [ERROR]
> > >> > >> src\main\java\org\apache\commons\configuration2\
> > >> > >> AbstractHierarchicalConfiguration.java[978:30]
> > >> > >> (blocks) LeftCurly: '{' should be on a new line.
> > >> > >> [ERROR]
> > >> > >> src\main\java\org\apache\commons\configuration2\
> > >> > >> AbstractYAMLBasedConfiguration.java[0]
> > >> > >> (misc) NewlineAtEndOfFile: File does not end with a newline.
> > >> > >> [ERROR]
> > >> > >> src\main\java\org\apache\commons\configuration2\builder\fluent\
> > >> > >> INIBuilderParameters.java[0]
> > >> > >> (misc) NewlineAtEndOfFile: File does not end with a newline.
> > >> > >> [ERROR]
> > >> > >> src\main\java\org\apache\commons\configuration2\builder\
> > >> > >> INIBuilderParametersImpl.java[0]
> > >> > >> (misc) NewlineAtEndOfFile: File does not end with a newline.
> > >> > >> [ERROR]
> > >> > >> src\main\java\org\apache\commons\configuration2\builder\
> > >> > >> INIBuilderParametersImpl.java[42:5]
> > >> > >> (whitespace) FileTabCharacter: File contains tab characters (this
> > is
> > >> the
> > >> > >> first instance).
> > >> > >> [ERROR]
> > >> > >> src\main\java\org\apache\commons\configuration2\builder\
> > >> > >> INIBuilderParametersImpl.java[52:84]
> > >> > >> (blocks) LeftCurly: '{' should be on a new line.
> > >> > >> [ERROR]
> > >> > >> src\main\java\org\apache\commons\configuration2\
> > >> > >> builder\INIBuilderProperties.java[0]
> > >> > >> (misc) NewlineAtEndOfFile: File does not end with a newline.
> > >> > >> [ERROR]
> > >> > >> src\main\java\org\apache\commons\configuration2\ex\
> > >> > >> ConfigurationRuntimeException.java[68]
> > >> > >> (regexp) RegexpSingleline: Line has trailing spaces.
> > >> > >> [ERROR]
> > >> > >> src\main\java\org\apache\commons\configuration2\
> > >> > JSONConfiguration.java[0]
> > >> > >> (misc) NewlineAtEndOfFile: File does not end with a newline.
> > >> > >> [ERROR]
> > >> > >> src\main\java\org\apache\commons\configuration2\
> > >> > >> JSONConfiguration.java[43:5]
> > >> > >> (javadoc) JavadocVariable: Missing a Javadoc comment.
> > >> > >> [ERROR]
> > >> > >> src\main\java\org\apache\commons\configuration2\
> > >> > >> JSONConfiguration.java[44:5]
> > >> > >> (javadoc) JavadocVariable: Missing a Javadoc comment.
> > >> > >> [ERROR]
> > >> > >> src\main\java\org\apache\commons\configuration2\tree\
> > >> > >> ImmutableNode.java[106]
> > >> > >> (regexp) RegexpSingleline: Line has trailing spaces.
> > >> > >> [ERROR]
> > >> > >> src\main\java\org\apache\commons\configuration2\tree\
> > >> > >> ImmutableNode.java[114:27]
> > >> > >> (blocks) LeftCurly: '{' should be on a new line.
> > >> > >> [ERROR]
> > >> > >> src\main\java\org\apache\commons\configuration2\tree\
> > >> > >> ImmutableNode.java[117]
> > >> > >> (regexp) RegexpSingleline: Line has trailing spaces.
> > >> > >> [ERROR]
> > >> > >> src\main\java\org\apache\commons\configuration2\tree\
> > >> > >> ImmutableNode.java[666]
> > >> > >> (regexp) RegexpSingleline: Line has trailing spaces.
> > >> > >> [ERROR]
> > >> > >> src\main\java\org\apache\commons\configuration2\
> > >> > >> XMLConfiguration.java[1169:15]
> > >> > >> (whitespace) WhitespaceAround: 'if' is not followed by
> whitespace.
> > >> > >> [ERROR]
> > >> > >> src\main\java\org\apache\commons\configuration2\
> > >> > >> XMLConfiguration.java[1210:15]
> > >> > >> (whitespace) WhitespaceAround: 'if' is not followed by
> whitespace.
> > >> > >> [ERROR]
> > >> > >> src\main\java\org\apache\commons\configuration2\
> > >> > >> XMLConfiguration.java[1212:19]
> > >> > >> (whitespace) WhitespaceAround: 'if' is not followed by
> whitespace.
> > >> > >> [ERROR]
> > >> > >> src\main\java\org\apache\commons\configuration2\
> > >> > >> XMLConfiguration.java[1311:20]
> > >> > >> (whitespace) WhitespaceAround: 'if' is not followed by
> whitespace.
> > >> > >> [ERROR]
> > >> > >> src\main\java\org\apache\commons\configuration2\
> > >> > XMLListReference.java[0]
> > >> > >> (misc) NewlineAtEndOfFile: File does not end with a newline.
> > >> > >> [ERROR]
> > >> > >> src\main\java\org\apache\commons\configuration2\
> > >> > XMLListReference.java[45]
> > >> > >> (design) FinalClass: Class XMLListReference should be declared as
> > >> final.
> > >> > >> [ERROR]
> > >> > >> src\main\java\org\apache\commons\configuration2\
> > >> > YAMLConfiguration.java[0]
> > >> > >> (misc) NewlineAtEndOfFile: File does not end with a newline.
> > >> > >> [WARNING] checkstyle:check violations detected but
> failOnViolation
> > set
> > >> > to
> > >> > >> false
> > >> > >>
> > >> > >> Gary
> > >> > >>
> > >> > >
> > >> >
> > >> > ------------------------------------------------------------
> ---------
> > >> > To unsubscribe, e-mail: [hidden email]
> > >> > For additional commands, e-mail: [hidden email]
> > >> >
> > >> >
> > >>
> > >>
> > >> --
> > >> I like: Like Like - The likeliest place on the web
> > >> <http://like-like.xenei.com>
> > >> LinkedIn: http://www.linkedin.com/in/claudewarren
> > >>
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: [hidden email]
> > For additional commands, e-mail: [hidden email]
> >
> >
>



--
I like: Like Like - The likeliest place on the web
<http://like-like.xenei.com>
LinkedIn: http://www.linkedin.com/in/claudewarren
Reply | Threaded
Open this post in threaded view
|

Re: [configuration] checkstyle fails build

sebb-2-2
On 25 June 2017 at 10:09, Claude Warren <[hidden email]> wrote:
> Eclipse lets you export the format rules as separate files.  My suggestion
> was intended to mean that these files should be included, not the entire
> .settings as that contains a number of local settings and my leak
> confidential information. (I have not verified that it will leak
> confidential information).

Regardless of whether any information is leaked, Eclipse config files
are generally NOT portable between systems.
This is because they may contain local paths, and also people may wish
to include different features.

> Another option would be to use something like:
> http://code.revelc.net/formatter-maven-plugin/formatter-maven-plugin/usage.html
> to format the code during the maven build.
>
> On Fri, Jun 23, 2017 at 5:44 PM, Gary Gregory <[hidden email]>
> wrote:
>
>> On Fri, Jun 23, 2017 at 9:35 AM, sebb <[hidden email]> wrote:
>>
>> > On 23 June 2017 at 17:29, Gary Gregory <[hidden email]> wrote:
>> > > On Fri, Jun 23, 2017 at 8:21 AM, Claude Warren <[hidden email]>
>> wrote:
>> > >
>> > >> How about an eclipse format configuration that will correct the error
>> on
>> > >> demand.  Granted you have to run eclipse but if such a file were
>> created
>> > >> (and checked in) then it would be easy for anyone running eclipse to
>> fix
>> > >> it.
>> > >>
>> > >
>> > > I use Eclipse and would appreciate such a file. In the past we've not
>> > > included IDE files in the repo but making it easier would be nice.
>> >
>> > If added, these should be optional.
>> > i.e. don't use the same name as Eclipse uses, but copy the required
>> > settings to another file.
>> >
>> > See for example how Tomcat do it:
>> >
>> > http://svn.apache.org/repos/asf/tomcat/trunk/res/ide-support/eclipse/
>>
>>
>> Putting the files in a separate folder is one thing but flattening the
>> folders and changing file names is -1. Just put the Eclipse .settings
>> folder I should be using so I can overlay it on top of my project.
>> Otherwise, a user has to know where to sprinkle each file in each place.
>> Maybe something like:
>>
>> .../eclipse/.classpath
>> .../eclipse/.project
>> .../eclipse/.settings/fileA
>> .../eclipse/.settings/fileB
>> .../eclipse/.settings/folderA
>>
>> and so on.
>>
>> Gary
>>
>> >
>> >
>> > > Gary
>> > >
>> > >>
>> > >> Claude
>> > >>
>> > >> On Fri, Jun 23, 2017 at 4:03 PM, Oliver Heger <
>> > >> [hidden email]>
>> > >> wrote:
>> > >>
>> > >> >
>> > >> >
>> > >> > Am 23.06.2017 um 08:58 schrieb Allon Mureinik:
>> > >> > > The root cause, IMHO, is having failValidation=false configured in
>> > the
>> > >> > > pom.xml. This way, when you introduce a new problem your only
>> > option to
>> > >> > > notice it is if you visually scan mvn's output. As evident by the
>> > >> current
>> > >> > > state of the build, not everyone notices these.
>> > >> > > A more robust approach would be to set failValidation=true, and
>> > >> actively
>> > >> > > fail the build if checkstyle's rules are violated.
>> > >> > >
>> > >> > > I've submitted a PR to fix all the existing issues and enable this
>> > >> > > validation. Reviews are welcome:
>> > >> > > https://github.com/apache/commons-configuration/pull/5
>> > >> > >
>> > >> >
>> > >> > Thanks for the PR, I will have a look.
>> > >> >
>> > >> > However, letting the build fail because of checkstyle error is too
>> > >> > restrictive IMHO. My approach is to work through the errors before
>> > >> > creating a new release. This has the disadvantage that errors might
>> > >> > accumulate; but from one release to the next one there is typically
>> > not
>> > >> > that much.
>> > >> >
>> > >> > Oliver
>> > >> >
>> > >> > >
>> > >> > > On Thu, Jun 22, 2017 at 11:10 PM, Gary Gregory <
>> > [hidden email]
>> > >> >
>> > >> > > wrote:
>> > >> > >
>> > >> > >> FYI, to whom can take the time to fix this.
>> > >> > >>
>> > >> > >> When I run 'mvn clean install', I get:
>> > >> > >>
>> > >> > >> [INFO] --- maven-checkstyle-plugin:2.15:check (default) @
>> > >> > >> commons-configuration2 ---
>> > >> > >> [INFO] There are 23 errors reported by Checkstyle 6.1.1 with
>> > >> > >> C:\vcs\svn\apache\commons\trunks-proper\configuration/
>> > >> > conf/checkstyle.xml
>> > >> > >> ruleset.
>> > >> > >> [ERROR]
>> > >> > >> src\main\java\org\apache\commons\configuration2\
>> > >> > >> AbstractHierarchicalConfiguration.java[976]
>> > >> > >> (regexp) RegexpSingleline: Line has trailing spaces.
>> > >> > >> [ERROR]
>> > >> > >> src\main\java\org\apache\commons\configuration2\
>> > >> > >> AbstractHierarchicalConfiguration.java[978:30]
>> > >> > >> (blocks) LeftCurly: '{' should be on a new line.
>> > >> > >> [ERROR]
>> > >> > >> src\main\java\org\apache\commons\configuration2\
>> > >> > >> AbstractYAMLBasedConfiguration.java[0]
>> > >> > >> (misc) NewlineAtEndOfFile: File does not end with a newline.
>> > >> > >> [ERROR]
>> > >> > >> src\main\java\org\apache\commons\configuration2\builder\fluent\
>> > >> > >> INIBuilderParameters.java[0]
>> > >> > >> (misc) NewlineAtEndOfFile: File does not end with a newline.
>> > >> > >> [ERROR]
>> > >> > >> src\main\java\org\apache\commons\configuration2\builder\
>> > >> > >> INIBuilderParametersImpl.java[0]
>> > >> > >> (misc) NewlineAtEndOfFile: File does not end with a newline.
>> > >> > >> [ERROR]
>> > >> > >> src\main\java\org\apache\commons\configuration2\builder\
>> > >> > >> INIBuilderParametersImpl.java[42:5]
>> > >> > >> (whitespace) FileTabCharacter: File contains tab characters (this
>> > is
>> > >> the
>> > >> > >> first instance).
>> > >> > >> [ERROR]
>> > >> > >> src\main\java\org\apache\commons\configuration2\builder\
>> > >> > >> INIBuilderParametersImpl.java[52:84]
>> > >> > >> (blocks) LeftCurly: '{' should be on a new line.
>> > >> > >> [ERROR]
>> > >> > >> src\main\java\org\apache\commons\configuration2\
>> > >> > >> builder\INIBuilderProperties.java[0]
>> > >> > >> (misc) NewlineAtEndOfFile: File does not end with a newline.
>> > >> > >> [ERROR]
>> > >> > >> src\main\java\org\apache\commons\configuration2\ex\
>> > >> > >> ConfigurationRuntimeException.java[68]
>> > >> > >> (regexp) RegexpSingleline: Line has trailing spaces.
>> > >> > >> [ERROR]
>> > >> > >> src\main\java\org\apache\commons\configuration2\
>> > >> > JSONConfiguration.java[0]
>> > >> > >> (misc) NewlineAtEndOfFile: File does not end with a newline.
>> > >> > >> [ERROR]
>> > >> > >> src\main\java\org\apache\commons\configuration2\
>> > >> > >> JSONConfiguration.java[43:5]
>> > >> > >> (javadoc) JavadocVariable: Missing a Javadoc comment.
>> > >> > >> [ERROR]
>> > >> > >> src\main\java\org\apache\commons\configuration2\
>> > >> > >> JSONConfiguration.java[44:5]
>> > >> > >> (javadoc) JavadocVariable: Missing a Javadoc comment.
>> > >> > >> [ERROR]
>> > >> > >> src\main\java\org\apache\commons\configuration2\tree\
>> > >> > >> ImmutableNode.java[106]
>> > >> > >> (regexp) RegexpSingleline: Line has trailing spaces.
>> > >> > >> [ERROR]
>> > >> > >> src\main\java\org\apache\commons\configuration2\tree\
>> > >> > >> ImmutableNode.java[114:27]
>> > >> > >> (blocks) LeftCurly: '{' should be on a new line.
>> > >> > >> [ERROR]
>> > >> > >> src\main\java\org\apache\commons\configuration2\tree\
>> > >> > >> ImmutableNode.java[117]
>> > >> > >> (regexp) RegexpSingleline: Line has trailing spaces.
>> > >> > >> [ERROR]
>> > >> > >> src\main\java\org\apache\commons\configuration2\tree\
>> > >> > >> ImmutableNode.java[666]
>> > >> > >> (regexp) RegexpSingleline: Line has trailing spaces.
>> > >> > >> [ERROR]
>> > >> > >> src\main\java\org\apache\commons\configuration2\
>> > >> > >> XMLConfiguration.java[1169:15]
>> > >> > >> (whitespace) WhitespaceAround: 'if' is not followed by
>> whitespace.
>> > >> > >> [ERROR]
>> > >> > >> src\main\java\org\apache\commons\configuration2\
>> > >> > >> XMLConfiguration.java[1210:15]
>> > >> > >> (whitespace) WhitespaceAround: 'if' is not followed by
>> whitespace.
>> > >> > >> [ERROR]
>> > >> > >> src\main\java\org\apache\commons\configuration2\
>> > >> > >> XMLConfiguration.java[1212:19]
>> > >> > >> (whitespace) WhitespaceAround: 'if' is not followed by
>> whitespace.
>> > >> > >> [ERROR]
>> > >> > >> src\main\java\org\apache\commons\configuration2\
>> > >> > >> XMLConfiguration.java[1311:20]
>> > >> > >> (whitespace) WhitespaceAround: 'if' is not followed by
>> whitespace.
>> > >> > >> [ERROR]
>> > >> > >> src\main\java\org\apache\commons\configuration2\
>> > >> > XMLListReference.java[0]
>> > >> > >> (misc) NewlineAtEndOfFile: File does not end with a newline.
>> > >> > >> [ERROR]
>> > >> > >> src\main\java\org\apache\commons\configuration2\
>> > >> > XMLListReference.java[45]
>> > >> > >> (design) FinalClass: Class XMLListReference should be declared as
>> > >> final.
>> > >> > >> [ERROR]
>> > >> > >> src\main\java\org\apache\commons\configuration2\
>> > >> > YAMLConfiguration.java[0]
>> > >> > >> (misc) NewlineAtEndOfFile: File does not end with a newline.
>> > >> > >> [WARNING] checkstyle:check violations detected but
>> failOnViolation
>> > set
>> > >> > to
>> > >> > >> false
>> > >> > >>
>> > >> > >> Gary
>> > >> > >>
>> > >> > >
>> > >> >
>> > >> > ------------------------------------------------------------
>> ---------
>> > >> > To unsubscribe, e-mail: [hidden email]
>> > >> > For additional commands, e-mail: [hidden email]
>> > >> >
>> > >> >
>> > >>
>> > >>
>> > >> --
>> > >> I like: Like Like - The likeliest place on the web
>> > >> <http://like-like.xenei.com>
>> > >> LinkedIn: http://www.linkedin.com/in/claudewarren
>> > >>
>> >
>> > ---------------------------------------------------------------------
>> > To unsubscribe, e-mail: [hidden email]
>> > For additional commands, e-mail: [hidden email]
>> >
>> >
>>
>
>
>
> --
> I like: Like Like - The likeliest place on the web
> <http://like-like.xenei.com>
> LinkedIn: http://www.linkedin.com/in/claudewarren

---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

Re: [configuration] checkstyle fails build

Simon Spero
In reply to this post by Oliver Heger-3
On Jun 24, 2017 12:31 PM, "Oliver Heger" <[hidden email]>
wrote:

Should changes related to the setup and handling of checkstyle then be
done for Commons as a whole?

(No P.S.)


It is the sort of thing fits nearly I  a parent. Maven is one example (not
sure how much customization is needed).

Also, in Java 9 you can get rid of the NoPS with the spin-wait hinting.

Simon
Reply | Threaded
Open this post in threaded view
|

Re: [configuration] checkstyle fails build

Oliver Heger-3
In reply to this post by Allon Mureinik


Am 23.06.2017 um 17:24 schrieb Allon Mureinik:

> On Fri, Jun 23, 2017 at 6:03 PM, Oliver Heger <[hidden email]>
> wrote:
>
>>
>>
>> Am 23.06.2017 um 08:58 schrieb Allon Mureinik:
>>> The root cause, IMHO, is having failValidation=false configured in the
>>> pom.xml. This way, when you introduce a new problem your only option to
>>> notice it is if you visually scan mvn's output. As evident by the current
>>> state of the build, not everyone notices these.
>>> A more robust approach would be to set failValidation=true, and actively
>>> fail the build if checkstyle's rules are violated.
>>>
>>> I've submitted a PR to fix all the existing issues and enable this
>>> validation. Reviews are welcome:
>>> https://github.com/apache/commons-configuration/pull/5
>>>
>>
>> Thanks for the PR, I will have a look.
>>
>> However, letting the build fail because of checkstyle error is too
>> restrictive IMHO. My approach is to work through the errors before
>> creating a new release. This has the disadvantage that errors might
>> accumulate; but from one release to the next one there is typically not
>> that much.
>>
>> Oliver
>>
>
> This is ultimately a matter of taste, but let me try to explain this point
> of view better.
> The baseline is that the project should pass checkstyle with no issues (the
> first three patches in this PR will get us there).
>
> From that point on, the goal is not accept any patch that would break the
> styling.
> Think of it way - If you were reviewing a patch that didn't comply to the
> project's style, you'd comment about it and ask the author to fix it before
> merging.
> Having checkstyle do this *as part of the CI* has the same effect, but it
> takes some responsibility off the maintainers' shoulders.
> First, contributers can easily see if they need to improve their patch by
> running mvn install (arguably, they could do this even without enabling
> checkstyle validations, but it makes it much easier to notice). Second, and
> more importantly, it allows the CI to block such patches, so maintainers
> can decide whether to reject them (or even fix them themselves, if they are
> so inclined) so that checking checkstyle before the release becomes a
> non-issue - it just always passes.
>
>
The fixes for checkstyle issues have been applied. Many thanks again.

Regarding the change of the checkstyle failure behavior, I prefer
waiting for a more global decision.

Oliver

>
>>
>>>
>>> On Thu, Jun 22, 2017 at 11:10 PM, Gary Gregory <[hidden email]>
>>> wrote:
>>>
>>>> FYI, to whom can take the time to fix this.
>>>>
>>>> When I run 'mvn clean install', I get:
>>>>
>>>> [INFO] --- maven-checkstyle-plugin:2.15:check (default) @
>>>> commons-configuration2 ---
>>>> [INFO] There are 23 errors reported by Checkstyle 6.1.1 with
>>>> C:\vcs\svn\apache\commons\trunks-proper\configuration/conf/
>> checkstyle.xml
>>>> ruleset.
>>>> [ERROR]
>>>> src\main\java\org\apache\commons\configuration2\
>>>> AbstractHierarchicalConfiguration.java[976]
>>>> (regexp) RegexpSingleline: Line has trailing spaces.
>>>> [ERROR]
>>>> src\main\java\org\apache\commons\configuration2\
>>>> AbstractHierarchicalConfiguration.java[978:30]
>>>> (blocks) LeftCurly: '{' should be on a new line.
>>>> [ERROR]
>>>> src\main\java\org\apache\commons\configuration2\
>>>> AbstractYAMLBasedConfiguration.java[0]
>>>> (misc) NewlineAtEndOfFile: File does not end with a newline.
>>>> [ERROR]
>>>> src\main\java\org\apache\commons\configuration2\builder\fluent\
>>>> INIBuilderParameters.java[0]
>>>> (misc) NewlineAtEndOfFile: File does not end with a newline.
>>>> [ERROR]
>>>> src\main\java\org\apache\commons\configuration2\builder\
>>>> INIBuilderParametersImpl.java[0]
>>>> (misc) NewlineAtEndOfFile: File does not end with a newline.
>>>> [ERROR]
>>>> src\main\java\org\apache\commons\configuration2\builder\
>>>> INIBuilderParametersImpl.java[42:5]
>>>> (whitespace) FileTabCharacter: File contains tab characters (this is the
>>>> first instance).
>>>> [ERROR]
>>>> src\main\java\org\apache\commons\configuration2\builder\
>>>> INIBuilderParametersImpl.java[52:84]
>>>> (blocks) LeftCurly: '{' should be on a new line.
>>>> [ERROR]
>>>> src\main\java\org\apache\commons\configuration2\
>>>> builder\INIBuilderProperties.java[0]
>>>> (misc) NewlineAtEndOfFile: File does not end with a newline.
>>>> [ERROR]
>>>> src\main\java\org\apache\commons\configuration2\ex\
>>>> ConfigurationRuntimeException.java[68]
>>>> (regexp) RegexpSingleline: Line has trailing spaces.
>>>> [ERROR]
>>>> src\main\java\org\apache\commons\configuration2\JSONConfigur
>> ation.java[0]
>>>> (misc) NewlineAtEndOfFile: File does not end with a newline.
>>>> [ERROR]
>>>> src\main\java\org\apache\commons\configuration2\
>>>> JSONConfiguration.java[43:5]
>>>> (javadoc) JavadocVariable: Missing a Javadoc comment.
>>>> [ERROR]
>>>> src\main\java\org\apache\commons\configuration2\
>>>> JSONConfiguration.java[44:5]
>>>> (javadoc) JavadocVariable: Missing a Javadoc comment.
>>>> [ERROR]
>>>> src\main\java\org\apache\commons\configuration2\tree\
>>>> ImmutableNode.java[106]
>>>> (regexp) RegexpSingleline: Line has trailing spaces.
>>>> [ERROR]
>>>> src\main\java\org\apache\commons\configuration2\tree\
>>>> ImmutableNode.java[114:27]
>>>> (blocks) LeftCurly: '{' should be on a new line.
>>>> [ERROR]
>>>> src\main\java\org\apache\commons\configuration2\tree\
>>>> ImmutableNode.java[117]
>>>> (regexp) RegexpSingleline: Line has trailing spaces.
>>>> [ERROR]
>>>> src\main\java\org\apache\commons\configuration2\tree\
>>>> ImmutableNode.java[666]
>>>> (regexp) RegexpSingleline: Line has trailing spaces.
>>>> [ERROR]
>>>> src\main\java\org\apache\commons\configuration2\
>>>> XMLConfiguration.java[1169:15]
>>>> (whitespace) WhitespaceAround: 'if' is not followed by whitespace.
>>>> [ERROR]
>>>> src\main\java\org\apache\commons\configuration2\
>>>> XMLConfiguration.java[1210:15]
>>>> (whitespace) WhitespaceAround: 'if' is not followed by whitespace.
>>>> [ERROR]
>>>> src\main\java\org\apache\commons\configuration2\
>>>> XMLConfiguration.java[1212:19]
>>>> (whitespace) WhitespaceAround: 'if' is not followed by whitespace.
>>>> [ERROR]
>>>> src\main\java\org\apache\commons\configuration2\
>>>> XMLConfiguration.java[1311:20]
>>>> (whitespace) WhitespaceAround: 'if' is not followed by whitespace.
>>>> [ERROR]
>>>> src\main\java\org\apache\commons\configuration2\XMLListRefer
>> ence.java[0]
>>>> (misc) NewlineAtEndOfFile: File does not end with a newline.
>>>> [ERROR]
>>>> src\main\java\org\apache\commons\configuration2\XMLListRefer
>> ence.java[45]
>>>> (design) FinalClass: Class XMLListReference should be declared as final.
>>>> [ERROR]
>>>> src\main\java\org\apache\commons\configuration2\YAMLConfigur
>> ation.java[0]
>>>> (misc) NewlineAtEndOfFile: File does not end with a newline.
>>>> [WARNING] checkstyle:check violations detected but failOnViolation set
>> to
>>>> false
>>>>
>>>> Gary
>>>>
>>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: [hidden email]
>> For additional commands, e-mail: [hidden email]
>>
>>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]