-
Notifications
You must be signed in to change notification settings - Fork 746
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Showing
360 changed files
with
44 additions
and
486 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -46,7 +46,6 @@ | |
* @author [email protected] (Graeme Morgan) | ||
*/ | ||
@BugPattern( | ||
name = "AnnotateFormatMethod", | ||
summary = | ||
"This method passes a pair of parameters through to String.format, but the enclosing" | ||
+ " method wasn't annotated @FormatMethod. Doing so gives compile-time rather than" | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -72,7 +72,6 @@ | |
* @author [email protected] (Graeme Morgan) | ||
*/ | ||
@BugPattern( | ||
name = "AnnotationPosition", | ||
summary = "Annotations should be positioned after Javadocs, but before modifiers.", | ||
severity = WARNING, | ||
tags = STYLE, | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -29,7 +29,6 @@ | |
* @author [email protected] (Eleanor Harris) | ||
*/ | ||
@BugPattern( | ||
name = "ArrayAsKeyOfSetOrMap", | ||
summary = | ||
"Arrays do not override equals() or hashCode, so comparisons will be done on" | ||
+ " reference equality only. If neither deduplication nor lookup are needed, " | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -36,10 +36,7 @@ | |
import com.sun.tools.javac.tree.JCTree.JCFieldAccess; | ||
|
||
/** @author [email protected] (Eddie Aftandilian) */ | ||
@BugPattern( | ||
name = "ArrayEquals", | ||
summary = "Reference equality used to compare arrays", | ||
severity = ERROR) | ||
@BugPattern(summary = "Reference equality used to compare arrays", severity = ERROR) | ||
public class ArrayEquals extends BugChecker implements MethodInvocationTreeMatcher { | ||
/** Matches when the equals instance method is used to compare two arrays. */ | ||
private static final Matcher<MethodInvocationTree> instanceEqualsMatcher = | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -41,10 +41,7 @@ | |
import com.sun.tools.javac.tree.JCTree.JCFieldAccess; | ||
|
||
/** @author [email protected] (Eddie Aftandilian) */ | ||
@BugPattern( | ||
name = "ArrayHashCode", | ||
summary = "hashcode method on array does not hash array contents", | ||
severity = ERROR) | ||
@BugPattern(summary = "hashcode method on array does not hash array contents", severity = ERROR) | ||
public class ArrayHashCode extends BugChecker implements MethodInvocationTreeMatcher { | ||
|
||
/** | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -38,7 +38,6 @@ | |
* @author [email protected] (Liam Miller-Cushon) | ||
*/ | ||
@BugPattern( | ||
name = "ArrayToString", | ||
summary = "Calling toString on an array does not provide useful information", | ||
severity = ERROR) | ||
public class ArrayToString extends AbstractToString { | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -30,7 +30,6 @@ | |
|
||
/** @author [email protected] (Sebastian Monte) */ | ||
@BugPattern( | ||
name = "AssertFalse", | ||
summary = | ||
"Assertions may be disabled at runtime and do not guarantee that execution will " | ||
+ "halt here; consider throwing an exception instead", | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -46,7 +46,6 @@ | |
* @author [email protected] (Sumit Bhagwani) | ||
*/ | ||
@BugPattern( | ||
name = "AutoValueFinalMethods", | ||
summary = | ||
"Make toString(), hashCode() and equals() final in AutoValue classes" | ||
+ ", so it is clear to readers that AutoValue is not overriding them", | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -42,7 +42,6 @@ | |
* @author [email protected] (Sumit Bhagwani) | ||
*/ | ||
@BugPattern( | ||
name = "AutoValueImmutableFields", | ||
altNames = "mutable", | ||
summary = "AutoValue recommends using immutable collections", | ||
severity = WARNING, | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -47,7 +47,6 @@ | |
|
||
/** @author [email protected] (Ian Rogers) */ | ||
@BugPattern( | ||
name = "BadComparable", | ||
summary = "Possible sign flip from narrowing conversion", | ||
severity = WARNING, | ||
tags = StandardTags.FRAGILE_CODE) | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -51,7 +51,6 @@ | |
|
||
/** @author [email protected] (Andy Turner) */ | ||
@BugPattern( | ||
name = "BadImport", | ||
summary = | ||
"Importing nested classes/static methods/static fields with commonly-used names can make " | ||
+ "code harder to read, because it may not be clear from the context exactly which " | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -39,7 +39,6 @@ | |
* @author [email protected] (Graeme Morgan) | ||
*/ | ||
@BugPattern( | ||
name = "BadInstanceof", | ||
summary = "instanceof used in a way that is equivalent to a null check.", | ||
severity = WARNING, | ||
tags = SIMPLIFICATION) | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -41,10 +41,7 @@ | |
* @author [email protected] (Bill Pugh) | ||
* @author [email protected] (Eddie Aftandilian) | ||
*/ | ||
@BugPattern( | ||
name = "BadShiftAmount", | ||
summary = "Shift by an amount that is out of range", | ||
severity = ERROR) | ||
@BugPattern(summary = "Shift by an amount that is out of range", severity = ERROR) | ||
public class BadShiftAmount extends BugChecker implements BinaryTreeMatcher { | ||
|
||
/** | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -45,7 +45,6 @@ | |
* @author [email protected] (Graeme Morgan) | ||
*/ | ||
@BugPattern( | ||
name = "BigDecimalEquals", | ||
summary = "BigDecimal#equals has surprising behavior: it also compares scale.", | ||
severity = WARNING) | ||
public final class BigDecimalEquals extends BugChecker implements MethodInvocationTreeMatcher { | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -40,10 +40,7 @@ | |
* | ||
* @author [email protected] (Eric Dobson) | ||
*/ | ||
@BugPattern( | ||
name = "BigDecimalLiteralDouble", | ||
summary = "new BigDecimal(double) loses precision in this case.", | ||
severity = WARNING) | ||
@BugPattern(summary = "new BigDecimal(double) loses precision in this case.", severity = WARNING) | ||
public class BigDecimalLiteralDouble extends BugChecker implements NewClassTreeMatcher { | ||
|
||
private static final BigInteger LONG_MAX = BigInteger.valueOf(Long.MAX_VALUE); | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -65,7 +65,6 @@ | |
* @author [email protected] (Chris Povirk) | ||
*/ | ||
@BugPattern( | ||
name = "ChainingConstructorIgnoresParameter", | ||
severity = ERROR, | ||
summary = | ||
"The called constructor accepts a parameter with the same name and type as one of " | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -33,7 +33,6 @@ | |
* @author [email protected] | ||
*/ | ||
@BugPattern( | ||
name = "CharacterGetNumericValue", | ||
summary = | ||
"getNumericValue has unexpected behaviour: it interprets A-Z as base-36 digits with values" | ||
+ " 10-35, but also supports non-arabic numerals and miscellaneous numeric unicode" | ||
|
Oops, something went wrong.