diffplug / diffplug/spotless

Shebang Removal While Adding Copyright Header in Shell Scripts

Offen
#2,270 3 Kommentare 0 Reaktionen 0 zugewiesene Personen Auf GitHub ansehen
bug-unconfirmed
Vorherrschende Sprache
Java
Sterne
5.6k
Forks
559
Ø Merge
1 T. 14 Std.
Gemergte PRs (30 T.)
43

Beschreibung

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

Beitragsleitfaden

Beitragsleitfaden öffnen

Rechercherichtung

Beginne damit, die bereitgestellte Spotless Maven-Konfiguration anhand der Shell-Skripte nachzustellen, wobei Maven 3.8.8 und die shell licenseHeader-Einstellungen verwendet werden. Verfolge, wie setLicenseHeaderYearsFromGitHistory und skipLinesMatching zusammenspielen, und überprüfe anschließend, dass die Anwendung des Formatierers den Shebang jedes Skripts beibehält.

Vom Indexierungsmodell aus dem Issue-Text verfasst.

Bewertung

Tech-Stack
shell
Bereich
tooling
Issue-Typ
Bug
Schwierigkeit
3/5
Geschätzter Aufwand
1-2 Tage
Aktivitätsstatus
Veraltet
Klarheit
Muss geklärt werden
Anfängerfreundlichkeit
35/100

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.