blob: fcc99bcb42894e701c1d225ce56d80ac2af75dbc [file] [log] [blame]
Julien Desprez0f0a02a2017-03-01 16:59:10 +00001# Copyright (C) 2017 The Android Open Source Project
2#
3# Licensed under the Apache License, Version 2.0 (the "License");
4# you may not use this file except in compliance with the License.
5# You may obtain a copy of the License at
6#
7# http://www.apache.org/licenses/LICENSE-2.0
8#
9# Unless required by applicable law or agreed to in writing, software
10# distributed under the License is distributed on an "AS IS" BASIS,
11# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12# See the License for the specific language governing permissions and
13# limitations under the License.
14
15# Set of error prone rules to ensure code quality
Julien Desprez8eba9902017-03-02 14:09:04 +000016# PackageLocation check requires the androidCompatible=false otherwise it does not do anything.
Julien Desprez71489f32017-03-03 12:46:34 +000017LOCAL_ERROR_PRONE_FLAGS:= -XDandroidCompatible=false \
Julien Desprez0f0a02a2017-03-01 16:59:10 +000018 -Xep:ArrayToString:ERROR \
Julien Desprez8eba9902017-03-02 14:09:04 +000019 -Xep:BoxedPrimitiveConstructor:ERROR \
Julien Desprez8eba9902017-03-02 14:09:04 +000020 -Xep:ConstantField:ERROR \
jdesprez3a72bc82017-08-01 17:23:58 -070021 -Xep:DeadException:ERROR \
jdesprezbc580f92017-06-02 11:41:40 -070022 -Xep:EqualsIncompatibleType:ERROR \
Julien Despreze2fb5aa2019-03-26 10:49:01 -070023 -Xep:ExtendingJUnitAssert:ERROR \
Julien Desprez71489f32017-03-03 12:46:34 +000024 -Xep:FormatString:ERROR \
jdesprezbc580f92017-06-02 11:41:40 -070025 -Xep:GetClassOnClass:ERROR \
jdespreza0ebfbd2017-07-11 02:53:19 -070026 -Xep:IdentityBinaryExpression:ERROR \
jdesprezbc580f92017-06-02 11:41:40 -070027 -Xep:JUnit3TestNotRun:ERROR \
jdesprez9b97fa62018-01-30 10:34:35 -080028 -Xep:JUnit4ClassUsedInJUnit3:ERROR \
Julien Desprez592925f2017-03-14 12:13:37 +000029 -Xep:JUnitAmbiguousTestClass:ERROR \
Julien Desprez71489f32017-03-03 12:46:34 +000030 -Xep:MissingFail:ERROR \
Julien Desprez592925f2017-03-14 12:13:37 +000031 -Xep:MissingOverride:ERROR \
Julien Despreze2fb5aa2019-03-26 10:49:01 -070032 -Xep:ModifiedButNotUsed:ERROR \
jdesprezd0e00da2017-09-07 18:54:49 -070033 -Xep:MustBeClosedChecker:ERROR \
Julien Desprez71489f32017-03-03 12:46:34 +000034 -Xep:Overrides:ERROR \
Julien Desprez8eba9902017-03-02 14:09:04 +000035 -Xep:PackageLocation:ERROR \
Julien Despreze2fb5aa2019-03-26 10:49:01 -070036 -Xep:ParameterName:ERROR \
Julien Desprez71489f32017-03-03 12:46:34 +000037 -Xep:ReferenceEquality:ERROR \
38 -Xep:RemoveUnusedImports:ERROR \
39 -Xep:ReturnValueIgnored:ERROR \
Julien Desprez592925f2017-03-14 12:13:37 +000040 -Xep:SelfEquals:ERROR \
jdesprezbc580f92017-06-02 11:41:40 -070041 -Xep:SizeGreaterThanOrEqualsZero:ERROR \
42 -Xep:TryFailThrowable:ERROR
Julien Desprez71489f32017-03-03 12:46:34 +000043