-
Notifications
You must be signed in to change notification settings - Fork 119
allow linting based on test dependencies only #2
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
Conversation
"*.hh" | ||
"*.hpp" | ||
"*.hxx" | ||
) |
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.
What direct is this glob done in? Should these be prefixed with CMAKE_CURRENT_SOURCE_DIR
?
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.
Most CMake commands are relative to the CMAKE_CURRENT_SOURCE_DIR
if not specified otherwise.
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.
I was just imagining someone causing this hook to happen while in a sub-CMakeLists.txt
, like one in the test
folder. I thought the glob would be relative to the CMAKE_CURRENT_LIST_DIR
instead.
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.
These hook files are only used through ament_lint_auto
which itself gets triggered by the ament_package
extension point. So this will always be in the root of the package.
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.
Ok, sounds good.
Other than some questions (and several useless comments...) lgtm. +1 |
All my comments have been addressed +1 |
lgtm |
+1 |
… to implement extension point of ament_lint_auto
8f26902
to
77706ac
Compare
allow linting based on test dependencies only
Currently the CMake linter functions have at least one required arguments: the target name. Should we consider to make it optional?
|
I think it is ok to make it optional. Users will most likely not call it multiple time and if they do it is easy enough to catch and tell them how to fix the problem. We should, however, make sure to not just let the target name collide but instead detect it and provide a useful warning. |
ament_lint_auto
ament_lint_common
@esteve @tfoote @wjwwood Please review.