diffplug / diffplug/spotless

Shebang Removal While Adding Copyright Header in Shell Scripts

Aperta
#2,270 3 commenti 0 reazioni 0 assegnatari Vedi su GitHub
bug-unconfirmed
Lingua principale
Java
Stelle
5.6k
Fork
559
Merge medio
1g 14h
PR unite (30g)
43

Descrizione

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

Guida per i contributori

Apri la guida per i contributori

Direzione di ricerca

Inizia riproducendo la configurazione Spotless Maven fornita sugli script shell, utilizzando Maven 3.8.8 e le impostazioni shell licenseHeader. Traccia come interagiscono setLicenseHeaderYearsFromGitHistory e skipLinesMatching, quindi verifica che l'applicazione del formatter preservi lo shebang di ogni script.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Valutazione

Stack tecnologico
shell
Ambito
tooling
Tipo di issue
Bug
Difficoltà
3/5
Tempo stimato
1-2 giorni
Stato di attività
Ferma
Chiarezza
Da chiarire
Idoneità per principianti
35/100

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.