diffplug / diffplug/spotless

Copyright year calculation with merge commits

Abierto
#3,034 0 comentarios 0 reacciones 0 asignados Ver en GitHub
Lenguaje dominante
Java
Estrellas
5.6k
Forks
559
Merge medio
1 d 14 h
PR fusionados (30 d)
43

Descripción

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.

Guía de contribución

Abrir la guía de contribución

Línea de trabajo

Comienza localizando el cálculo del año de copyright y las pruebas o fixtures que cubren los merge commits; el issue no menciona archivos ni puntos de entrada. Reproduce la comprobación de Spotless descrita con ramas modificadas en años diferentes y un merge limpio. Se considera terminado cuando un merge limpio no adelanta el año final, mientras que un merge que modifica el archivo sí lo sigue haciendo.

Escrito por el modelo de indexación a partir del texto del issue.

Evaluación

Stack tecnológico
java
Área
build-system
Tipo de issue
Error
Dificultad
4/5
Tiempo estimado
3-5 días
Estado de actividad
Activo
Claridad
Bastante claro
Aptitud para principiantes
52/100

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.