Skip to content

Instantly share code, notes, and snippets.

@mediavrog
Last active April 20, 2023 15:20
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mediavrog/45e2b4d0a3fbdc30dfae481e7fdf72d9 to your computer and use it in GitHub Desktop.
Save mediavrog/45e2b4d0a3fbdc30dfae481e7fdf72d9 to your computer and use it in GitHub Desktop.
[detekt-rules build.gradle]
apply plugin: 'kotlin'
dependencies {
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk8:${versions.kotlin}"
implementation "io.gitlab.arturbosch.detekt:detekt-api:${versions.detekt}"
implementation "io.gitlab.arturbosch.detekt:detekt-cli:${versions.detekt}"
testImplementation "io.gitlab.arturbosch.detekt:detekt-test:${versions.detekt}"
testImplementation "junit:junit:${versions.jUnit}"
}
[README.md]
# detekt-rules
This module contains custom [detekt](https://github.com/arturbosch/detekt) rule sets to detect violations against our [code convention](https://kotlinlang.org/docs/reference/coding-conventions.html).
To create your own custom rule set, go through the official [doc](https://arturbosch.github.io/detekt/extensions.html) and take a look at existing source/test classes.
## Links
- [Extending detekt | A static code analyzer for Kotlin](https://arturbosch.github.io/detekt/extensions.html)
- [PsiViewer - plugin for IntelliJ IDEs | JetBrains](https://plugins.jetbrains.com/plugin/227-psiviewer)
[detekt.gradle]
dependencies {
detektPlugins "io.gitlab.arturbosch.detekt:detekt-formatting:${versions.detekt}"
detekt("io.gitlab.arturbosch.detekt:detekt-cli:${versions.detekt}")
detekt project(":detekt-rules")
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment