Skip to content

Commit

Permalink
Issue sevntu-checkstyle#734: Required text changes, fixes for CI build
Browse files Browse the repository at this point in the history
  • Loading branch information
mbert committed May 15, 2019
1 parent 143e2d7 commit ee10748
Show file tree
Hide file tree
Showing 5 changed files with 13 additions and 15 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -193,5 +193,5 @@ Jsr305AnnotationsCheck.name=Jsr305AnnotationsCheck
Jsr305AnnotationsCheck.desc=Checks method parameters and return values for the presence of @Nonnull, @Nullable, or @CheckForNull annotations.
Jsr305AnnotationsCheck.packages=Sets the parent package for all classes that will be checked.
Jsr305AnnotationsCheck.excludePackages=Packages excluded from checking. This can be useful if under the parent package set with "packages" there are subpackages which should not be checked.
Jsr305AnnotationsCheck.allowOverridingReturnValue=Allow Overriding return values, useful for upgrading.
Jsr305AnnotationsCheck.allowOverridingParameter=Allow Overriding parameters, useful for upgrading.
Jsr305AnnotationsCheck.allowOverridingReturnValue=Annotating return values "@CheckForNull" in overridden methods is flagged as an error. When setting this property to true, this error will be ignored (useful for upgrading).
Jsr305AnnotationsCheck.allowOverridingParameter=Annotating parameters "@Nonnull" in overridden methods is flagged as an error. When setting this property to true, this error will be ignored (useful for upgrading).
4 changes: 2 additions & 2 deletions sevntu-checks/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -295,8 +295,8 @@
<regex><pattern>.*.checks.coding.NoNullForCollectionReturnCheck</pattern><branchRate>85</branchRate><lineRate>96</lineRate></regex>
<regex><pattern>.*.checks.coding.OverridableMethodInConstructorCheck</pattern><branchRate>94</branchRate><lineRate>99</lineRate></regex>
<regex><pattern>.*.checks.coding.Jsr305AnnotationsCheck</pattern><branchRate>97</branchRate><lineRate>100</lineRate></regex>
<regex><pattern>.*.checks.coding.Jsr305AnnotationsCheck.AbstractJsr305Check</pattern><branchRate>99</branchRate><lineRate>100</lineRate></regex>
<regex><pattern>.*.checks.design.HideUtilityClassConstructorCheck</pattern><branchRate>94</branchRate><lineRate>100</lineRate></regex>
<regex><pattern>.*.checks.coding.Jsr305AnnotationsCheck.AbstractJsr305Check</pattern><branchRate>98</branchRate><lineRate>100</lineRate></regex>
<regex><pattern>.*.checks.design.HideUtilityClassConstructorCheck</pattern><branchRate>96</branchRate><lineRate>100</lineRate></regex>
</regexes>
</check>
</configuration>
Expand Down
2 changes: 1 addition & 1 deletion sevntu-checks/sevntu-checks.xml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE module PUBLIC "-//Puppy Crawl//DTD Check Configuration 1.3//EN" "http://www.puppycrawl.com/dtds/configuration_1_3.dtd">
<!DOCTYPE module PUBLIC "-//Puppy Crawl//DTD Check Configuration 1.3//EN" "https://www.puppycrawl.com/dtds/configuration_1_3.dtd">

<module name="Checker">

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,10 @@

public class Jsr305AnnotationsCheckTest extends AbstractModuleTestSupport {

// -------------- Function tests (execute check on test sources) --------------
@Override
protected String getPackageLocation() {
return "com/github/sevntu/checkstyle/checks/coding";
}

@Test
public void testParameters() throws Exception {
Expand Down Expand Up @@ -355,9 +358,4 @@ public void testExcludePackage() throws Exception {
verify(checkConfig, getPath("InputJsr305AnnotationsCheckWithParameter.java"), expected);
}

@Override
protected String getPackageLocation() {
return "com/github/sevntu/checkstyle/checks/coding";
}

}
Original file line number Diff line number Diff line change
Expand Up @@ -923,9 +923,9 @@

<rule>
<key>com.github.sevntu.checkstyle.checks.coding.Jsr305AnnotationsCheck</key>
<name>Line Length Extended</name>
<name>Jsr305AnnotationsCheck</name>
<category name="coding"/>
<description>Checks for long lines.</description>
<description>Checks method parameters and return values for the presence of @Nonnull, @Nullable, or @CheckForNull annotations.</description>
<configKey>Checker/TreeWalker/com.github.sevntu.checkstyle.checks.coding.Jsr305AnnotationsCheck</configKey>

<param key="packages" type="STRING">
Expand All @@ -938,11 +938,11 @@
</param>
<param key="allowOverridingReturnValue" type="BOOLEAN">
<defaultValue>false</defaultValue>
<description>Allow Overriding return values, useful for upgrading.</description>
<description>In overridden methods annotating return values "@CheckForNull" is flagged as an error. When setting this property to true, this error will be ignored (useful for upgrading).</description>
</param>
<param key="allowOverridingParameter" type="BOOLEAN">
<defaultValue>false</defaultValue>
<description>Allow Overriding paramaters, useful for upgrading.</description>
<description>In overridden methods annotating parameters "@Nonnull" is flagged as an error. When setting this property to true, this error will be ignored (useful for upgrading).</description>
</param>
</rule>

Expand Down

0 comments on commit ee10748

Please sign in to comment.