Tools: Add pre-commit hook to check copyright in ros2 files#30598
Merged
peterbarker merged 3 commits intoArduPilot:masterfrom Sep 3, 2025
Merged
Tools: Add pre-commit hook to check copyright in ros2 files#30598peterbarker merged 3 commits intoArduPilot:masterfrom
peterbarker merged 3 commits intoArduPilot:masterfrom
Conversation
This was referenced Jul 9, 2025
a5119f0 to
f705a95
Compare
442a15c to
530c397
Compare
Ryanf55
approved these changes
Jul 12, 2025
Contributor
Ryanf55
left a comment
There was a problem hiding this comment.
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
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
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-filesMake exceptions for:
Tools/gittools/pre_commit_copyright.py \ --ignore=Tools/ros2/ardupilot_dds_tests/setup.py \ --ignore=Tools/ros2/ardupilot_dds_tests/test/test_pep257.py \ --ignore=Tools/ros2/ardupilot_dds_tests/test/test_copyright.pyHow 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-filesEdit
Tools/gittools/pre_commit_copyright.pyand add aZto the front of each of theexclude_file_paths.%
pre-commit run check-copyright --verbose --all-filesEdit
Tools/gittools/pre_commit_copyright.pyto remove thoseZ's.