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 {
154
154
#### Linter configuration
155
155
156
156
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.
158
161
159
162
<tabs >
160
163
<tab title =" Kotlin DSL " >
161
164
162
165
``` kotlin
163
- // (Only if you use kotlint) Excludes for `kotlint` :
166
+ // Exclusions for `kotlinter`, if you use it :
164
167
tasks.withType< org.jmailen.gradle.kotlinter.tasks.LintTask > {
165
168
exclude {
166
169
it.name.endsWith(" .Generated.kt" )
@@ -176,6 +179,7 @@ tasks.withType<org.jmailen.gradle.kotlinter.tasks.LintTask> {
176
179
<tab title =" Groovy DSL " >
177
180
178
181
``` groovy
182
+ // Exclusions for `kotlinter`, if you use it:
179
183
tasks.withType(org.jmailen.gradle.kotlinter.tasks.LintTask).all {
180
184
exclude {
181
185
it.name.endsWith(".Generated.kt")
@@ -186,6 +190,14 @@ tasks.withType(org.jmailen.gradle.kotlinter.tasks.LintTask).all {
186
190
}
187
191
```
188
192
193
+ </tab >
194
+ <tab title =" .editorconfig " >
195
+
196
+ ``` .editorconfig
197
+ [{**/*.Generated.kt,**/*$Extensions.kt}]
198
+ ktlint = disabled
199
+ ```
200
+
189
201
</tab >
190
202
191
203
</tabs >
You can’t perform that action at this time.
0 commit comments