diffplug / diffplug/spotless

Shebang Removal While Adding Copyright Header in Shell Scripts

Abierto
#2,270 3 comentarios 0 reacciones 0 asignados Ver en GitHub
bug-unconfirmed
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
image

- [ ] 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

Abrir la 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

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.