diffplug / diffplug/spotless

LicenseHeaderStep with `git --follow` in some repositories produces garbage year history

Aperta
#774 1 commento 0 reazioni 0 assegnatari Vedi su GitHub
enhancement
Lingua principale
Java
Stelle
5.6k
Fork
559
Merge medio
1g 13h
PR unite (30g)
34

Descrizione

- [x] summary of problem

I have been working on migrating a project to use spotless for license headers. The project hasn't been great on keeping license headers up to date - so I used spotless's feature to allow fixing the header years from git history.

However with the project the `--follow` option for git produces a lot of garbage header years.
Examples being small functional interfaces created in 2020 resolving to get an incorrect year range of `2018, 2020`.

Possible solution:
Allow disabling the `--follow` option for git history check here: https://github.com/diffplug/spotless/blob/a30553386acfa24f0d97f587249c38f44feb79b6/lib/src/main/java/com/diffplug/spotless/generic/LicenseHeaderStep.java#L289-L294

- [x] gradle or maven version
Gradle 6.7.1

- [x] spotless version
5.8.2

Guida per i contributori

Apri la guida per i contributori

Valutazione

Questa issue non è ancora stata valutata.

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.