Copyright year calculation with merge commits

Aperta
#3,034 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

Nessuno ha ancora preso questa issue.

Valutazione

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

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.

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.

Lingua principale
Java
Stelle
5.7k
Fork
560
Merge medio
1g 13h
PR unite (30g)
43

Guida per i contributori

Apri la guida per i contributori

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di diffplug/spotless

Tutte le issue di diffplug/spotless

Issue simili

Altre issue su Java

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.