Shebang Removal While Adding Copyright Header in Shell Scripts
- Lenguaje dominante
- Java
- Estrellas
- 5.6k
- Forks
- 559
- Merge medio
- 1 d 14 h
- PR fusionados (30 d)
- 43
Descripción
- [ ] summary of problem
I’m working on a project with shell scripts and trying to add a copyright header that includes the year range from the Git history using the setLicenseHeaderYearsFromGitHistory property.
The issue I’m facing is that the shebang (#!/bin/bash, etc.) is getting removed from the script files in the process. It seems there's something wrong with the code flow
- [ ] Gradle or Maven version - Maven 3.8.8
- [ ] spotless version - 2.43.0
- [ ] operating system and version - MacOS 14
- [ ] copy-paste your full Spotless configuration block(s), and a link to a public git repo that reproduces the problem if possible
```xml
com.diffplug.spotless
spotless-maven-plugin
2.43.0
true
false
src/main/java/**/*.java
src/test/java/**/*.java
package
**/*.sh
## Start
#\!/bin/sh
```
- [ ] copy-paste the full content of any console errors emitted by `gradlew spotless[Apply/Check] --stacktrace` - maven plugin
Thanks in advance
Guía de contribución
Línea de trabajo
Comienza reproduciendo la configuración proporcionada de Spotless Maven frente a los scripts de shell, utilizando Maven 3.8.8 y la configuración de shell licenseHeader. Sigue cómo interactúan setLicenseHeaderYearsFromGitHistory y skipLinesMatching y, a continuación, verifica que aplicar el formateador preserve el shebang de cada script.
Escrito por el modelo de indexación a partir del texto del issue.
Evaluación
- Stack tecnológico
- shell
- Área
- tooling
- Tipo de issue
- Error
- Dificultad
- 3/5
- Tiempo estimado
- 1-2 días
- Estado de actividad
- Estancado
- Claridad
- Necesita aclaración
- Aptitud para principiantes
- 35/100