A set of very opinionated lint rules.
compile 'com.vanniktech:lint-rules-android:0.5.0'
compile 'com.vanniktech:lint-rules-android:0.6.0-SNAPSHOT'
- WindowFindViewById - Marks the usage of
findViewById()
onWindow
. - ViewFindViewById - Marks the usage of
findViewById()
onView
. - DialogFindViewById - Marks the usage of
findViewById()
onDialog
. - ActivityFindViewById - Marks the usage of
findViewById()
onActivity
. - ResourcesGetDrawable - Marks the usage of the deprecated method
getDrawable()
onContext
. - ResourcesGetColor - Marks the usage of the deprecated method
getColor()
onContext
. - ResourcesGetColorStateList - Marks the usage of the deprecated method
getColorStateList()
onContext
. - RawColor - Marks raw color values in drawable and layout xml files.
- RawDimen - Marks raw dimen values in drawable and layout xml files.
- WrongViewIdFormat - Marks Android View Ids that are not in lowerCamelCase format.
- WrongMenuIdFormat - Marks Android Menu Ids that are not in lowerCamelCase format.
- InvalidSingleLineComment - Marks single line comments that are not sentences.
- InvalidString - Marks invalid XML strings that contains for instance line breaks instead of
\n
or trailing whitespace. - MatchingMenuId - Marks Menu ids that do not match to the name of the menu file.
- MatchingViewIdDetector - Marks View ids that do not match to the name of the View file.
- ShouldUseStaticImport - Marks references that should be statically imported instead (e.g. Collections.singletonList, TimeUnit.SECONDS, etc..).
- SuperfluousMarginDeclarationDetector - Marks margin declaration where all the values for start, end, top and bottom are the same.
- SuperfluousPaddingDeclarationDetector - Marks padding declaration where all the values for start, end, top and bottom are the same.
- WrongConstraintLayoutUsage - Marks usages of references to
left
,right
(e.g.layout_constraintLeft_toLeftOf
) that do not necessarily support RTL. - MissingXmlHeader - Marks xml files where the xml header is missing.
- WrongTestMethodName - Marks test methods that are starting with test.
- WrongLayoutName - Marks layout files that are not prefixed with a certain whitelisted strings e.g. (activity_, dialog_, bottom_sheet_, divider_, etc.).
- AnnotationOrderDetector - Marks annotations that are not in the correct order. e.g. (@Deprecated comes before @Override and so on).
compile 'com.vanniktech:lint-rules-rxjava2:0.5.0'
compile 'com.vanniktech:lint-rules-rxjava2:0.6.0-SNAPSHOT
- SubscribeMissingErrorConsumer - Marks all usages of
subscribe()
method without an errorConsumer
. - CompositeDisposableDispose - Marks the usage of
dispose()
onCompositeDisposable
. - CompositeDisposableAddAll - Marks the usage of
addAll()
onCompositeDisposable
. - MissingCompositeDisposableClear - Marks
CompositeDisposable
fields whereclear()
is not called. - MethodMissingCheckReturnValue - Marks methods that return classes from io.reactivex.* like:
Observable
,Flowable
,Maybe
,Single
,Completable
,TestObserver
,TestSubscriber
orDisposable
that do not have the@CheckReturnValue
annotation.
Copyright (C) 2017 Vanniktech - Niklas Baudy
Licensed under the Apache License, Version 2.0