Skip to content

Commit eef0e37

Browse files
committedSep 5, 2023
Simpify arguments to Java/Kotlin formatters.
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...
1 parent 7e05f0e commit eef0e37

File tree

1 file changed

+4
-16
lines changed

1 file changed

+4
-16
lines changed
 

‎.pre-commit-config.yaml

+4-16
Original file line numberDiff line numberDiff line change
@@ -101,24 +101,12 @@ repos:
101101
- repo: https://github.com/dustinsand/pre-commit-jvm
102102
rev: v0.9.0
103103
hooks:
104-
- name: ktlint (kotlin implementations)
104+
- name: ktlint (java/kotlin implementations)
105105
id: ktlint
106-
args:
107-
[
108-
"--format",
109-
"implementations/kotlin-kmp-json-schema-validator/**/*.kt",
110-
"implementations/kotlin-kmp-json-schema-validator/*.kts",
111-
"implementations/java-openapiprocessor/**/*.kt",
112-
"implementations/java-openapiprocessor/*.kts",
113-
]
114-
- name: detekt (kotlin implementations)
106+
args: [--format]
107+
- name: detekt (java/kotlin implementations)
115108
id: detekt
116-
args:
117-
[
118-
"--build-upon-default-config",
119-
"--input",
120-
"implementations/kotlin-kmp-json-schema-validator, implementations/java-openapiprocessor",
121-
]
109+
args: ["--build-upon-default-config"]
122110
- name: pmd (java implementations)
123111
id: pmd
124112
args:

0 commit comments

Comments
 (0)
Please sign in to comment.