Detekt Config (detekt.yml)
1.14.1Schema URL
Type:
object
Properties
build
object
3 nested properties
maxIssues
number
excludeCorrectable
boolean
weights
Record<string, number>
config
object
3 nested properties
validation
boolean
warningsAsErrors
boolean
excludes
string
processors
object
2 nested properties
active
boolean
exclude
string[]
console-reports
object
2 nested properties
active
boolean
exclude
string[]
output-reports
object
2 nested properties
active
boolean
exclude
array | null
comments
object
9 nested properties
active
boolean
excludes
string[]
AbsentOrWrongFileLicense
object
2 nested properties
active
boolean
licenseTemplateFile
string
CommentOverPrivateFunction
object
1 nested properties
active
boolean
CommentOverPrivateProperty
object
1 nested properties
active
boolean
EndOfSentenceFormat
object
2 nested properties
active
boolean
endOfSentenceFormat
string
UndocumentedPublicClass
object
5 nested properties
active
boolean
searchInNestedClass
boolean
searchInInnerClass
boolean
searchInInnerObject
boolean
searchInInnerInterface
boolean
UndocumentedPublicFunction
object
1 nested properties
active
boolean
UndocumentedPublicProperty
object
1 nested properties
active
boolean
complexity
object
13 nested properties
active
boolean
ComplexCondition
object
2 nested properties
active
boolean
threshold
number
ComplexInterface
object
4 nested properties
active
boolean
threshold
number
includeStaticDeclarations
boolean
includePrivateDeclarations
boolean
ComplexMethod
object
6 nested properties
active
boolean
threshold
number
ignoreSingleWhenExpression
boolean
ignoreSimpleWhenEntries
boolean
ignoreNestingFunctions
boolean
nestingFunctions
string[]
LabeledExpression
object
2 nested properties
active
boolean
ignoredLabels
string[]
LargeClass
object
2 nested properties
active
boolean
threshold
number
LongMethod
object
2 nested properties
active
boolean
threshold
number
LongParameterList
object
6 nested properties
active
boolean
functionThreshold
number
constructorThreshold
number
ignoreDefaultParameters
boolean
ignoreDataClasses
boolean
ignoreAnnotated
string[]
MethodOverloading
object
2 nested properties
active
boolean
threshold
number
NestedBlockDepth
object
2 nested properties
active
boolean
threshold
number
ReplaceSafeCallChainWithRun
object
1 nested properties
active
boolean
StringLiteralDuplication
object
6 nested properties
active
boolean
excludes
string[]
threshold
number
ignoreAnnotation
boolean
excludeStringsWithLessThan5Characters
boolean
ignoreStringsRegex
string
TooManyFunctions
object
10 nested properties
active
boolean
excludes
string[]
thresholdInFiles
number
thresholdInClasses
number
thresholdInInterfaces
number
thresholdInObjects
number
thresholdInEnums
number
ignoreDeprecated
boolean
ignorePrivate
boolean
ignoreOverridden
boolean
coroutines
object
4 nested properties
active
boolean
GlobalCoroutineUsage
object
1 nested properties
active
boolean
RedundantSuspendModifier
object
1 nested properties
active
boolean
SuspendFunWithFlowReturnType
object
1 nested properties
active
boolean
empty-blocks
object
16 nested properties
active
boolean
EmptyCatchBlock
object
2 nested properties
active
boolean
allowedExceptionNameRegex
string
EmptyClassBlock
object
1 nested properties
active
boolean
EmptyDefaultConstructor
object
1 nested properties
active
boolean
EmptyDoWhileBlock
object
1 nested properties
active
boolean
EmptyElseBlock
object
1 nested properties
active
boolean
EmptyFinallyBlock
object
1 nested properties
active
boolean
EmptyForBlock
object
1 nested properties
active
boolean
EmptyFunctionBlock
object
2 nested properties
active
boolean
ignoreOverridden
boolean
EmptyIfBlock
object
1 nested properties
active
boolean
EmptyInitBlock
object
1 nested properties
active
boolean
EmptyKtFile
object
1 nested properties
active
boolean
EmptySecondaryConstructor
object
1 nested properties
active
boolean
EmptyTryBlock
object
1 nested properties
active
boolean
EmptyWhenBlock
object
1 nested properties
active
boolean
EmptyWhileBlock
object
1 nested properties
active
boolean
exceptions
object
14 nested properties
active
boolean
ExceptionRaisedInUnexpectedLocation
object
2 nested properties
active
boolean
methodNames
string[]
InstanceOfCheckForException
object
2 nested properties
active
boolean
excludes
string[]
NotImplementedDeclaration
object
1 nested properties
active
boolean
PrintStackTrace
object
1 nested properties
active
boolean
RethrowCaughtException
object
1 nested properties
active
boolean
ReturnFromFinally
object
2 nested properties
active
boolean
ignoreLabeled
boolean
SwallowedException
object
3 nested properties
active
boolean
ignoredExceptionTypes
string[]
allowedExceptionNameRegex
string
ThrowingExceptionFromFinally
object
1 nested properties
active
boolean
ThrowingExceptionInMain
object
1 nested properties
active
boolean
ThrowingExceptionsWithoutMessageOrCause
object
3 nested properties
active
boolean
excludes
string[]
exceptions
string[]
ThrowingNewInstanceOfSameException
object
1 nested properties
active
boolean
TooGenericExceptionCaught
object
4 nested properties
active
boolean
excludes
string[]
exceptionNames
string[]
allowedExceptionNameRegex
string
TooGenericExceptionThrown
object
2 nested properties
active
boolean
exceptionNames
string[]
formatting
object
42 nested properties
active
boolean
android
boolean
autoCorrect
boolean
AnnotationOnSeparateLine
object
2 nested properties
active
boolean
autoCorrect
boolean
AnnotationSpacing
object
2 nested properties
active
boolean
autoCorrect
boolean
ArgumentListWrapping
object
2 nested properties
active
boolean
autoCorrect
boolean
ChainWrapping
object
2 nested properties
active
boolean
autoCorrect
boolean
CommentSpacing
object
2 nested properties
active
boolean
autoCorrect
boolean
EnumEntryNameCase
object
2 nested properties
active
boolean
autoCorrect
boolean
Filename
object
1 nested properties
active
boolean
FinalNewline
object
3 nested properties
active
boolean
autoCorrect
boolean
insertFinalNewLine
boolean
ImportOrdering
object
3 nested properties
active
boolean
autoCorrect
boolean
layout
string
Indentation
object
4 nested properties
active
boolean
autoCorrect
boolean
indentSize
number
continuationIndentSize
number
MaximumLineLength
object
2 nested properties
active
boolean
maxLineLength
number
ModifierOrdering
object
2 nested properties
active
boolean
autoCorrect
boolean
MultiLineIfElse
object
2 nested properties
active
boolean
autoCorrect
boolean
NoBlankLineBeforeRbrace
object
2 nested properties
active
boolean
autoCorrect
boolean
NoConsecutiveBlankLines
object
2 nested properties
active
boolean
autoCorrect
boolean
NoEmptyClassBody
object
2 nested properties
active
boolean
autoCorrect
boolean
NoEmptyFirstLineInMethodBlock
object
2 nested properties
active
boolean
autoCorrect
boolean
NoLineBreakAfterElse
object
2 nested properties
active
boolean
autoCorrect
boolean
NoLineBreakBeforeAssignment
object
2 nested properties
active
boolean
autoCorrect
boolean
NoMultipleSpaces
object
2 nested properties
active
boolean
autoCorrect
boolean
NoSemicolons
object
2 nested properties
active
boolean
autoCorrect
boolean
NoTrailingSpaces
object
2 nested properties
active
boolean
autoCorrect
boolean
NoUnitReturn
object
2 nested properties
active
boolean
autoCorrect
boolean
NoUnusedImports
object
2 nested properties
active
boolean
autoCorrect
boolean
NoWildcardImports
object
1 nested properties
active
boolean
PackageName
object
2 nested properties
active
boolean
autoCorrect
boolean
ParameterListWrapping
object
3 nested properties
active
boolean
autoCorrect
boolean
indentSize
number
SpacingAroundColon
object
2 nested properties
active
boolean
autoCorrect
boolean
SpacingAroundComma
object
2 nested properties
active
boolean
autoCorrect
boolean
SpacingAroundCurly
object
2 nested properties
active
boolean
autoCorrect
boolean
SpacingAroundDot
object
2 nested properties
active
boolean
autoCorrect
boolean
SpacingAroundDoubleColon
object
2 nested properties
active
boolean
autoCorrect
boolean
SpacingAroundKeyword
object
2 nested properties
active
boolean
autoCorrect
boolean
SpacingAroundOperators
object
2 nested properties
active
boolean
autoCorrect
boolean
SpacingAroundParens
object
2 nested properties
active
boolean
autoCorrect
boolean
SpacingAroundRangeOperator
object
2 nested properties
active
boolean
autoCorrect
boolean
SpacingBetweenDeclarationsWithAnnotations
object
2 nested properties
active
boolean
autoCorrect
boolean
SpacingBetweenDeclarationsWithComments
object
2 nested properties
active
boolean
autoCorrect
boolean
StringTemplate
object
2 nested properties
active
boolean
autoCorrect
boolean
naming
object
19 nested properties
active
boolean
ClassNaming
object
3 nested properties
active
boolean
excludes
string[]
classPattern
string
ConstructorParameterNaming
object
6 nested properties
active
boolean
excludes
string[]
parameterPattern
string
privateParameterPattern
string
excludeClassPattern
string
ignoreOverridden
boolean
EnumNaming
object
3 nested properties
active
boolean
excludes
string[]
enumEntryPattern
string
ForbiddenClassName
object
3 nested properties
active
boolean
excludes
string[]
forbiddenName
string[]
FunctionMaxLength
object
3 nested properties
active
boolean
excludes
string[]
maximumFunctionNameLength
number
FunctionMinLength
object
3 nested properties
active
boolean
excludes
string[]
minimumFunctionNameLength
number
FunctionNaming
object
6 nested properties
active
boolean
excludes
string[]
functionPattern
string
excludeClassPattern
string
ignoreOverridden
boolean
ignoreAnnotated
string[]
FunctionParameterNaming
object
5 nested properties
active
boolean
excludes
string[]
parameterPattern
string
excludeClassPattern
string
ignoreOverridden
boolean
InvalidPackageDeclaration
object
2 nested properties
active
boolean
rootPackage
string
MatchingDeclarationName
object
2 nested properties
active
boolean
mustBeFirst
boolean
MemberNameEqualsClassName
object
2 nested properties
active
boolean
ignoreOverridden
boolean
NonBooleanPropertyPrefixedWithIs
object
2 nested properties
active
boolean
excludes
string[]
ObjectPropertyNaming
object
5 nested properties
active
boolean
excludes
string[]
constantPattern
string
propertyPattern
string
privatePropertyPattern
string
PackageNaming
object
3 nested properties
active
boolean
excludes
string[]
packagePattern
string
TopLevelPropertyNaming
object
5 nested properties
active
boolean
excludes
string[]
constantPattern
string
propertyPattern
string
privatePropertyPattern
string
VariableMaxLength
object
3 nested properties
active
boolean
excludes
string[]
maximumVariableNameLength
number
VariableMinLength
object
3 nested properties
active
boolean
excludes
string[]
minimumVariableNameLength
number
VariableNaming
object
6 nested properties
active
boolean
excludes
string[]
variablePattern
string
privateVariablePattern
string
excludeClassPattern
string
ignoreOverridden
boolean
performance
object
5 nested properties
active
boolean
ArrayPrimitive
object
1 nested properties
active
boolean
ForEachOnRange
object
2 nested properties
active
boolean
excludes
string[]
SpreadOperator
object
2 nested properties
active
boolean
excludes
string[]
UnnecessaryTemporaryInstantiation
object
1 nested properties
active
boolean
potential-bugs
object
26 nested properties
active
boolean
Deprecation
object
1 nested properties
active
boolean
DuplicateCaseInWhenExpression
object
1 nested properties
active
boolean
EqualsAlwaysReturnsTrueOrFalse
object
1 nested properties
active
boolean
EqualsWithHashCodeExist
object
1 nested properties
active
boolean
ExplicitGarbageCollectionCall
object
1 nested properties
active
boolean
HasPlatformType
object
1 nested properties
active
boolean
IgnoredReturnValue
object
3 nested properties
active
boolean
restrictToAnnotatedMethods
boolean
returnValueAnnotations
string[]
ImplicitDefaultLocale
object
1 nested properties
active
boolean
ImplicitUnitReturnType
object
2 nested properties
active
boolean
allowExplicitReturnType
boolean
InvalidRange
object
1 nested properties
active
boolean
IteratorHasNextCallsNextMethod
object
1 nested properties
active
boolean
IteratorNotThrowingNoSuchElementException
object
1 nested properties
active
boolean
LateinitUsage
object
4 nested properties
active
boolean
excludes
string[]
excludeAnnotatedProperties
string[]
ignoreOnClassesPattern
string
MapGetWithNotNullAssertionOperator
object
1 nested properties
active
boolean
MissingWhenCase
object
1 nested properties
active
boolean
NullableToStringCall
object
1 nested properties
active
boolean
RedundantElseInWhen
object
1 nested properties
active
boolean
UnconditionalJumpStatementInLoop
object
1 nested properties
active
boolean
UnnecessaryNotNullOperator
object
1 nested properties
active
boolean
UnnecessarySafeCall
object
1 nested properties
active
boolean
UnreachableCode
object
1 nested properties
active
boolean
UnsafeCallOnNullableType
object
1 nested properties
active
boolean
UnsafeCast
object
1 nested properties
active
boolean
UselessPostfixExpression
object
1 nested properties
active
boolean
WrongEqualsTypeParameter
object
1 nested properties
active
boolean
style
object
64 nested properties
active
boolean
ClassOrdering
object
1 nested properties
active
boolean
CollapsibleIfStatements
object
1 nested properties
active
boolean
DataClassContainsFunctions
object
2 nested properties
active
boolean
conversionFunctionPrefix
string
DataClassShouldBeImmutable
object
1 nested properties
active
boolean
EqualsNullCall
object
1 nested properties
active
boolean
EqualsOnSignatureLine
object
1 nested properties
active
boolean
ExplicitCollectionElementAccessMethod
object
1 nested properties
active
boolean
ExplicitItLambdaParameter
object
1 nested properties
active
boolean
ExpressionBodySyntax
object
2 nested properties
active
boolean
includeLineWrapping
boolean
ForbiddenComment
object
3 nested properties
active
boolean
values
string[]
allowedPatterns
string
ForbiddenImport
object
3 nested properties
active
boolean
imports
string[]
forbiddenPatterns
string
ForbiddenMethodCall
object
2 nested properties
active
boolean
methods
string[]
ForbiddenPublicDataClass
object
2 nested properties
active
boolean
ignorePackages
string[]
ForbiddenVoid
object
3 nested properties
active
boolean
ignoreOverridden
boolean
ignoreUsageInGenerics
boolean
FunctionOnlyReturningConstant
object
4 nested properties
active
boolean
ignoreOverridableFunction
boolean
excludedFunctions
string
excludeAnnotatedFunction
string[]
LibraryCodeMustSpecifyReturnType
object
1 nested properties
active
boolean
LibraryEntitiesShouldNotBePublic
object
1 nested properties
active
boolean
LoopWithTooManyJumpStatements
object
2 nested properties
active
boolean
maxJumpCount
number
MagicNumber
object
12 nested properties
active
boolean
excludes
string[]
ignoreNumbers
string[]
ignoreHashCodeFunction
boolean
ignorePropertyDeclaration
boolean
ignoreLocalVariableDeclaration
boolean
ignoreConstantDeclaration
boolean
ignoreCompanionObjectPropertyDeclaration
boolean
ignoreAnnotation
boolean
ignoreNamedArgument
boolean
ignoreEnums
boolean
ignoreRanges
boolean
MandatoryBracesIfStatements
object
1 nested properties
active
boolean
MandatoryBracesLoops
object
1 nested properties
active
boolean
MaxLineLength
object
5 nested properties
active
boolean
maxLineLength
number
excludePackageStatements
boolean
excludeImportStatements
boolean
excludeCommentStatements
boolean
MayBeConst
object
1 nested properties
active
boolean
ModifierOrder
object
1 nested properties
active
boolean
NestedClassesVisibility
object
1 nested properties
active
boolean
NewLineAtEndOfFile
object
1 nested properties
active
boolean
NoTabs
object
1 nested properties
active
boolean
OptionalAbstractKeyword
object
1 nested properties
active
boolean
OptionalUnit
object
1 nested properties
active
boolean
OptionalWhenBraces
object
1 nested properties
active
boolean
PreferToOverPairSyntax
object
1 nested properties
active
boolean
ProtectedMemberInFinalClass
object
1 nested properties
active
boolean
RedundantExplicitType
object
1 nested properties
active
boolean
RedundantVisibilityModifierRule
object
1 nested properties
active
boolean
ReturnCount
object
6 nested properties
active
boolean
max
number
excludedFunctions
string
excludeLabeled
boolean
excludeReturnFromLambda
boolean
excludeGuardClauses
boolean
SafeCast
object
1 nested properties
active
boolean
SerialVersionUIDInSerializableClass
object
1 nested properties
active
boolean
SpacingBetweenPackageAndImports
object
1 nested properties
active
boolean
ThrowsCount
object
2 nested properties
active
boolean
max
number
TrailingWhitespace
object
1 nested properties
active
boolean
UnderscoresInNumericLiterals
object
2 nested properties
active
boolean
acceptableDecimalLength
number
UnnecessaryAbstractClass
object
2 nested properties
active
boolean
excludeAnnotatedClasses
string[]
UnnecessaryAnnotationUseSiteTarget
object
1 nested properties
active
boolean
UnnecessaryApply
object
1 nested properties
active
boolean
UnnecessaryInheritance
object
1 nested properties
active
boolean
UnnecessaryLet
object
1 nested properties
active
boolean
UnnecessaryParentheses
object
1 nested properties
active
boolean
UntilInsteadOfRangeTo
object
1 nested properties
active
boolean
UnusedImports
object
1 nested properties
active
boolean
UnusedPrivateClass
object
1 nested properties
active
boolean
UnusedPrivateMember
object
2 nested properties
active
boolean
allowedNames
string
UseArrayLiteralsInAnnotations
object
1 nested properties
active
boolean
UseCheckNotNull
object
1 nested properties
active
boolean
UseCheckOrError
object
1 nested properties
active
boolean
UseDataClass
object
3 nested properties
active
boolean
excludeAnnotatedClasses
string[]
allowVars
boolean
UseEmptyCounterpart
object
1 nested properties
active
boolean
UseIfInsteadOfWhen
object
1 nested properties
active
boolean
UseRequire
object
1 nested properties
active
boolean
UseRequireNotNull
object
1 nested properties
active
boolean
UselessCallOnNotNull
object
1 nested properties
active
boolean
UtilityClassWithPublicConstructor
object
1 nested properties
active
boolean
VarCouldBeVal
object
1 nested properties
active
boolean
WildcardImport
object
3 nested properties
active
boolean
excludes
string[]
excludeImports
string[]