-
Notifications
You must be signed in to change notification settings - Fork 105
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
Fix file exclusion behavior in ament_cppcheck and ament_cpplint #299
Conversation
Signed-off-by: Miaofei <miaofei@amazon.com>
Signed-off-by: Miaofei <miaofei@amazon.com>
CI run with build |
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.
Looks good to me.
Signed-off-by: Miaofei <miaofei@amazon.com>
This commit fixes the faulty file exclusion behavior reported in ament#326. Specifically, it walks down the path where `ament_copyright` has been invoked to build a map of files to be tested, respecting the exclusion list by globbing and matching against files in the tree. Changes inspired by ament#299. Signed-off-by: Abrar Rahman Protyasha <aprotyas@u.rochester.edu>
…t#299) * fix exclude behavior in ament_cppcheck and ament_cpplint Signed-off-by: Miaofei <miaofei@amazon.com> * fix flake8 errors Signed-off-by: Miaofei <miaofei@amazon.com> * add missing realpath() conversion Signed-off-by: Miaofei <miaofei@amazon.com>
* [ament_copyright] Fix file exclusion behavior This commit fixes the faulty file exclusion behavior reported in #326. Specifically, the exclusion list is matched against traversed files in the `crawler` module. Changes inspired by #299. Signed-off-by: Abrar Rahman Protyasha <aprotyas@u.rochester.edu> * Update excluded file path in copyright tests Since file names are not indiscriminately matched throughout the search tree anymore, the excluded files listed in the copyright tests need to be updated relative to the root of the package. Signed-off-by: Abrar Rahman Protyasha <aprotyas@u.rochester.edu> * Add test cases to check exclusion behavior Specifically, these tests check for: - Incorrect exclusion of single filenames. - Correct exclusion of relatively/absolutely addressed filenames. - Correct exclusion of wildcarded paths. Signed-off-by: Abrar Rahman Protyasha <aprotyas@u.rochester.edu> * Add unit tests for crawler module These unit tests make sure both search and exclusion behaviors are correctly demonstrated by the `ament_copyright.crawler` module. Signed-off-by: Abrar Rahman Protyasha <aprotyas@u.rochester.edu>
Closes #295
This pull request fixes the issue described at #234 (comment) and possibly replaces #238.
This pull request also makes the behavior between
ament_cppcheck
andament_cpplint
consistent.