the Jackson Yaml linter removes code comments
- Lingua principale
- Java
- Stelle
- 5.6k
- Fork
- 559
- Merge medio
- 1g 14h
- PR unite (30g)
- 43
Descrizione
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
Guida per i contributori
Apri la guida per i contributori
Direzione di ricerca
Inizia riproducendo il report con i target YAML `src/**/*.yml` e `src/**/*.yaml`, usando la configurazione mostrata `jackson().yamlFeature('MINIMIZE_QUOTES', true)`. Esegui `gradlew spotlessApply` e ispeziona le righe YAML che iniziano con `#`; il lavoro è completato quando l’applicazione del linter YAML di Jackson preserva quei commenti senza emettere errori.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Valutazione
- Stack tecnologico
- java
- Ambito
- tooling
- Tipo di issue
- Bug
- Difficoltà
- 3/5
- Tempo stimato
- 1-2 giorni
- Stato di attività
- Tranquilla
- Chiarezza
- Abbastanza chiara
- Idoneità per principianti
- 48/100