*Style helpers reset the config
Opened this issue · 2 comments
christophsturm commented
if i want kotlin style but not managed commas, this works:
ktfmt {
kotlinLangStyle()
manageTrailingCommas = false
}
but this does not:
ktfmt {
manageTrailingCommas = false
kotlinLangStyle()
}
if kotlinLangStyle
always needs to be first, which is totally fine, the second version should produce an error message.
cortinico commented
the second version should produce an error message.
This could be hard to implement as those functions such as kotlinLangStyle()
are effectively calling a collection of setters.
simonhauck commented
Maybe it would be possible if the kotlinLangStyle method would not set the values directly and instead would invoke the convention method. Then the user could still overwrite the parameters by explicitly specifing them