shfmt - support simplifying (`-s`) and minifying flags (`-mn`)
- Lenguaje dominante
- Java
- Estrellas
- 5.6k
- Forks
- 559
- Merge medio
- 1 d 14 h
- PR fusionados (30 d)
- 43
Descripción
`shfmt` supports [simplifying and/or minifying shell scripts](https://github.com/mvdan/sh/blob/master/cmd/shfmt/shfmt.1.scd#generic-flags). 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
```gradle
// 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
```gradle
// 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.
Guía de contribución
Línea de trabajo
Comienza en el punto de entrada existente del DSL de Gradle de shfmt e inspecciona cómo se exponen las opciones del formateador en otros lugares, especialmente el patrón de configuración de ktfmt mencionado en el issue. Decide entre propiedades configurables y métodos fluent, y verifica que simplify y minify puedan habilitarse de forma independiente, mientras que minify implica simplify.
Escrito por el modelo de indexación a partir del texto del issue.
Evaluación
- Stack tecnológico
- shell
- Área
- tooling
- Tipo de issue
- Nueva funcionalidad
- Dificultad
- 4/5
- Tiempo estimado
- 3-5 días
- Estado de actividad
- Estancado
- Claridad
- Bastante claro
- Aptitud para principiantes
- 35/100