blob: 347c1f5875cd56a065156cda7985473fb8f5fa84 [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 Desprez71489f32017-03-03 12:46:34 +000023 -Xep:FormatString:ERROR \
jdesprezbc580f92017-06-02 11:41:40 -070024 -Xep:GetClassOnClass:ERROR \
jdespreza0ebfbd2017-07-11 02:53:19 -070025 -Xep:IdentityBinaryExpression:ERROR \
jdesprezbc580f92017-06-02 11:41:40 -070026 -Xep:JUnit3TestNotRun:ERROR \
Julien Desprez592925f2017-03-14 12:13:37 +000027 -Xep:JUnitAmbiguousTestClass:ERROR \
Julien Desprez71489f32017-03-03 12:46:34 +000028 -Xep:MissingFail:ERROR \
Julien Desprez592925f2017-03-14 12:13:37 +000029 -Xep:MissingOverride:ERROR \
Julien Desprez71489f32017-03-03 12:46:34 +000030 -Xep:Overrides:ERROR \
Julien Desprez8eba9902017-03-02 14:09:04 +000031 -Xep:PackageLocation:ERROR \
Julien Desprez71489f32017-03-03 12:46:34 +000032 -Xep:ReferenceEquality:ERROR \
33 -Xep:RemoveUnusedImports:ERROR \
34 -Xep:ReturnValueIgnored:ERROR \
Julien Desprez592925f2017-03-14 12:13:37 +000035 -Xep:SelfEquals:ERROR \
jdesprezbc580f92017-06-02 11:41:40 -070036 -Xep:SizeGreaterThanOrEqualsZero:ERROR \
37 -Xep:TryFailThrowable:ERROR
Julien Desprez71489f32017-03-03 12:46:34 +000038