-
Notifications
You must be signed in to change notification settings - Fork 19.3k
Tools: Add pre-commit hook to check copyright in ros2 files #30598
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
cclauss
wants to merge
3
commits into
ArduPilot:master
Choose a base branch
from
cclauss:Tools_gittools_pre_commit_copyright.py
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Tools: Add pre-commit hook to check copyright in ros2 files #30598
cclauss
wants to merge
3
commits into
ArduPilot:master
from
cclauss:Tools_gittools_pre_commit_copyright.py
+172
−0
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This was referenced Jul 9, 2025
a5119f0
to
f705a95
Compare
442a15c
to
530c397
Compare
Ryanf55
approved these changes
Jul 12, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is a nice addition for something that has so far been a manual verification.
d1a74d3
to
217dec2
Compare
peterbarker
reviewed
Jul 14, 2025
217dec2
to
dc627d2
Compare
d17b3e9
to
ce071d9
Compare
8d74c1b
to
71af7f1
Compare
71af7f1
to
607e264
Compare
Ryanf55
approved these changes
Aug 15, 2025
607e264
to
6bf3a2a
Compare
6bf3a2a
to
9bbdeeb
Compare
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Add a local pre-commit hook to verify the copyright notice is in all Python files in
Tools/ros2
.%
pre-commit run check-copyright --verbose --all-files
Make exceptions for:
How was this tested?
%
Tools/gittools/pre_commit_copyright.py
%
Tools/gittools/pre_commit_copyright.py README.md
%
Tools/gittools/pre_commit_copyright.py README.md COPYING.txt
%
Tools/gittools/pre_commit_copyright.py Tools/ros2/ardupilot_sitl/launch/sitl.launch.py
%
pre-commit run check-copyright --verbose --all-files
Edit
Tools/gittools/pre_commit_copyright.py
and add aZ
to the front of each of theexclude_file_paths
.%
pre-commit run check-copyright --verbose --all-files
Edit
Tools/gittools/pre_commit_copyright.py
to remove thoseZ
's.