Skip to content

Commit

Permalink
Simpify arguments to Java/Kotlin formatters.
Browse files Browse the repository at this point in the history
pre-commit should already auto-find the right files and pass them to
these hooks, and not passing them should I *think* mean it's harder for
new implementers to forget adding explicitly to this list.

Manually testing seems to confirm this is the case (by breaking a file
and seeing ktlint complain).

Though we're running into pinterest/ktlint#1618 (AKA
pinterest/ktlint#1391) and I can't seem to figure out how to pass
through JVM args...
  • Loading branch information
Julian committed Sep 5, 2023
1 parent 7e05f0e commit eef0e37
Showing 1 changed file with 4 additions and 16 deletions.
20 changes: 4 additions & 16 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -101,24 +101,12 @@ repos:
- repo: https://github.com/dustinsand/pre-commit-jvm
rev: v0.9.0
hooks:
- name: ktlint (kotlin implementations)
- name: ktlint (java/kotlin implementations)
id: ktlint
args:
[
"--format",
"implementations/kotlin-kmp-json-schema-validator/**/*.kt",
"implementations/kotlin-kmp-json-schema-validator/*.kts",
"implementations/java-openapiprocessor/**/*.kt",
"implementations/java-openapiprocessor/*.kts",
]
- name: detekt (kotlin implementations)
args: [--format]
- name: detekt (java/kotlin implementations)
id: detekt
args:
[
"--build-upon-default-config",
"--input",
"implementations/kotlin-kmp-json-schema-validator, implementations/java-openapiprocessor",
]
args: ["--build-upon-default-config"]
- name: pmd (java implementations)
id: pmd
args:
Expand Down

0 comments on commit eef0e37

Please sign in to comment.