-
Notifications
You must be signed in to change notification settings - Fork 460
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
the Jackson Yaml linter removes code comments #1795
Comments
Any plan to fix this? |
This is perhaps related to FasterXML/jackson-dataformats-text#36 and in the end SnakeYaml? |
This is really unfortunate bug, I am considering the removal of yaml step because of it. |
@henrikcaesar SnakeYAML supports the comments. |
+100 for fix.i lost a lot of info when running this.... |
The lack of proper comments management in yaml was initially discussed in #910, and discussed with Jackson team in FasterXML/jackson-dataformats-text#372, itself referring FasterXML/jackson-dataformats-text#36 which is still open and active. One may consider contributing a SnakeYAML linter (vs current Jackson linter, based on SnakeYAML). |
If you are submitting a bug, please include the following:
using spotlessApply with a the jackson yaml package included removes lines in yaml files that start with
#
.gradle 7.5
6.21.0
osx Ventura
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)
}
}
gradlew spotless[Apply/Check] --stacktrace
no errors
The text was updated successfully, but these errors were encountered: