diffplug / diffplug/spotless

Copyright year calculation with merge commits

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

Descrizione

Copyright year calculation currently takes the date of the merge commit, even if that particular file merged cleanly.

It causes a specific failure in spotlessCheck (I used Gradle plugin, but the issue is likely not related to Gradle): when branches being merged were changed in the previous year (e.g. 2025) and both had correct copyright end year, checked by Spotless at the time of their respective commits, and when the merge itself happens in the new year (e.g. 2026), Spotless insists that the 2025 copyright year from the clean merge is now incorrect and requires a manual change to 2026.

The expected outcome is that the clean, non-conflicting merge commit does not advance the copyright end year.
Merge commit that actively changes a file (to resolve conflicts or otherwise) should still advance the end year.

Guida per i contributori

Apri la guida per i contributori

Direzione di ricerca

Inizia individuando il calcolo dell’anno del copyright e i test o fixture che coprono i merge commit; l’issue non indica alcun file o punto di ingresso. Riproduci il controllo Spotless descritto con branch modificati in anni diversi e un merge pulito. Il lavoro è completato quando un merge pulito non fa avanzare l’anno finale, mentre un merge che modifica il file continua a farlo.

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

Valutazione

Stack tecnologico
java
Ambito
build-system
Tipo di issue
Bug
Difficoltà
4/5
Tempo stimato
3-5 giorni
Stato di attività
Attiva
Chiarezza
Abbastanza chiara
Idoneità per principianti
52/100

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.