├── docs
├── _data
│ ├── glossary.yml
│ ├── terms.yml
│ ├── definitions.yml
│ ├── strings.yml
│ ├── tags.yml
│ └── alerts.yml
├── _layouts
│ ├── none.html
│ ├── page_print.html
│ └── default_print.html
├── update.sh
├── Gemfile
├── images
│ ├── favicon.ico
│ ├── company_logo.png
│ ├── company_logo_big.png
│ └── detekt_in_action.png
├── fonts
│ ├── FontAwesome.otf
│ ├── fontawesome-webfont.eot
│ ├── fontawesome-webfont.ttf
│ ├── fontawesome-webfont.woff
│ ├── glyphicons-halflings-regular.eot
│ ├── glyphicons-halflings-regular.ttf
│ ├── glyphicons-halflings-regular.woff
│ └── glyphicons-halflings-regular.woff2
├── _includes
│ ├── inline_image.html
│ ├── callout.html
│ ├── note.html
│ ├── tip.html
│ ├── important.html
│ ├── warning.html
│ ├── archive.html
│ ├── image.html
│ ├── footer.html
│ ├── custom
│ │ ├── getting_started_series_next.html
│ │ ├── usermap.html
│ │ ├── getting_started_series.html
│ │ └── series_acme.html
│ ├── google_analytics.html
│ ├── feedback.html
│ └── toc.html
├── css
│ ├── fonts
│ │ ├── FontAwesome.otf
│ │ ├── fontawesome-webfont.eot
│ │ ├── fontawesome-webfont.ttf
│ │ ├── fontawesome-webfont.woff
│ │ └── fontawesome-webfont.woff2
│ └── boxshadowproperties.css
├── _tooltips
│ ├── soccer.html
│ ├── football.html
│ ├── baseball.html
│ └── basketball.html
├── 404.md
├── docker-compose.yml
├── pages
│ ├── tags
│ │ ├── tag_news.md
│ │ └── tag_getting_started.md
│ └── suppressing-rules.md
├── _posts
│ └── 2018-02-11-website-online.md
├── var
│ └── build.sh
├── tooltips.json
├── Dockerfile
├── sitemap.xml
├── js
│ └── jquery.ba-throttle-debounce.min.js
└── search.json
├── detekt-api
├── src
│ ├── test
│ │ ├── resources
│ │ │ ├── empty.yml
│ │ │ ├── oneitem.yml
│ │ │ ├── FilteredClass.kt
│ │ │ ├── SuppressedObject.kt
│ │ │ ├── SuppressedByAllObject.kt
│ │ │ ├── composite-test.yml
│ │ │ ├── detekt.yml
│ │ │ └── SuppressedElements.kt
│ │ └── kotlin
│ │ │ └── io
│ │ │ └── gitlab
│ │ │ └── arturbosch
│ │ │ └── detekt
│ │ │ └── api
│ │ │ └── MetricSpec.kt
│ └── main
│ │ └── kotlin
│ │ └── io
│ │ └── gitlab
│ │ └── arturbosch
│ │ └── detekt
│ │ └── api
│ │ ├── Notification.kt
│ │ ├── DetektVisitor.kt
│ │ ├── Extension.kt
│ │ ├── ConsoleReport.kt
│ │ ├── Detektion.kt
│ │ ├── ProjectMetric.kt
│ │ ├── ThresholdRule.kt
│ │ ├── SingleAssign.kt
│ │ ├── AnnotationExcluder.kt
│ │ ├── MultiRule.kt
│ │ ├── CompositeConfig.kt
│ │ ├── OutputReport.kt
│ │ ├── SplitPattern.kt
│ │ └── Entity.kt
└── build.gradle.kts
├── detekt-cli
└── src
│ ├── test
│ ├── resources
│ │ ├── empty.txt
│ │ ├── configs
│ │ │ ├── one.yml
│ │ │ ├── two.yml
│ │ │ ├── three.yml
│ │ │ ├── fail-fast-only.yml
│ │ │ └── fail-fast-override.yml
│ │ ├── invalid-smell-baseline.txt
│ │ ├── META-INF
│ │ │ └── services
│ │ │ │ ├── io.gitlab.arturbosch.detekt.api.OutputReport
│ │ │ │ ├── io.gitlab.arturbosch.detekt.api.RuleSetProvider
│ │ │ │ └── io.gitlab.arturbosch.detekt.api.ConsoleReport
│ │ ├── cases
│ │ │ └── Poko.kt
│ │ ├── findings-report.txt
│ │ ├── complexity-report.txt
│ │ └── smell-baseline.xml
│ └── kotlin
│ │ └── io
│ │ └── gitlab
│ │ └── arturbosch
│ │ └── detekt
│ │ └── cli
│ │ ├── console
│ │ └── ResourceReader.kt
│ │ └── out
│ │ └── TxtOutputReportTest.kt
│ └── main
│ ├── kotlin
│ └── io
│ │ └── gitlab
│ │ └── arturbosch
│ │ └── detekt
│ │ └── cli
│ │ ├── runners
│ │ ├── Executable.kt
│ │ └── ConfigExporter.kt
│ │ ├── baseline
│ │ ├── Listing.kt
│ │ ├── internal
│ │ │ └── package-info.java
│ │ ├── Blacklist.kt
│ │ ├── Whitelist.kt
│ │ ├── Baseline.kt
│ │ └── XmlExtensions.kt
│ │ ├── LOG.kt
│ │ ├── console
│ │ ├── NotificationReport.kt
│ │ ├── ComplexityReport.kt
│ │ ├── ComplexityMetric.kt
│ │ └── ProjectStatisticsReport.kt
│ │ ├── out
│ │ └── TxtOutputReport.kt
│ │ ├── Junk.kt
│ │ ├── DetektProgressListener.kt
│ │ └── FilteredDetectionResult.kt
│ └── resources
│ ├── META-INF
│ └── services
│ │ ├── io.gitlab.arturbosch.detekt.api.OutputReport
│ │ ├── io.gitlab.arturbosch.detekt.api.ConsoleReport
│ │ └── io.gitlab.arturbosch.detekt.api.FileProcessListener
│ └── default-html-report-template.html
├── detekt-rules
├── src
│ ├── test
│ │ ├── resources
│ │ │ ├── cases
│ │ │ │ ├── EmptyKtFile.kt
│ │ │ │ ├── NewLineAtEndOfFile.kt
│ │ │ │ ├── PreferToOverPairSyntaxNegative.kt
│ │ │ │ ├── TrailingWhitespaceNegative.kt
│ │ │ │ ├── EmptyDefaultConstructorPositive.kt
│ │ │ │ ├── NoTabsNegative.kt
│ │ │ │ ├── MultilineStringLiteralDuplication.kt
│ │ │ │ ├── Default.kt
│ │ │ │ ├── LongMethodNegative.kt
│ │ │ │ ├── NoTabsPositive.kt
│ │ │ │ ├── PreferToOverPairSyntaxPositive.kt
│ │ │ │ ├── FunctionReturningConstantNegative.kt
│ │ │ │ ├── TooGenericExceptionsOptions.kt
│ │ │ │ ├── TooManyFunctionsTopLevel.kt
│ │ │ │ ├── UnconditionalJumpStatementInLoopNegative.kt
│ │ │ │ ├── ConstInObjects.kt
│ │ │ │ ├── SwallowedExceptionPositive.kt
│ │ │ │ ├── LabeledExpressionNegative.kt
│ │ │ │ ├── EmptyDefaultConstructorNegative.kt
│ │ │ │ ├── LongMethodPositive.kt
│ │ │ │ ├── LoopWithTooManyJumpStatementsNegative.kt
│ │ │ │ ├── CollapsibleIfsPositive.kt
│ │ │ │ ├── SwallowedExceptionNegative.kt
│ │ │ │ ├── TrailingWhitespacePositive.kt
│ │ │ │ ├── MandatoryBracesIfStatementsNegative.kt
│ │ │ │ ├── MandatoryBracesIfStatementsPositive.kt
│ │ │ │ ├── ComplexInterfaceNegative.kt
│ │ │ │ ├── DataClassContainsFunctionsPositive.kt
│ │ │ │ ├── NestedClassVisibilityNegative.kt
│ │ │ │ ├── MayBeConstNegative.kt
│ │ │ │ ├── RethrowCaughtExceptionNegative.kt
│ │ │ │ ├── EmptyIfPositive.kt
│ │ │ │ ├── LoopWithTooManyJumpStatementsPositive.kt
│ │ │ │ ├── DataClassContainsFunctionsNegative.kt
│ │ │ │ ├── IteratorImplNegative.kt
│ │ │ │ ├── SerializableNegative.kt
│ │ │ │ ├── EmptyIfNegative.kt
│ │ │ │ ├── CollapsibleIfsNegative.kt
│ │ │ │ ├── OverloadedMethods.kt
│ │ │ │ ├── ComplexInterfacePositive.kt
│ │ │ │ ├── TooGenericExceptions.kt
│ │ │ │ ├── ExceptionRaisedInMethodsNegative.kt
│ │ │ │ ├── UnconditionalJumpStatementInLoopPositive.kt
│ │ │ │ ├── RethrowCaughtExceptionPositive.kt
│ │ │ │ ├── ProtectedMemberInFinalClassNegative.kt
│ │ │ │ ├── EqualsAlwaysReturnsTrueOrFalseNegative.kt
│ │ │ │ ├── NestedClassVisibilityPositive.kt
│ │ │ │ ├── SerializablePositive.kt
│ │ │ │ ├── TooManyFunctions.kt
│ │ │ │ ├── UnnecessaryAbstractClassNegative.kt
│ │ │ │ ├── ComplexClass.kt
│ │ │ │ ├── Empty.kt
│ │ │ │ ├── FunctionReturningConstantPositive.kt
│ │ │ │ ├── UnnecessaryAbstractClassPositive.kt
│ │ │ │ └── UseDataClassPositive.kt
│ │ │ ├── deactivated-exceptions.yml
│ │ │ ├── SuppressStringLiteralDuplication.kt
│ │ │ └── deactivated-empty-blocks.yml
│ │ └── kotlin
│ │ │ └── io
│ │ │ └── gitlab
│ │ │ └── arturbosch
│ │ │ └── detekt
│ │ │ └── rules
│ │ │ ├── documentation
│ │ │ └── UndocumentedPublicFunctionSpec.kt
│ │ │ ├── style
│ │ │ ├── optional
│ │ │ │ └── ConditionalPathVisitorTest.kt
│ │ │ └── NestedClassesVisibilitySpec.kt
│ │ │ ├── bugs
│ │ │ ├── UnreachableCodeSpec.kt
│ │ │ ├── ExplicitGarbageCollectionCallSpec.kt
│ │ │ └── UnsafeCastSpec.kt
│ │ │ ├── exceptions
│ │ │ └── SwallowedExceptionSpec.kt
│ │ │ ├── CommonSpec.kt
│ │ │ ├── complexity
│ │ │ ├── ComplexConditionSpec.kt
│ │ │ ├── LongMethodSpec.kt
│ │ │ └── LabeledExpressionSpec.kt
│ │ │ ├── performance
│ │ │ └── UnnecessaryTemporaryInstantiationSpec.kt
│ │ │ ├── naming
│ │ │ ├── PackageNamingSpec.kt
│ │ │ └── EnumNamingSpec.kt
│ │ │ └── empty
│ │ │ └── EmptyIfBlockSpec.kt
│ └── main
│ │ ├── kotlin
│ │ └── io
│ │ │ └── gitlab
│ │ │ └── arturbosch
│ │ │ └── detekt
│ │ │ └── rules
│ │ │ ├── AllowedExceptionNamePattern.kt
│ │ │ ├── IdentifierName.kt
│ │ │ ├── Keywords.kt
│ │ │ ├── naming
│ │ │ └── util
│ │ │ │ └── ExcludeClass.kt
│ │ │ ├── documentation
│ │ │ └── PrivateElementUtil.kt
│ │ │ ├── StringExtensions.kt
│ │ │ ├── empty
│ │ │ ├── EmptyInitBlock.kt
│ │ │ ├── EmptyElseBlock.kt
│ │ │ ├── EmptyForBlock.kt
│ │ │ ├── EmptySecondaryConstructor.kt
│ │ │ ├── EmptyWhileBlock.kt
│ │ │ ├── EmptyDoWhileBlock.kt
│ │ │ ├── EmptyFinallyBlock.kt
│ │ │ ├── EmptyKtFile.kt
│ │ │ └── EmptyWhenBlock.kt
│ │ │ ├── style
│ │ │ ├── Junk.kt
│ │ │ └── FileParsingRule.kt
│ │ │ ├── MethodSignature.kt
│ │ │ └── providers
│ │ │ └── EmptyCodeProvider.kt
│ │ └── resources
│ │ └── META-INF
│ │ └── services
│ │ └── io.gitlab.arturbosch.detekt.api.RuleSetProvider
└── build.gradle.kts
├── detekt-gradle-plugin
├── settings.gradle.kts
├── src
│ ├── main
│ │ └── kotlin
│ │ │ └── io
│ │ │ └── gitlab
│ │ │ └── arturbosch
│ │ │ └── detekt
│ │ │ ├── BuildFailure.kt
│ │ │ ├── extensions
│ │ │ ├── DetektReportType.kt
│ │ │ └── DetektReports.kt
│ │ │ ├── KotlinExtension.kt
│ │ │ └── invoke
│ │ │ └── ProcessExecutor.kt
│ └── test
│ │ └── kotlin
│ │ └── io
│ │ └── gitlab
│ │ └── arturbosch
│ │ └── detekt
│ │ ├── TestVersion.kt
│ │ ├── Submodule.kt
│ │ └── ProjectLayout.kt
└── gradle
│ └── wrapper
│ └── gradle-wrapper.properties
├── detekt-watcher
├── src
│ ├── test
│ │ └── resources
│ │ │ └── Default.kt
│ └── main
│ │ ├── resources
│ │ └── META-INF
│ │ │ └── services
│ │ │ ├── io.gitlab.arturbosch.ksh.api.Prompt
│ │ │ └── io.gitlab.arturbosch.ksh.api.ShellClass
│ │ └── kotlin
│ │ └── io
│ │ └── gitlab
│ │ └── arturbosch
│ │ └── detekt
│ │ └── watcher
│ │ ├── config
│ │ ├── ConfigProperties.kt
│ │ ├── DetektPrompt.kt
│ │ ├── DetektHome.kt
│ │ └── DependencyInjection.kt
│ │ ├── service
│ │ ├── Models.kt
│ │ └── DirectoryRegisteringVisitor.kt
│ │ └── state
│ │ └── Parameters.kt
└── README.md
├── detekt-core
├── src
│ ├── test
│ │ ├── resources
│ │ │ ├── cases
│ │ │ │ ├── KotlinScript.kts
│ │ │ │ ├── Test.kt
│ │ │ │ └── Default.kt
│ │ │ ├── empty
│ │ │ │ ├── EmptyEnum.kt
│ │ │ │ └── EmptyInterface.kt
│ │ │ ├── sample-rule-set.jar
│ │ │ ├── fields
│ │ │ │ └── ClassWithFields.kt
│ │ │ ├── META-INF
│ │ │ │ └── services
│ │ │ │ │ └── io.gitlab.arturbosch.detekt.api.RuleSetProvider
│ │ │ ├── patterns
│ │ │ │ ├── exclude-FindName.yml
│ │ │ │ └── test-pattern.yml
│ │ │ └── comments
│ │ │ │ └── CommentsClass.kt
│ │ └── kotlin
│ │ │ └── io
│ │ │ └── gitlab
│ │ │ └── arturbosch
│ │ │ └── detekt
│ │ │ └── core
│ │ │ ├── processors
│ │ │ ├── LOCVisitorTest.kt
│ │ │ ├── SLOCVisitorTest.kt
│ │ │ ├── CLOCVisitorTest.kt
│ │ │ ├── FieldCountVisitorTest.kt
│ │ │ ├── MethodCountVisitorTest.kt
│ │ │ ├── KtFileCountVisitorTest.kt
│ │ │ └── PackageCountVisitorTest.kt
│ │ │ ├── DetektSpec.kt
│ │ │ ├── KtCompilerTest.kt
│ │ │ ├── CustomRuleSetProviderSpec.kt
│ │ │ └── DetektorTest.kt
│ └── main
│ │ └── kotlin
│ │ └── io
│ │ └── gitlab
│ │ └── arturbosch
│ │ └── detekt
│ │ └── core
│ │ ├── ModificationNotification.kt
│ │ ├── processors
│ │ ├── util
│ │ │ └── Junk.kt
│ │ ├── AbstractProjectMetricProcessor.kt
│ │ ├── KtFileCountProcessor.kt
│ │ ├── ProjectLOCProcessor.kt
│ │ ├── ProjectLLOCProcessor.kt
│ │ ├── ProjectComplexityProcessor.kt
│ │ ├── AbstractProcessor.kt
│ │ ├── ClassCountProcessor.kt
│ │ ├── PropertyCountProcessor.kt
│ │ └── FunctionCountProcessor.kt
│ │ └── DebugUtils.kt
└── build.gradle.kts
├── gradle
└── wrapper
│ ├── gradle-wrapper.jar
│ └── gradle-wrapper.properties
├── detekt-formatting
└── src
│ ├── main
│ ├── resources
│ │ └── META-INF
│ │ │ └── services
│ │ │ └── io.gitlab.arturbosch.detekt.api.RuleSetProvider
│ └── kotlin
│ │ └── io
│ │ └── gitlab
│ │ └── arturbosch
│ │ └── detekt
│ │ └── formatting
│ │ ├── EditorConfigConstants.kt
│ │ └── wrappers
│ │ ├── Filename.kt
│ │ ├── FinalNewline.kt
│ │ ├── NoSemicolons.kt
│ │ ├── NoUnusedImports.kt
│ │ ├── PackageName.kt
│ │ ├── ImportOrdering.kt
│ │ ├── NoMultipleSpaces.kt
│ │ ├── ChainWrapping.kt
│ │ ├── CommentSpacing.kt
│ │ ├── NoUnitReturn.kt
│ │ ├── NoLineBreakAfterElse.kt
│ │ ├── NoWildcardImports.kt
│ │ ├── NoEmptyClassBody.kt
│ │ ├── NoTrailingSpaces.kt
│ │ ├── SpacingAroundColon.kt
│ │ ├── SpacingAroundComma.kt
│ │ ├── ModifierOrdering.kt
│ │ ├── NoItParamInMultilineLambda.kt
│ │ ├── SpacingAroundCurly.kt
│ │ ├── StringTemplate.kt
│ │ ├── NoBlankLineBeforeRbrace.kt
│ │ ├── SpacingAroundKeyword.kt
│ │ ├── SpacingAroundParens.kt
│ │ ├── NoConsecutiveBlankLines.kt
│ │ ├── SpacingAroundOperators.kt
│ │ ├── NoLineBreakBeforeAssignment.kt
│ │ └── SpacingAroundRangeOperator.kt
│ └── test
│ └── resources
│ └── autocorrect
│ ├── autocorrect-all-true.yml
│ ├── autocorrect-rule-false.yml
│ ├── autocorrect-ruleset-false.yml
│ ├── autocorrect-toplevel-false.yml
│ └── autocorrect-true-rule-active-false.yml
├── detekt-sample-extensions
├── src
│ ├── main
│ │ ├── resources
│ │ │ └── META-INF
│ │ │ │ └── services
│ │ │ │ ├── io.gitlab.arturbosch.detekt.api.RuleSetProvider
│ │ │ │ ├── io.gitlab.arturbosch.detekt.api.ConsoleReport
│ │ │ │ ├── io.gitlab.arturbosch.detekt.api.OutputReport
│ │ │ │ └── io.gitlab.arturbosch.detekt.api.FileProcessListener
│ │ └── kotlin
│ │ │ └── io
│ │ │ └── gitlab
│ │ │ └── arturbosch
│ │ │ └── detekt
│ │ │ └── sample
│ │ │ └── extensions
│ │ │ ├── reports
│ │ │ ├── QualifiedNamesConsoleReport.kt
│ │ │ ├── QualifiedNamesOutputReport.kt
│ │ │ └── Reports.kt
│ │ │ └── SampleProvider.kt
│ └── test
│ │ └── kotlin
│ │ └── io
│ │ └── gitlab
│ │ └── arturbosch
│ │ └── detekt
│ │ └── sample
│ │ └── extensions
│ │ └── processors
│ │ └── NumberOfLoopsProcessorSpec.kt
└── build.gradle.kts
├── .gitattributes
├── detekt-test
├── build.gradle.kts
└── src
│ └── main
│ └── kotlin
│ └── io
│ └── gitlab
│ └── arturbosch
│ └── detekt
│ └── test
│ ├── CompileExtensions.kt
│ ├── RuleSetExtensions.kt
│ └── Resources.kt
├── detekt-generator
└── src
│ ├── test
│ ├── resources
│ │ ├── RuleSetConfig.yml
│ │ └── RuleSet.md
│ └── kotlin
│ │ └── io
│ │ └── gitlab
│ │ └── arturbosch
│ │ └── detekt
│ │ └── generator
│ │ ├── util
│ │ └── CollectorTestExtensions.kt
│ │ └── printer
│ │ ├── RuleSetPagePrinterSpec.kt
│ │ └── ConfigPrinterSpec.kt
│ └── main
│ └── kotlin
│ └── io
│ └── gitlab
│ └── arturbosch
│ └── detekt
│ └── generator
│ ├── printer
│ ├── DocumentationPrinter.kt
│ └── rulesetpage
│ │ └── RuleSetPage.kt
│ ├── collection
│ ├── exception
│ │ ├── InvalidIssueDeclaration.kt
│ │ ├── InvalidCodeExampleDocumentationException.kt
│ │ └── InvalidDocumentationException.kt
│ ├── Configuration.kt
│ ├── Collector.kt
│ ├── RuleCollector.kt
│ └── Rule.kt
│ ├── DetektProgressListener.kt
│ └── out
│ └── AbstractWriter.kt
├── .editorconfig
├── .github
├── ISSUE_TEMPLATE
│ ├── questions.md
│ ├── feature-request--not-related-to-rules-.md
│ └── new-rule-or-changes-to-existing-rules.md
└── PULL_REQUEST_TEMPLATE.md
├── gradle.properties
├── reports
└── baseline.xml
├── settings.gradle.kts
├── commit-msg
└── .travis.yml
/docs/_data/glossary.yml:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/docs/_data/terms.yml:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/docs/_data/definitions.yml:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/detekt-api/src/test/resources/empty.yml:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/detekt-api/src/test/resources/oneitem.yml:
--------------------------------------------------------------------------------
1 | style:
--------------------------------------------------------------------------------
/detekt-cli/src/test/resources/empty.txt:
--------------------------------------------------------------------------------
1 | ...
2 |
--------------------------------------------------------------------------------
/detekt-cli/src/test/resources/configs/one.yml:
--------------------------------------------------------------------------------
1 | one: 1
--------------------------------------------------------------------------------
/detekt-cli/src/test/resources/configs/two.yml:
--------------------------------------------------------------------------------
1 | two: 2
--------------------------------------------------------------------------------
/detekt-rules/src/test/resources/cases/EmptyKtFile.kt:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/docs/_layouts/none.html:
--------------------------------------------------------------------------------
1 | ---
2 | ---
3 | {{content}}
--------------------------------------------------------------------------------
/detekt-cli/src/test/resources/configs/three.yml:
--------------------------------------------------------------------------------
1 | three: 3
--------------------------------------------------------------------------------
/detekt-cli/src/test/resources/configs/fail-fast-only.yml:
--------------------------------------------------------------------------------
1 | failFast: true
--------------------------------------------------------------------------------
/detekt-rules/src/test/resources/cases/NewLineAtEndOfFile.kt:
--------------------------------------------------------------------------------
1 | class Test
2 |
--------------------------------------------------------------------------------
/detekt-cli/src/test/resources/invalid-smell-baseline.txt:
--------------------------------------------------------------------------------
1 | // empty on purpose
2 |
--------------------------------------------------------------------------------
/detekt-gradle-plugin/settings.gradle.kts:
--------------------------------------------------------------------------------
1 | enableFeaturePreview("STABLE_PUBLISHING")
2 |
--------------------------------------------------------------------------------
/docs/update.sh:
--------------------------------------------------------------------------------
1 | git add .
2 | git status
3 | git commit -m "content update"
4 | git push
--------------------------------------------------------------------------------
/detekt-watcher/src/test/resources/Default.kt:
--------------------------------------------------------------------------------
1 | @Suppress("unused")
2 | private val x = 0
3 |
--------------------------------------------------------------------------------
/detekt-core/src/test/resources/cases/KotlinScript.kts:
--------------------------------------------------------------------------------
1 | package test
2 |
3 | println("Hello World")
--------------------------------------------------------------------------------
/docs/Gemfile:
--------------------------------------------------------------------------------
1 | source "https://rubygems.org"
2 |
3 | gem 'github-pages', group: :jekyll_plugins
4 |
--------------------------------------------------------------------------------
/docs/images/favicon.ico:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/bjoernQ/detekt/master/docs/images/favicon.ico
--------------------------------------------------------------------------------
/docs/fonts/FontAwesome.otf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/bjoernQ/detekt/master/docs/fonts/FontAwesome.otf
--------------------------------------------------------------------------------
/docs/images/company_logo.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/bjoernQ/detekt/master/docs/images/company_logo.png
--------------------------------------------------------------------------------
/docs/_includes/inline_image.html:
--------------------------------------------------------------------------------
1 |
2 |
--------------------------------------------------------------------------------
/docs/css/fonts/FontAwesome.otf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/bjoernQ/detekt/master/docs/css/fonts/FontAwesome.otf
--------------------------------------------------------------------------------
/docs/_tooltips/soccer.html:
--------------------------------------------------------------------------------
1 | ---
2 | doc_id: soccer
3 | product: mydoc
4 | ---
5 |
6 | {{site.data.definitions.soccer}}
--------------------------------------------------------------------------------
/docs/images/company_logo_big.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/bjoernQ/detekt/master/docs/images/company_logo_big.png
--------------------------------------------------------------------------------
/docs/images/detekt_in_action.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/bjoernQ/detekt/master/docs/images/detekt_in_action.png
--------------------------------------------------------------------------------
/gradle/wrapper/gradle-wrapper.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/bjoernQ/detekt/master/gradle/wrapper/gradle-wrapper.jar
--------------------------------------------------------------------------------
/detekt-core/src/test/resources/empty/EmptyEnum.kt:
--------------------------------------------------------------------------------
1 | package empty
2 |
3 | @Suppress("Unused")
4 | enum class EmptyEnum
5 |
--------------------------------------------------------------------------------
/docs/_tooltips/football.html:
--------------------------------------------------------------------------------
1 | ---
2 | doc_id: football
3 | product: mydoc
4 | ---
5 |
6 | {{site.data.definitions.football}}
--------------------------------------------------------------------------------
/docs/fonts/fontawesome-webfont.eot:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/bjoernQ/detekt/master/docs/fonts/fontawesome-webfont.eot
--------------------------------------------------------------------------------
/docs/fonts/fontawesome-webfont.ttf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/bjoernQ/detekt/master/docs/fonts/fontawesome-webfont.ttf
--------------------------------------------------------------------------------
/docs/fonts/fontawesome-webfont.woff:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/bjoernQ/detekt/master/docs/fonts/fontawesome-webfont.woff
--------------------------------------------------------------------------------
/docs/_includes/callout.html:
--------------------------------------------------------------------------------
1 |
{% assign series_pages = site.tags.series_acme %} 2 | {% for p in pages %} 3 | {% if p.series == "Getting Started" %} 4 | {% assign nextTopic = page.weight | plus: "1" %} 5 | {% if p.weight == nextTopic %} 6 | 7 | {% endif %} 8 | {% endif %} 9 | {% endfor %} 10 |
-------------------------------------------------------------------------------- /detekt-rules/src/main/kotlin/io/gitlab/arturbosch/detekt/rules/naming/util/ExcludeClass.kt: -------------------------------------------------------------------------------- 1 | package io.gitlab.arturbosch.detekt.rules.naming.util 2 | 3 | import io.gitlab.arturbosch.detekt.rules.identifierName 4 | import org.jetbrains.kotlin.psi.KtDeclaration 5 | import org.jetbrains.kotlin.psi.psiUtil.containingClassOrObject 6 | 7 | internal fun KtDeclaration.isContainingExcludedClass(pattern: Regex) = 8 | containingClassOrObject?.identifierName()?.matches(pattern) == true 9 | -------------------------------------------------------------------------------- /detekt-rules/src/test/resources/cases/TrailingWhitespacePositive.kt: -------------------------------------------------------------------------------- 1 | package cases 2 | 3 | // reports 1 - line with just one space 4 | 5 | // reports 1 - a comment with trailing space 6 | // A comment 7 | // reports 1 8 | class TrailingWhitespacePositive { 9 | // reports 1 - line with just one tab 10 | 11 | // reports 1 12 | fun myFunction() { 13 | // reports 1 - line with 1 trailing tab 14 | println("A message") 15 | // reports 1 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /detekt-rules/src/main/kotlin/io/gitlab/arturbosch/detekt/rules/documentation/PrivateElementUtil.kt: -------------------------------------------------------------------------------- 1 | package io.gitlab.arturbosch.detekt.rules.documentation 2 | 3 | import org.jetbrains.kotlin.lexer.KtTokens 4 | import org.jetbrains.kotlin.psi.KtDeclaration 5 | 6 | internal fun KtDeclaration.hasCommentInPrivateMember(): Boolean { 7 | val modifiers = this.modifierList 8 | return modifiers != null && docComment != null && modifiers.hasModifier(KtTokens.PRIVATE_KEYWORD) 9 | } 10 | -------------------------------------------------------------------------------- /detekt-rules/src/test/resources/cases/MandatoryBracesIfStatementsNegative.kt: -------------------------------------------------------------------------------- 1 | package cases 2 | 3 | @Suppress("unused", "ConstantConditionIf") 4 | fun mandatoryBracesIfStatementNegative() { 5 | if (true) { 6 | println() 7 | } 8 | 9 | if (true) 10 | { 11 | println() 12 | } 13 | 14 | if (true) println() 15 | 16 | if (true) { println() } 17 | 18 | if (true) println() else println() 19 | 20 | if (true) println() else if (false) println() else println() 21 | } 22 | -------------------------------------------------------------------------------- /detekt-rules/src/test/resources/cases/MandatoryBracesIfStatementsPositive.kt: -------------------------------------------------------------------------------- 1 | package cases 2 | 3 | @Suppress("unused", "ConstantConditionIf", "CascadeIf") 4 | fun mandatoryBracesIfStatementPositive() { 5 | if (true) 6 | println() 7 | 8 | if (true) 9 | println() 10 | else 11 | println() 12 | 13 | if (true) 14 | println() 15 | else if (false) 16 | println() 17 | else 18 | println() 19 | 20 | if (true) { 21 | println() 22 | } else 23 | println() 24 | } 25 | -------------------------------------------------------------------------------- /detekt-rules/src/test/resources/cases/ComplexInterfaceNegative.kt: -------------------------------------------------------------------------------- 1 | @file:Suppress("unused", "UNUSED_VARIABLE") 2 | 3 | package cases 4 | 5 | interface InterfaceOk1 { 6 | fun f1() 7 | fun fImpl() { 8 | val x = 0 // should not report 9 | } 10 | val i1: Int 11 | // a comment shouldn't be detected 12 | } 13 | 14 | interface InterfaceOk2 { 15 | fun f1() 16 | 17 | companion object { 18 | fun sf() = 0 19 | const val c = 0 20 | } 21 | } 22 | 23 | interface EmptyInterface 24 | -------------------------------------------------------------------------------- /detekt-test/src/main/kotlin/io/gitlab/arturbosch/detekt/test/CompileExtensions.kt: -------------------------------------------------------------------------------- 1 | package io.gitlab.arturbosch.detekt.test 2 | 3 | import java.nio.file.Path 4 | 5 | /** 6 | * Use this method if you define a kt file/class as a plain string in your test. 7 | */ 8 | fun compileContentForTest(content: String) = KtTestCompiler.compileFromContent(content) 9 | 10 | /** 11 | * Use this method if you test a kt file/class in the test resources. 12 | */ 13 | fun compileForTest(path: Path) = KtTestCompiler.compile(path) 14 | -------------------------------------------------------------------------------- /reports/baseline.xml: -------------------------------------------------------------------------------- 1 | 2 |