Skip to content

Commit

Permalink
Issue #12164: Enable Checker Framework
Browse files Browse the repository at this point in the history
  • Loading branch information
Vyom-Yadav authored and nrmancuso committed Sep 17, 2022
1 parent ba66ce2 commit 6335dd8
Show file tree
Hide file tree
Showing 15 changed files with 13,535 additions and 6 deletions.
3 changes: 0 additions & 3 deletions .ci/StarterRuleSet-AllRulesByCategory.groovy.txt
Expand Up @@ -359,9 +359,6 @@ ruleset {
NonFinalSubclassOfSensitiveInterface
ObjectFinalize
PublicFinalizeMethod
SystemExit {
doNotApplyToFileNames = 'pitest-survival-check-xml.groovy,error-prone-check.groovy'
}
UnsafeArrayDeclaration

// rulesets/serialization.xml
Expand Down
@@ -0,0 +1,37 @@
<?xml version="1.0" encoding="UTF-8"?>
<suppressedErrors>
<checkerFrameworkError unstable="false">
<fileName>checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/DefaultLogger.java</fileName>
<specifier>i18nformat.key.not.found</specifier>
<message>a key doesn&apos;t exist in the provided translation file</message>
<lineContent>final String pattern = resourceBundle.getString(key);</lineContent>
</checkerFrameworkError>

<checkerFrameworkError unstable="false">
<fileName>checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/api/Violation.java</fileName>
<specifier>i18nformat.key.not.found</specifier>
<message>a key doesn&apos;t exist in the provided translation file</message>
<lineContent>final String pattern = resourceBundle.getString(key);</lineContent>
</checkerFrameworkError>

<checkerFrameworkError unstable="false">
<fileName>checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/meta/JavadocMetadataScraper.java</fileName>
<specifier>format.string</specifier>
<message>invalid format string (is a @Format annotation missing?)</message>
<lineContent>Locale.ROOT, PROP_DEFAULT_VALUE_MISSING, propertyName)</lineContent>
</checkerFrameworkError>

<checkerFrameworkError unstable="false">
<fileName>checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/meta/JavadocMetadataScraper.java</fileName>
<specifier>format.string</specifier>
<message>invalid format string (is a @Format annotation missing?)</message>
<lineContent>Locale.ROOT, PROP_TYPE_MISSING, propertyName)</lineContent>
</checkerFrameworkError>

<checkerFrameworkError unstable="false">
<fileName>checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/utils/TokenUtil.java</fileName>
<specifier>i18nformat.key.not.found</specifier>
<message>a key doesn&apos;t exist in the provided translation file</message>
<lineContent>return bundle.getString(name);</lineContent>
</checkerFrameworkError>
</suppressedErrors>
3,011 changes: 3,011 additions & 0 deletions .ci/checker-framework-suppressions/checker-framework-index-suppressions.xml

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

@@ -0,0 +1,61 @@
<?xml version="1.0" encoding="UTF-8"?>
<suppressedErrors>
<checkerFrameworkError unstable="false">
<fileName>checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/utils/CheckUtil.java</fileName>
<specifier>argument</specifier>
<message>incompatible argument for parameter radix of parseInt.</message>
<lineContent>result = Integer.parseInt(txt, radix);</lineContent>
<details>
found : int
required: @IntRange(from=2, to=36) int
</details>
</checkerFrameworkError>

<checkerFrameworkError unstable="false">
<fileName>checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/utils/CheckUtil.java</fileName>
<specifier>argument</specifier>
<message>incompatible argument for parameter radix of parseLong.</message>
<lineContent>result = Long.parseLong(txt, radix);</lineContent>
<details>
found : int
required: @IntRange(from=2, to=36) int
</details>
</checkerFrameworkError>

<checkerFrameworkError unstable="false">
<fileName>checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/utils/CheckUtil.java</fileName>
<specifier>argument</specifier>
<message>incompatible argument for parameter radix of parseUnsignedInt.</message>
<lineContent>result = Integer.parseUnsignedInt(txt, radix);</lineContent>
<details>
found : int
required: @IntRange(from=2, to=36) int
</details>
</checkerFrameworkError>

<checkerFrameworkError unstable="false">
<fileName>checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/utils/CheckUtil.java</fileName>
<specifier>argument</specifier>
<message>incompatible argument for parameter radix of parseUnsignedLong.</message>
<lineContent>result = Long.parseUnsignedLong(txt, radix);</lineContent>
<details>
found : int
required: @IntRange(from=2, to=36) int
</details>
</checkerFrameworkError>

<checkerFrameworkError unstable="false">
<fileName>checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/utils/TokenUtil.java</fileName>
<specifier>methodref.param</specifier>
<message>Incompatible parameter type for bitIndex</message>
<lineContent>.collect(BitSet::new, BitSet::set, BitSet::or);</lineContent>
<details>
found : @IntRangeFromNonNegative int
required: int
Consequence: method in BitSet
void set(BitSet this, @IntRangeFromNonNegative int p0)
is not a valid method reference for method in ObjIntConsumer&lt;BitSet&gt;
void accept(ObjIntConsumer&lt;BitSet&gt; this, BitSet p0, int p1)
</details>
</checkerFrameworkError>
</suppressedErrors>

0 comments on commit 6335dd8

Please sign in to comment.