Closed beaniejoy closed 1 year ago
.editorconfig
[*.{kt,kts}] ktlint_standard_import-ordering=disabled ktlint_standard_trailing-comma-on-call-site=disabled ktlint_standard_trailing-comma-on-declaration-site=disabled ktlint_standard_comment-spacing=disabled ktlint_standard_no-wildcard-imports=disabled ktlint_standard_no-blank-lines-in-chained-method-calls=disabled ktlint_standard_no-multi-spaces=disabled
위 방식대로 ktlint_[standard|experimental]_[rule-name] 필드명에 disabled 붙이면 lint 규칙에서 제외
ktlint_[standard|experimental]_[rule-name]
disabled
plugins { id(Plugins.KTLINT).version(Version.KtLint.PLUGIN) } // allprojects apply { plugin(Plugins.KTLINT) } // ktlint setting ktlint { version.set(Version.KtLint.PINTEREST) reporters { reporter(ReporterType.JSON) } } // report directory location setting tasks.withType<GenerateReportsTask> { reportsOutputDirectory.set( rootProject.layout.buildDirectory.dir("reports/ktlint/${project.name}") ) }
.editorconfig
를 통한 lint rule 작성 및 disable 대상 ktlint rule 설정ktlint rule disable 설정
위 방식대로
ktlint_[standard|experimental]_[rule-name]
필드명에disabled
붙이면 lint 규칙에서 제외build.gradle.kts 설정