Skip to content

Commit

Permalink
Merge pull request #810 from Kotlin/linter-docs-website-update
Browse files Browse the repository at this point in the history
Small update to the linter information for the documentation website
  • Loading branch information
Jolanrensen authored Aug 7, 2024
2 parents ff5b397 + bc165da commit 7c99657
Showing 1 changed file with 14 additions and 2 deletions.
16 changes: 14 additions & 2 deletions docs/StardustDocs/topics/gettingStartedGradleAdvanced.md
Original file line number Diff line number Diff line change
Expand Up @@ -154,13 +154,16 @@ dependencies {
#### Linter configuration

We provide a Gradle plugin that generates interfaces with your data.
Use this configuration to prevent linter from complaining about formatting in the generated sources.
If you're using any sort of linter, it might complain about them generated sources.

Use a configuration similar to this to prevent your linter from complaining about the
formatting of the generated sources.

<tabs>
<tab title="Kotlin DSL">

```kotlin
// (Only if you use kotlint) Excludes for `kotlint`:
// Exclusions for `kotlinter`, if you use it:
tasks.withType<org.jmailen.gradle.kotlinter.tasks.LintTask> {
exclude {
it.name.endsWith(".Generated.kt")
Expand All @@ -176,6 +179,7 @@ tasks.withType<org.jmailen.gradle.kotlinter.tasks.LintTask> {
<tab title="Groovy DSL">

```groovy
// Exclusions for `kotlinter`, if you use it:
tasks.withType(org.jmailen.gradle.kotlinter.tasks.LintTask).all {
exclude {
it.name.endsWith(".Generated.kt")
Expand All @@ -186,6 +190,14 @@ tasks.withType(org.jmailen.gradle.kotlinter.tasks.LintTask).all {
}
```

</tab>
<tab title=".editorconfig">

```.editorconfig
[{**/*.Generated.kt,**/*$Extensions.kt}]
ktlint = disabled
```

</tab>

</tabs>

0 comments on commit 7c99657

Please sign in to comment.