File tree Expand file tree Collapse file tree 1 file changed +14
-2
lines changed Expand file tree Collapse file tree 1 file changed +14
-2
lines changed Original file line number Diff line number Diff line change @@ -154,13 +154,16 @@ dependencies {
154154#### Linter configuration
155155
156156We 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 :
164167tasks.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:
179183tasks.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 >
You can’t perform that action at this time.
0 commit comments