-
Notifications
You must be signed in to change notification settings - Fork 501
Open
Labels
Description
shfmt supports simplifying and/or minifying shell scripts. However, there is no support provided via .editorconfig for the flags. So we'll need some additional configuration in the shfmt Gradle DSL to enable these.
My thoughts are something akin to one of the following:
Option 1
// Provides future extensible flexibility and follows the lead set by the `ktfmt` configuration
spotless {
shell {
shfmt().configure {
it.minify = true
it.simplify = true
}
}
}Option 2
// If any other options become available in the future, this seems to be less extensible, however, it is very readable
spotless {
shell {
shfmt()
.minify()
.simplify()
}
}Note that minifying the code implies simplifying the code. So both flags can probably be true, but both flags aren't required to simplify and minify.