Skip to content

Commit 7c99657

Browse files
authored
Merge pull request #810 from Kotlin/linter-docs-website-update
Small update to the linter information for the documentation website
2 parents ff5b397 + bc165da commit 7c99657

File tree

1 file changed

+14
-2
lines changed

1 file changed

+14
-2
lines changed

docs/StardustDocs/topics/gettingStartedGradleAdvanced.md

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -154,13 +154,16 @@ dependencies {
154154
#### Linter configuration
155155

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

159162
<tabs>
160163
<tab title="Kotlin DSL">
161164

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

178181
```groovy
182+
// Exclusions for `kotlinter`, if you use it:
179183
tasks.withType(org.jmailen.gradle.kotlinter.tasks.LintTask).all {
180184
exclude {
181185
it.name.endsWith(".Generated.kt")
@@ -186,6 +190,14 @@ tasks.withType(org.jmailen.gradle.kotlinter.tasks.LintTask).all {
186190
}
187191
```
188192

193+
</tab>
194+
<tab title=".editorconfig">
195+
196+
```.editorconfig
197+
[{**/*.Generated.kt,**/*$Extensions.kt}]
198+
ktlint = disabled
199+
```
200+
189201
</tab>
190202

191203
</tabs>

0 commit comments

Comments
 (0)