[Numbers] Local build failing due to Checstyle violations

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

[Numbers] Local build failing due to Checstyle violations

garydgregory
[INFO] --- maven-checkstyle-plugin:3.1.0:check (default) @
commons-numbers-complex ---
[INFO] There are 3 errors reported by Checkstyle 8.29 with
C:\git\commons-numbers\commons-numbers-complex/../src/main/resources/checkstyle/checkstyle.xml
ruleset.
[ERROR] src\main\java\org\apache\commons\numbers\complex\Complex.java:[1]
(sizes) FileLength: File length is 3,666 lines (max allowed is 2,000).
[ERROR]
src\main\java\org\apache\commons\numbers\complex\Complex.java:[1728,5]
(sizes) MethodLength: Method length is 163 lines (max allowed is 150).
[ERROR]
src\test\java\org\apache\commons\numbers\complex\ComplexTest.java:[1]
(sizes) FileLength: File length is 2,157 lines (max allowed is 2,000).

Please fix.

Gary
Reply | Threaded
Open this post in threaded view
|

Re: [Numbers] Local build failing due to Checstyle violations

Matt Juntunen
That is interesting. I've never run into this. There are explicit suppressions for those checks in src/main/resources/checkstyle/checkstyle-suppressions.xml. Do you have any more details? What mvn command are you running?

-Matt
________________________________
From: Gary Gregory <[hidden email]>
Sent: Monday, March 30, 2020 3:17 PM
To: Commons Developers List <[hidden email]>
Subject: [Numbers] Local build failing due to Checstyle violations

[INFO] --- maven-checkstyle-plugin:3.1.0:check (default) @
commons-numbers-complex ---
[INFO] There are 3 errors reported by Checkstyle 8.29 with
C:\git\commons-numbers\commons-numbers-complex/../src/main/resources/checkstyle/checkstyle.xml
ruleset.
[ERROR] src\main\java\org\apache\commons\numbers\complex\Complex.java:[1]
(sizes) FileLength: File length is 3,666 lines (max allowed is 2,000).
[ERROR]
src\main\java\org\apache\commons\numbers\complex\Complex.java:[1728,5]
(sizes) MethodLength: Method length is 163 lines (max allowed is 150).
[ERROR]
src\test\java\org\apache\commons\numbers\complex\ComplexTest.java:[1]
(sizes) FileLength: File length is 2,157 lines (max allowed is 2,000).

Please fix.

Gary
Reply | Threaded
Open this post in threaded view
|

Re: [Numbers] Local build failing due to Checstyle violations

garydgregory
On Mon, Mar 30, 2020 at 3:37 PM Matt Juntunen <[hidden email]>
wrote:

> That is interesting. I've never run into this. There are explicit
> suppressions for those checks in
> src/main/resources/checkstyle/checkstyle-suppressions.xml. Do you have any
> more details? What mvn command are you running?
>

C:\git\commons-numbers>mvn -V clean install
Apache Maven 3.6.3 (cecedd343002696d0abb50b32b541b8a6ba2883f)
Maven home: C:\Java\apache-maven-3.6.3\bin\..
Java version: 1.8.0_241, vendor: Oracle Corporation, runtime: C:\Program
Files\Java\jdk1.8.0_241\jre
Default locale: en_US, platform encoding: Cp1252
OS name: "windows 10", version: "10.0", arch: "amd64", family: "windows"

Gary


>
> -Matt
> ________________________________
> From: Gary Gregory <[hidden email]>
> Sent: Monday, March 30, 2020 3:17 PM
> To: Commons Developers List <[hidden email]>
> Subject: [Numbers] Local build failing due to Checstyle violations
>
> [INFO] --- maven-checkstyle-plugin:3.1.0:check (default) @
> commons-numbers-complex ---
> [INFO] There are 3 errors reported by Checkstyle 8.29 with
>
> C:\git\commons-numbers\commons-numbers-complex/../src/main/resources/checkstyle/checkstyle.xml
> ruleset.
> [ERROR] src\main\java\org\apache\commons\numbers\complex\Complex.java:[1]
> (sizes) FileLength: File length is 3,666 lines (max allowed is 2,000).
> [ERROR]
> src\main\java\org\apache\commons\numbers\complex\Complex.java:[1728,5]
> (sizes) MethodLength: Method length is 163 lines (max allowed is 150).
> [ERROR]
> src\test\java\org\apache\commons\numbers\complex\ComplexTest.java:[1]
> (sizes) FileLength: File length is 2,157 lines (max allowed is 2,000).
>
> Please fix.
>
> Gary
>
Reply | Threaded
Open this post in threaded view
|

Re: [Numbers] Local build failing due to Checstyle violations

Matt Juntunen
I bet it's a Windows path thing. The file length suppression rule, for example, uses the regex ".*/Complex(Test)?.java", which would not match Windows-style paths. We need to use separator-agnostic regexes like ".*[/\\]Complex(Test)?.java". I don't have a Windows dev environment handy to verify this, though. Can anyone confirm?

If not, I can set up a Windows environment later tonight and fix this.

-Matt
________________________________
From: Gary Gregory <[hidden email]>
Sent: Monday, March 30, 2020 4:14 PM
To: Commons Developers List <[hidden email]>
Subject: Re: [Numbers] Local build failing due to Checstyle violations

