Bot releases are hidden (Show)
Published by amalloy over 2 years ago
New checkers:
BanJNDI
EmptyTopLevelDeclaration
ErroneousBitwiseExpression
FuzzyEqualsShouldNotBeUsedInEqualsMethod
Interruption
NullableOnContainingClass
Fixed issues: #3110, #3193
Full Changelog: https://github.com/google/error-prone/compare/v2.13.1...v2.14.0
Published by dx404 over 2 years ago
This release adds an infrastructure optimization to AppliedFix
source code processing.
Published by dx404 over 2 years ago
New checks
BoxedPrimitiveEquality
DoubleBraceInitialization
IgnoredPureGetter
LockOnBoxedPrimitive
IncorrectMainMethod
LongDoubleConversion
RobolectricShadowDirectlyOn
StaticAssignmentOfThrowable
UnnecessaryLongToIntConversion
Varifier
Fixed issues: #58, #65, #1327, #1654, #2858, #2867, #2916, #2951, #2954, #3006, #3008
Full Changelog: https://github.com/google/error-prone/compare/v2.11.0...v2.12.0
Published by cushon over 2 years ago
Error Prone now requires JDK 11 or newer (https://github.com/google/error-prone/issues/2730).
New checks
AutoValueBuilderDefaultsInConstructor
FloggerLogString
UnicodeDirectionalityCharacters
UnicodeInCode
AlreadyChecked
BugPatternNaming
MissingImplementsComparable
NegativeCharLiteral
PreferredInterfaceType
StronglyTypeByteString
UsingJsr305CheckReturnValue
Fixed issues: #2641, #2705, #2776, #2798, #2799, #2819, #2820, #2831, #2833, #2834, #2835, #2861, #2873, #2889, #2892, #2901
Full Changelog: https://github.com/google/error-prone/compare/v2.10.0...v2.11.0
Published by cushon almost 3 years ago
New checks
AlwaysThrows
StackTraceElementGetClass
BareDotMetacharacter
DistinctVarargsChecker
MalformedInlineTag
MemoizeConstantVisitorStateLookups
UnicodeEscape
FieldMissingNullable
Java8ApiChecker
ParameterMissingNullable
TooManyParameters
TryWithResourcesVariable
UnnecessaryFinal
VoidMissingNullable
Fixed issues: #2616, #2629
Full Changelog: https://github.com/google/error-prone/compare/v2.9.0...v2.10.0
Published by amalloy about 3 years ago
Release Error Prone 2.9.0
New checks:
Fixes #2124, #2371, #2393, #2470
Published by cushon about 3 years ago
This release adds a new check (LoopOverCharArray), and a handful of other small improvements (https://github.com/google/error-prone/compare/v2.8.0...v2.8.1).
Published by cushon about 3 years ago
New Checks:
Fixes #1652, #2122, #2122, #2366, #2404, #2411
Published by cushon over 3 years ago
Everything in Error Prone 2.7.0, plus an additional fix for JDK 17.
Published by cushon over 3 years ago
Changes
@InlineMe
is a deprecation mechanism that allows automated tools to cleanup existing callers: http://errorprone.info/docs/inlineme
New checks:
Closed issues: #2257, #2260, #2282, #2301, #2322, #2323, #2324
Published by cushon over 3 years ago
Checkers Added:
Issues Closed:
Published by cushon almost 4 years ago
Changes
NoSuchMethodError: 'com.sun.tools.javac.util.List com.sun.tools.javac.code.Symbol$TypeSymbol.getEnclosedElements
NoSuchMethodError
crash in HidingField
(#2092)NoSuchElementException
crash in RestrictedApiChecker
(#2099)DifferentNameButSame
(#2094)UnnecessaryOptionalGet
(#2101)UnnecessaryMethodReference
(#2102)Published by cushon almost 4 years ago
New checks:
Fixed issues: #1044 #1177 #1275 #1322 #1326 #1503 #1529 #1563 #1645 #1650 #1652 #1653 #1655 #1665 #1670 #1672 #1694 #1699 #1705 #1767 #1788 #1809 #1849 #1873 #1916 #1981 #1982 #1986 #1987 #2009 #2026 #2029 #2059 #2064
Published by cushon over 4 years ago
Support for latest JDK versions: Error Prone is now compatible with JDK 8 through JDK 14, as well as early access builds of JDK 15.
New checks:
Fixed issues: #1070, #1106, #1107, #1110, #1111, #1187, #1208, #1239, #1265, #1428, #1432, #1433, #1439, #1444, #1447, #1449, #1451, #1454, #1455, #1458, #1462, #1473, #1491, #1531, #1558, #1565, #1570, #1573, #1586, #1587, #1590, #1591, #1602, #1606, #1609, #1624, #776, #785, #930
Published by epmjohnston almost 5 years ago
Performance Improvements: 40% speedup when run against Google's codebase with errors enabled.
New Checks:
Removed, moved, or disabled:
Fixed issues: #1106, #1225, #1231, #1234, #1238, #1241, #1246, #1252, #1259, #1260, #1271, #1274, #1287, #1308, #1316, #1329, #1373, #1391, #1408
Published by cushon over 5 years ago
AssignmentToMock
: Fields annotated with @Mock should not be manually assigned to.AutoValueImmutableFields
: AutoValue recommends using immutable collectionsCompareToZero
: The result of #compareTo or #compare should only be compared to 0. It is an implementation detail whether a given type returns strictly the values {-1, 0, +1} or others.DeduplicateConstants
: This expression was previously declared as a constant; consider replacing this occurrence.DiscardedPostfixExpression
: The result of this unary operation on a lambda parameter is discardedDuplicateMapKeys
: Map#ofEntries will throw an IllegalArgumentException if there are any duplicate keysEscapedEntity
: HTML entities in @code/@literal tags will appear literally in the rendered javadoc.InheritDoc
: Invalid use of @inheritDoc.InterfaceWithOnlyStatics
: This interface only contains static fields and methods; consider making it a final class instead to prevent subclassing.InvalidBlockTag
: This tag is invalid.InvalidInlineTag
: This tag is invalid.MissingSummary
: A summary line is required on public/protected Javadocs.MixedDescriptors
: The field number passed into #getFieldByNumber belongs to a different proto to the Descriptor.MixedMutabilityReturnType
: This method returns both mutable and immutable collections or maps from different paths. This may be confusing for users of the method.MockitoInternalUsage
: org.mockito.internal.* is a private API and should not be used by clientsOptionalMapToOptional
: Mapping to another Optional will yield a nested Optional. Did you mean flatMap?OutlineNone
: Setting CSS outline style to none or 0 (while not otherwise providing visual focus indicators) is inaccessible for users navigating a web page without a mouse.PreconditionsCheckNotNullRepeated
: Including the first argument of checkNotNull in the failure message is not useful, as it will always be null
.RedundantOverride
: This override is redundant, and can be removed.RefersToDaggerCodegen
: Don't refer to Dagger's internal or generated codeRxReturnValueIgnored
: Returned Rx objects must be checked. Ignoring a returned Rx value means it is never scheduled for executionTreeToString
: Tree#toString shouldn't be used for Trees deriving from the code being compiled, as it discards whitespace and comments.TypeEquals
: com.sun.tools.javac.code.Type doesn't override Object.equals and instances are not interned by javac, so testing types for equality should be done with Types#isSameType insteadUnescapedEntity
: Javadoc is interpreted as HTML, so HTML entities such as &, <, > must be escaped.UnusedMethod
: Unused.UnusedNestedClass
: This nested class is unused, and can be removed.UnusedVariable
: Unused.JavaDurationGetSecondsGetNano
: duration.getNano() only accesses the underlying nanosecond adjustment from the whole second.JavaDurationWithNanos
: Use of java.time.Duration.withNanos(int) is not allowed.JavaDurationWithSeconds
: Use of java.time.Duration.withSeconds(long) is not allowed.JavaInstantGetSecondsGetNano
: instant.getNano() only accesses the underlying nanosecond adjustment from the whole second.JavaTimeDefaultTimeZone
: java.time APIs that silently use the default system time-zone are not allowed.JodaDurationConstructor
: Use of new Duration(long) is not allowed. Please use Duration.millis(long) instead.JodaDurationWithMillis
: Use of duration.withMillis(long) is not allowed. Please use Duration.millis(long) instead.JodaInstantWithMillis
: Use of instant.withMillis(long) is not allowed. Please use new Instant(long) instead.JodaNewPeriod
: This may have surprising semantics, e.g. new Period(LocalDate.parse("1970-01-01"), LocalDate.parse("1970-02-02")).getDays() == 1, not 32.JodaPlusMinusLong
: Use of JodaTime's type.plus(long) or type.minus(long) is not allowed (where = {Duration,Instant,DateTime,DateMidnight}). Please use type.plus(Duration.millis(long)) or type.minus(Duration.millis(long)) instead.JodaTimeConverterManager
: Joda-Time's ConverterManager makes the semantics of DateTime/Instant/etc construction subject to global static state. If you need to define your own converters, use a helper.JodaToSelf
: Use of Joda-Time's DateTime.toDateTime(), Duration.toDuration(), Instant.toInstant(), Interval.toInterval(), and Period.toPeriod() are not allowed.JodaWithDurationAddedLong
: Use of JodaTime's type.withDurationAdded(long, int) (where = {Duration,Instant,DateTime}). Please use type.withDurationAdded(Duration.millis(long), int) instead.TemporalAccessorGetChronoField
: TemporalAccessor.get() only works for certain values of ChronoField.TimeUnitConversionChecker
: This TimeUnit conversion looks buggy: converting from a smaller unit to a larger unit (and passing a constant), converting to/from the same TimeUnit, or converting TimeUnits where the result is statically known to be 0 or 1 are all buggy patterns.DurationFrom
: Duration.from(Duration) returns itself; from(Period) throws a runtime exception.DurationGetTemporalUnit
: Duration.get() only works with SECONDS or NANOS.DurationToLongTimeUnit
: Unit mismatch when decomposing a Duration or Instant to call a <long, TimeUnit> APIInvalidZoneId
: Invalid zone identifier. ZoneId.of(String) will throw exception at runtime.PeriodFrom
: Period.from(Period) returns itself; from(Duration) throws a runtime exception.PeriodGetTemporalUnit
: Period.get() only works with YEARS, MONTHS, or DAYS.PeriodTimeMath
: When adding or subtracting from a Period, Duration is incompatible.ProtoDurationGetSecondsGetNano
: getNanos() only accesses the underlying nanosecond-adjustment of the duration.ProtoTimestampGetSecondsGetNano
: getNanos() only accesses the underlying nanosecond-adjustment of the instant.ProtoTruthMixedDescriptors
: The arguments passed to ignoringFields
are inconsistent with the proto which is the subject of the assertion.TimeUnitMismatch
: An value that appears to be represented in one unit is used where another appears to be required (e.g., seconds where nanos are needed)@BugPattern.category
is no longer supported; prefer @BugPattern.tags
as a means to apply general tags to checks.-XepDisableWarningsInGeneratedCode
is passed.@MustBeClosed
constructor to be marked @MustBeClosed too@RecentlyXxx
annotations and @CheckForNull
in nullness analysis.@NoAllocation
annotation to be propagated to all overrides of a method that has the annotation, to reflect the contractual nature of the annotation.Published by epmjohnston about 6 years ago
-XepOpt:Android:Java8Libs
flag, can allow select Java 8 library support via https://developer.android.com/studio/write/java8-support. Look out for this in bazel.build after the next release.Immutable{Annotation,Enum}Checker
now requires the Error Prone @Immutable
annotation, not the JSR-305 @Immutable
annotation#1008, #1028, #1038, #1040, #1077, #1078, #1079, #1083, #1084, #1085, #1095, #1096, #1101, #1125, #1129, #1130, #35, #607, #783, #849, #926
Published by eaftan over 6 years ago
New checks:
Other changes:
Fixes issues: #996, #999, #1001, #1004
Published by eaftan over 6 years ago
New checks:
var
should not be used as a type nameOther changes:
Fixes issues: #789, #893, #897, #899, #899, #904, #914, #921, #931, #942, #945, #954, #993
Published by cushon almost 7 years ago
New errors:
Comparable<T>
and T
.New warnings:
fail()
New optional checks:
String.split(String)
, which has surprising behaviour.String.split
to Splitter
.[0.0, 1.0)
to an integer or long always results in 0
.Changes to existing checks
android.support.v4.util.ObjectsCompat#equals
.android.support.v4.util.ObjectsCompat#equals
.@Before
or @After
annotation that are not org.junit.Before
or org.junit.After
.DateFormats
, and is renamed to DateFormatConstantFoo<A>
is incompatible with Foo<B>
if A
and B
are incompatible with each-other.Other changes