Update SPDX checker, and run the automatic fixer in the codebase#1671
Update SPDX checker, and run the automatic fixer in the codebase#1671henriquemoody wants to merge 2 commits into
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #1671 +/- ##
============================================
- Coverage 99.53% 99.53% -0.01%
- Complexity 923 928 +5
============================================
Files 190 190
Lines 2171 2169 -2
============================================
- Hits 2161 2159 -2
Misses 10 10 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
c1c5794 to
afee22e
Compare
…ation Improves SPDX header linting to ensure consistent license metadata across the codebase. Key changes: - Enforce deterministic tag ordering (License-Identifier, FileCopyrightText, FileContributor) to ensure consistency, prevent merge conflicts, and simplify code reviews - Add contributor alias mapping to consolidate contributors with multiple emails or name variations (e.g., "nickl-" → "Nick Lombard") - Add --contributions-strategy option with "blame" (current code authors) and "log" (all historical contributors) to support different attribution philosophies - Add optional path argument to lint specific files or directories - Add --fix option to automatically correct header issues Assisted-by: Claude Code (claude-opus-4-5-20251101)
I ran the `bin/console spdx --fix` with different strategies for different files. For most of the core classes, since they've been drastically rebuilt, I've run it with the `git-blame` strategy, for for the `src/Validators`, in which the API changed completely but the logic remains the same, I use the `git-log` strategy.
afee22e to
7c681fe
Compare
alganet
left a comment
There was a problem hiding this comment.
TL;DR Maybe overkill. We don't need to scrape git history more than once or twice. Sad that we don't use Validation internally anymore.
alganet
left a comment
There was a problem hiding this comment.
I'm approving despite of the remarks I mentioned previously, so we can quickly unblock the core improvement (a better FileContributor materialization).
Consider them as nitpicks or personal preferences. This is good to merge.
|
I got this in a couple iterations with an AI because I saw myself having to add the header to files I forgot. I think this is more useful for us maintainers than non-frequent contributors |
|
I will merge it as is, refactor later, I muyself don't want to spend too much time on it, it's only worth it if it's cheap, but the part of using Validation is a strong argument, we should probably check all the code in src-dev/ |
No description provided.