Collab advanced #241
+233
−37
Open
Collab advanced #241
Jenkins - GLSP / CheckStyle
failed
Oct 18, 2024 in 0s
No new issues, 6 total
Total | New | Outstanding | Fixed | Trend |
---|---|---|---|---|
6 | 0 | 6 | 0 | 💤 |
Details
Severity distribution of all issues
Error | Warning High | Warning Normal | Warning Low |
---|---|---|---|
0 | 0 | 6 | 0 |
Annotations
jenkins-glsp / CheckStyle
RegexpHeaderCheck
NORMAL:
Line does not match expected header line of '^\/\*{2,80}$'.
Raw output
<p>Since Checkstyle 6.9</p><p> Checks the header of a source file against a header that contains a <a href="https://docs.oracle.com/javase/7/docs/api/java/util/regex/Pattern.html">regular expression</a> for each line of the source header. </p><p> Rationale: In some projects <a href="#Header">checking against a fixed header</a> is not sufficient, e.g. the header might require a copyright line where the year information is not static. </p><p> For example, consider the following header: </p><pre><code> line 1: ^/{71}$ line 2: ^// checkstyle:$ line 3: ^// Checks Java source code for adherence to a set of rules\.$ line 4: ^// Copyright \(C\) \d\d\d\d Oliver Burn$ line 5: ^// Last modification by \$Author.*\$$ line 6: ^/{71}$ line 7: line 8: ^package line 9: line 10: ^import line 11: line 12: ^/\*\* line 13: ^ \*([^/]|$) line 14: ^ \*/ </code></pre><p> Lines 1 and 6 demonstrate a more compact notation for 71 '/' characters. Line 4 enforces that the copyright notice includes a four digit year. Line 5 is an example how to enforce revision control keywords in a file header. Lines 12-14 is a template for javadoc (line 13 is so complicated to remove conflict with and of javadoc comment). Lines 7, 9 and 11 will be treated as '^$' and will forcefully expect the line to be empty. </p><p> Different programming languages have different comment syntax rules, but all of them start a comment with a non-word character. Hence you can often use the non-word character class to abstract away the concrete comment syntax and allow checking the header for different languages with a single header definition. For example, consider the following header specification (note that this is not the full Apache license header): </p><pre><code> line 1: ^#! line 2: ^<\?xml.*>$ line 3: ^\W*$ line 4: ^\W*Copyright 2006 The Apache Software Foundation or its licensors, as applicable\.$ line 5: ^\W*Licensed under the Apache License, Version 2\.0 \(the "License"\);$ line 6: ^\W*$ </code></pre><p> Lines 1 and 2 leave room for technical header lines, e.g. the "#!/bin/sh" line in Unix shell scripts, or the XML file header of XML files. Set the multiline property to "1, 2" so these lines can be ignored for file types where they do no apply. Lines 3 through 6 define the actual header content. Note how lines 2, 4 and 5 use escapes for characters that have special regexp semantics. </p>
jenkins-glsp / CheckStyle
RegexpHeaderCheck
NORMAL:
Line does not match expected header line of '^\/\*{2,80}$'.
Raw output
<p>Since Checkstyle 6.9</p><p> Checks the header of a source file against a header that contains a <a href="https://docs.oracle.com/javase/7/docs/api/java/util/regex/Pattern.html">regular expression</a> for each line of the source header. </p><p> Rationale: In some projects <a href="#Header">checking against a fixed header</a> is not sufficient, e.g. the header might require a copyright line where the year information is not static. </p><p> For example, consider the following header: </p><pre><code> line 1: ^/{71}$ line 2: ^// checkstyle:$ line 3: ^// Checks Java source code for adherence to a set of rules\.$ line 4: ^// Copyright \(C\) \d\d\d\d Oliver Burn$ line 5: ^// Last modification by \$Author.*\$$ line 6: ^/{71}$ line 7: line 8: ^package line 9: line 10: ^import line 11: line 12: ^/\*\* line 13: ^ \*([^/]|$) line 14: ^ \*/ </code></pre><p> Lines 1 and 6 demonstrate a more compact notation for 71 '/' characters. Line 4 enforces that the copyright notice includes a four digit year. Line 5 is an example how to enforce revision control keywords in a file header. Lines 12-14 is a template for javadoc (line 13 is so complicated to remove conflict with and of javadoc comment). Lines 7, 9 and 11 will be treated as '^$' and will forcefully expect the line to be empty. </p><p> Different programming languages have different comment syntax rules, but all of them start a comment with a non-word character. Hence you can often use the non-word character class to abstract away the concrete comment syntax and allow checking the header for different languages with a single header definition. For example, consider the following header specification (note that this is not the full Apache license header): </p><pre><code> line 1: ^#! line 2: ^<\?xml.*>$ line 3: ^\W*$ line 4: ^\W*Copyright 2006 The Apache Software Foundation or its licensors, as applicable\.$ line 5: ^\W*Licensed under the Apache License, Version 2\.0 \(the "License"\);$ line 6: ^\W*$ </code></pre><p> Lines 1 and 2 leave room for technical header lines, e.g. the "#!/bin/sh" line in Unix shell scripts, or the XML file header of XML files. Set the multiline property to "1, 2" so these lines can be ignored for file types where they do no apply. Lines 3 through 6 define the actual header content. Note how lines 2, 4 and 5 use escapes for characters that have special regexp semantics. </p>
jenkins-glsp / CheckStyle
RegexpHeaderCheck
NORMAL:
Line does not match expected header line of '^\/\*{2,80}$'.
Raw output
<p>Since Checkstyle 6.9</p><p> Checks the header of a source file against a header that contains a <a href="https://docs.oracle.com/javase/7/docs/api/java/util/regex/Pattern.html">regular expression</a> for each line of the source header. </p><p> Rationale: In some projects <a href="#Header">checking against a fixed header</a> is not sufficient, e.g. the header might require a copyright line where the year information is not static. </p><p> For example, consider the following header: </p><pre><code> line 1: ^/{71}$ line 2: ^// checkstyle:$ line 3: ^// Checks Java source code for adherence to a set of rules\.$ line 4: ^// Copyright \(C\) \d\d\d\d Oliver Burn$ line 5: ^// Last modification by \$Author.*\$$ line 6: ^/{71}$ line 7: line 8: ^package line 9: line 10: ^import line 11: line 12: ^/\*\* line 13: ^ \*([^/]|$) line 14: ^ \*/ </code></pre><p> Lines 1 and 6 demonstrate a more compact notation for 71 '/' characters. Line 4 enforces that the copyright notice includes a four digit year. Line 5 is an example how to enforce revision control keywords in a file header. Lines 12-14 is a template for javadoc (line 13 is so complicated to remove conflict with and of javadoc comment). Lines 7, 9 and 11 will be treated as '^$' and will forcefully expect the line to be empty. </p><p> Different programming languages have different comment syntax rules, but all of them start a comment with a non-word character. Hence you can often use the non-word character class to abstract away the concrete comment syntax and allow checking the header for different languages with a single header definition. For example, consider the following header specification (note that this is not the full Apache license header): </p><pre><code> line 1: ^#! line 2: ^<\?xml.*>$ line 3: ^\W*$ line 4: ^\W*Copyright 2006 The Apache Software Foundation or its licensors, as applicable\.$ line 5: ^\W*Licensed under the Apache License, Version 2\.0 \(the "License"\);$ line 6: ^\W*$ </code></pre><p> Lines 1 and 2 leave room for technical header lines, e.g. the "#!/bin/sh" line in Unix shell scripts, or the XML file header of XML files. Set the multiline property to "1, 2" so these lines can be ignored for file types where they do no apply. Lines 3 through 6 define the actual header content. Note how lines 2, 4 and 5 use escapes for characters that have special regexp semantics. </p>
jenkins-glsp / CheckStyle
VisibilityModifierCheck
NORMAL:
Variable 'factory' must be private and have accessor methods.
Raw output
<p>Since Checkstyle 3.0</p><p> Checks visibility of class members. Only static final, immutable or annotated by specified annotation members may be public; other class members must be private unless the property <code>protectedAllowed</code> or <code>packageAllowed</code> is set. </p><p> Public members are not flagged if the name matches the public member regular expression (contains <code>"^serialVersionUID$"</code> by default). </p><p>Note that Checkstyle 2 used to include <code>"^f[A-Z][a-zA-Z0-9]*$"</code> in the default pattern to allow names used in container-managed persistence for Enterprise JavaBeans (EJB) 1.1 with the default settings. With EJB 2.0 it is no longer necessary to have public access for persistent fields, so the default has been changed. </p><p> Rationale: Enforce encapsulation. </p><p> Check also has options making it less strict: </p><p><b>ignoreAnnotationCanonicalNames</b> - the list of annotations which ignore variables in consideration. If user will provide short annotation name that type will match to any named the same type without consideration of package </p><p><b>allowPublicFinalFields</b> - which allows public final fields. Default value is <b>false</b></p><p><b>allowPublicImmutableFields</b> - which allows immutable fields to be declared as public if defined in final class. Default value is <b>false</b></p><p> Field is known to be immutable if: - It's declared as final - Has either a primitive type or instance of class user defined to be immutable (such as String, ImmutableCollection from Guava and etc) </p><p> Classes known to be immutable are listed in <b>immutableClassCanonicalNames</b> by their <b>canonical</b> names. </p><p> Rationale: Forcing all fields of class to have private modified by default is good in most cases, but in some cases it drawbacks in too much boilerplate get/set code. One of such cases are immutable classes. </p><p><b>Restriction</b>: Check doesn't check if class is immutable, there's no checking if accessory methods are missing and all fields are immutable, we only check <b>if current field is immutable or final</b>. Under the flag <b>allowPublicImmutableFields</b>, the enclosing class must also be final, to encourage immutability. Under the flag <b>allowPublicFinalFields</b>, the final modifier on the enclosing class is optional. </p><p> Star imports are out of scope of this Check. So if one of type imported via <b>star import</b> collides with user specified one by its short name - there won't be Check's violation. </p>
jenkins-glsp / CheckStyle
RegexpHeaderCheck
NORMAL:
Line does not match expected header line of '^\/\*{2,80}$'.
Raw output
<p>Since Checkstyle 6.9</p><p> Checks the header of a source file against a header that contains a <a href="https://docs.oracle.com/javase/7/docs/api/java/util/regex/Pattern.html">regular expression</a> for each line of the source header. </p><p> Rationale: In some projects <a href="#Header">checking against a fixed header</a> is not sufficient, e.g. the header might require a copyright line where the year information is not static. </p><p> For example, consider the following header: </p><pre><code> line 1: ^/{71}$ line 2: ^// checkstyle:$ line 3: ^// Checks Java source code for adherence to a set of rules\.$ line 4: ^// Copyright \(C\) \d\d\d\d Oliver Burn$ line 5: ^// Last modification by \$Author.*\$$ line 6: ^/{71}$ line 7: line 8: ^package line 9: line 10: ^import line 11: line 12: ^/\*\* line 13: ^ \*([^/]|$) line 14: ^ \*/ </code></pre><p> Lines 1 and 6 demonstrate a more compact notation for 71 '/' characters. Line 4 enforces that the copyright notice includes a four digit year. Line 5 is an example how to enforce revision control keywords in a file header. Lines 12-14 is a template for javadoc (line 13 is so complicated to remove conflict with and of javadoc comment). Lines 7, 9 and 11 will be treated as '^$' and will forcefully expect the line to be empty. </p><p> Different programming languages have different comment syntax rules, but all of them start a comment with a non-word character. Hence you can often use the non-word character class to abstract away the concrete comment syntax and allow checking the header for different languages with a single header definition. For example, consider the following header specification (note that this is not the full Apache license header): </p><pre><code> line 1: ^#! line 2: ^<\?xml.*>$ line 3: ^\W*$ line 4: ^\W*Copyright 2006 The Apache Software Foundation or its licensors, as applicable\.$ line 5: ^\W*Licensed under the Apache License, Version 2\.0 \(the "License"\);$ line 6: ^\W*$ </code></pre><p> Lines 1 and 2 leave room for technical header lines, e.g. the "#!/bin/sh" line in Unix shell scripts, or the XML file header of XML files. Set the multiline property to "1, 2" so these lines can be ignored for file types where they do no apply. Lines 3 through 6 define the actual header content. Note how lines 2, 4 and 5 use escapes for characters that have special regexp semantics. </p>
jenkins-glsp / CheckStyle
HideUtilityClassConstructorCheck
NORMAL:
Utility classes should not have a public or default constructor.
Raw output
<p>Since Checkstyle 3.1</p><p> Makes sure that utility classes (classes that contain only static methods or fields in their API) do not have a public constructor. </p><p> Rationale: Instantiating utility classes does not make sense. Hence the constructors should either be private or (if you want to allow subclassing) protected. A common mistake is forgetting to hide the default constructor. </p><p> If you make the constructor protected you may want to consider the following constructor implementation technique to disallow instantiating subclasses: </p><pre><code> public class StringUtils // not final to allow subclassing { protected StringUtils() { // prevents calls from subclass throw new UnsupportedOperationException(); } public static int count(char c, String s) { // ... } } </code></pre>
Loading