Skip to content

Unlink the Lint and Build task #487

@hantsy

Description

@hantsy

In the latest Kotlinter/ktlint update, we found Kotlinter lint task is a dependency when running build task.

In our GitHub actions, we use a lint workflow for lint reports, and a build workflow for building the project.

The purpose is to avoid unused lint work when performing a build task.

But currently, we found the lint is bound to build tightly.

BTW, we do not install the prepush hook, and also exclude the build/generated directory in the Gradle.kts.

tasks.withType<LintTask>() {
    source = source.minus(fileTree("build/generated")).asFileTree
}
tasks.withType<FormatTask>() {
    source = source.minus(fileTree("build/generated")).asFileTree
}

Also exclude the dir in the .editorcofig.

[src/generated/**/*.{kt,kts}]
ktlint = disabled

[build/generated/**/*.{kt,kts}]
ktlint = disabled

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions