the Jackson Yaml linter removes code comments
- Dominant language
- Java
- Stars
- 5.6k
- Forks
- 559
- Avg merge
- 1d 13h
- Merged PRs (30d)
- 34
Description
If you are submitting a **bug**, please include the following:
- [ ] summary of problem
using spotlessApply with a the jackson yaml package included removes lines in yaml files that start with `#`.
- [ ] gradle or maven version
gradle 7.5
- [ ] spotless version
6.21.0
- [ ] operating system and version
osx Ventura
- [ ] copy-paste your full Spotless configuration block(s)
spotless {
java {
palantirJavaFormat()
// Added target as spotless was having problems with the groovy files.
target(project.fileTree(project.rootDir) {
include 'src/*/java/**/*.java'
// Excluded Controller because spotless is making it very hard to read.
exclude '**/Controller.java'
})
}
json {
target(
'.cicd/**/*.json',
'.primer/**/*.json',
'src/**/*.json'
)
gson().indentWithSpaces(2)
}
groovy {
importOrder('*', 'spock')
excludeJava(true)
}
yaml {
target 'src/**/*.yml', 'src/**/*.yaml'
jackson().yamlFeature('MINIMIZE_QUOTES', true)
}
}
- [ ] copy-paste the full content of any console errors emitted by `gradlew spotless[Apply/Check] --stacktrace`
no errors
Contributor guide
Assessment
This issue has not been assessed yet.