Skip to content

ci: add a hook to add open-tyndp header automatically - #94

Closed
tgilon wants to merge 5 commits into
masterfrom
ci/reuse-hook
Closed

ci: add a hook to add open-tyndp header automatically#94
tgilon wants to merge 5 commits into
masterfrom
ci/reuse-hook

Conversation

@tgilon

@tgilon tgilon commented Aug 6, 2025

Copy link
Copy Markdown
Member

Closes #90.

Changes proposed in this Pull Request

Builds on #92 and #93, this PR adds a local hook to enforce the correct SPDX header in modified and newly created files. Currently, this hook is disabled in pre-commit-ci.

A PR has been opened in reuse-tool (fsfe/reuse-tool#1206) to support missing files / types.

Checklist

  • I tested my contribution locally and it works as intended.
  • Code and workflow changes are sufficiently documented.
  • Changed dependencies are added to envs/environment.yaml.
  • Changes in configuration options are added in config/config.default.yaml.
  • Changes in configuration options are documented in doc/configtables/*.csv.
  • Changes in configuration options are added in config/test/*.yaml.
  • OET license identifier is added to all edited or newly created code files.
  • Sources of newly added data are documented in doc/data_sources.rst.
  • A release note doc/release_notes.rst is added.
  • Major features are listed in README and doc/index.rst.

@tgilon tgilon self-assigned this Aug 6, 2025
@coroa

coroa commented Aug 6, 2025

Copy link
Copy Markdown
Member

Since you are skipping the hook in ci, then you could use the simpler form without the git processing.

@tgilon
tgilon requested a review from coroa August 6, 2025 09:35
@tgilon

tgilon commented Aug 6, 2025

Copy link
Copy Markdown
Member Author

Since you are skipping the hook in ci, then you could use the simpler form without the git processing.

Would you mind keeping it? That way, I can test it locally for a while before making it mandatory with pre-commit-ci.

@tgilon
tgilon marked this pull request as ready for review August 6, 2025 12:35
@tgilon

tgilon commented Sep 1, 2025

Copy link
Copy Markdown
Member Author

From several discussions:

  • Automation would be too intrusive. Rather default opt-out instead of opt-in.
  • Script that does this is helpful if it is done consciously (with tracking of the diff)
  • Maybe something like a button

@tgilon tgilon added the DNMY Do Not Merge Yet label Sep 1, 2025
Base automatically changed from ci/reuse-clean-headers to master September 22, 2025 18:25
@tgilon

tgilon commented Jan 5, 2026

Copy link
Copy Markdown
Member Author

Closing this as it's unlikely that this feature will be pursued further. The current approach is to use an item on the task list in the PR template to ensure consistency.

@tgilon tgilon closed this Jan 5, 2026
@tgilon
tgilon deleted the ci/reuse-hook branch July 30, 2026 07:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

DNMY Do Not Merge Yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Improve pre-commit to enforce REUSE

2 participants