On Mon, Mar 30, 2020 at 3:37 PM Matt Juntunen <[hidden email]>
wrote:

> That is interesting. I've never run into this. There are explicit
> suppressions for those checks in
> src/main/resources/checkstyle/checkstyle-suppressions.xml. Do you have any
> more details? What mvn command are you running?
>

C:\git\commons-numbers>mvn -V clean install
Apache Maven 3.6.3 (cecedd343002696d0abb50b32b541b8a6ba2883f)
Maven home: C:\Java\apache-maven-3.6.3\bin\..
Java version: 1.8.0_241, vendor: Oracle Corporation, runtime: C:\Program
Files\Java\jdk1.8.0_241\jre
Default locale: en_US, platform encoding: Cp1252
OS name: "windows 10", version: "10.0", arch: "amd64", family: "windows"

Gary


>
> -Matt
> ________________________________
> From: Gary Gregory <[hidden email]>
> Sent: Monday, March 30, 2020 3:17 PM
> To: Commons Developers List <[hidden email]>
> Subject: [Numbers] Local build failing due to Checstyle violations
>
> [INFO] --- maven-checkstyle-plugin:3.1.0:check (default) @
> commons-numbers-complex ---
> [INFO] There are 3 errors reported by Checkstyle 8.29 with
>
> C:\git\commons-numbers\commons-numbers-complex/../src/main/resources/checkstyle/checkstyle.xml
> ruleset.
> [ERROR] src\main\java\org\apache\commons\numbers\complex\Complex.java:[1]
> (sizes) FileLength: File length is 3,666 lines (max allowed is 2,000).
> [ERROR]
> src\main\java\org\apache\commons\numbers\complex\Complex.java:[1728,5]
> (sizes) MethodLength: Method length is 163 lines (max allowed is 150).
> [ERROR]
> src\test\java\org\apache\commons\numbers\complex\ComplexTest.java:[1]
> (sizes) FileLength: File length is 2,157 lines (max allowed is 2,000).
>
> Please fix.
>
> Gary
>
Reply | Threaded
Open this post in threaded view
|

Re: [Numbers] Local build failing due to Checstyle violations

Matt Juntunen
I got it set up faster than I thought. I pushed a fix to master and I'll pull it into the next RC. Let me know if it works for you or not.

-Matt
________________________________
From: Matt Juntunen <[hidden email]>
Sent: Monday, March 30, 2020 4:23 PM
To: Commons Developers List <[hidden email]>
Subject: Re: [Numbers] Local build failing due to Checstyle violations

I bet it's a Windows path thing. The file length suppression rule, for example, uses the regex ".*/Complex(Test)?.java", which would not match Windows-style paths. We need to use separator-agnostic regexes like ".*[/\\]Complex(Test)?.java". I don't have a Windows dev environment handy to verify this, though. Can anyone confirm?

If not, I can set up a Windows environment later tonight and fix this.

-Matt
________________________________
From: Gary Gregory <[hidden email]>
Sent: Monday, March 30, 2020 4:14 PM
To: Commons Developers List <[hidden email]>
Subject: Re: [Numbers] Local build failing due to Checstyle violations

On Mon, Mar 30, 2020 at 3:37 PM Matt Juntunen <[hidden email]>
wrote:

> That is interesting. I've never run into this. There are explicit
> suppressions for those checks in
> src/main/resources/checkstyle/checkstyle-suppressions.xml. Do you have any
> more details? What mvn command are you running?
>

C:\git\commons-numbers>mvn -V clean install
Apache Maven 3.6.3 (cecedd343002696d0abb50b32b541b8a6ba2883f)
Maven home: C:\Java\apache-maven-3.6.3\bin\..
Java version: 1.8.0_241, vendor: Oracle Corporation, runtime: C:\Program
Files\Java\jdk1.8.0_241\jre
Default locale: en_US, platform encoding: Cp1252
OS name: "windows 10", version: "10.0", arch: "amd64", family: "windows"

Gary


>
> -Matt
> ________________________________
> From: Gary Gregory <[hidden email]>
> Sent: Monday, March 30, 2020 3:17 PM
> To: Commons Developers List <[hidden email]>
> Subject: [Numbers] Local build failing due to Checstyle violations
>
> [INFO] --- maven-checkstyle-plugin:3.1.0:check (default) @
> commons-numbers-complex ---
> [INFO] There are 3 errors reported by Checkstyle 8.29 with
>
> C:\git\commons-numbers\commons-numbers-complex/../src/main/resources/checkstyle/checkstyle.xml
> ruleset.
> [ERROR] src\main\java\org\apache\commons\numbers\complex\Complex.java:[1]
> (sizes) FileLength: File length is 3,666 lines (max allowed is 2,000).
> [ERROR]
> src\main\java\org\apache\commons\numbers\complex\Complex.java:[1728,5]
> (sizes) MethodLength: Method length is 163 lines (max allowed is 150).
> [ERROR]
> src\test\java\org\apache\commons\numbers\complex\ComplexTest.java:[1]
> (sizes) FileLength: File length is 2,157 lines (max allowed is 2,000).
>
> Please fix.
>
> Gary
>