Skip to content

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

Merged
merged 1 commit into from
Mar 6, 2015

Conversation

dirk-thomas
Copy link
Contributor

  • add ament_lint_auto
  • add ament_lint_common
  • update all linter packages to implement extension point of ament_lint_auto

@esteve @tfoote @wjwwood Please review.

@dirk-thomas dirk-thomas added the enhancement New feature or request label Mar 6, 2015
@dirk-thomas dirk-thomas added the in review Waiting for review (Kanban column) label Mar 6, 2015
@dirk-thomas dirk-thomas self-assigned this Mar 6, 2015
"*.hh"
"*.hpp"
"*.hxx"
)
Copy link
Contributor

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?

Copy link
Contributor Author

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.

Copy link
Contributor

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.

Copy link
Contributor Author

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.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ok, sounds good.

@wjwwood
Copy link
Contributor

wjwwood commented Mar 6, 2015

Other than some questions (and several useless comments...) lgtm. +1

@wjwwood
Copy link
Contributor

wjwwood commented Mar 6, 2015

All my comments have been addressed +1

@tfoote
Copy link
Member

tfoote commented Mar 6, 2015

lgtm

@esteve
Copy link
Contributor

esteve commented Mar 6, 2015

+1

… to implement extension point of ament_lint_auto
dirk-thomas added a commit that referenced this pull request Mar 6, 2015
allow linting based on test dependencies only
@dirk-thomas dirk-thomas merged commit 7ba894c into master Mar 6, 2015
@dirk-thomas dirk-thomas removed the in review Waiting for review (Kanban column) label Mar 6, 2015
@dirk-thomas dirk-thomas deleted the ament_lint_auto branch March 6, 2015 23:09
@dirk-thomas
Copy link
Contributor Author

Currently the CMake linter functions have at least one required arguments: the target name.

Should we consider to make it optional?

  • pro: usually each function is only called once, therefore the target name would consistent
  • con: when the user calls it twice it results in an error telling the user that he needs to pass a custom target name when calling the function multiple times

@wjwwood
Copy link
Contributor

wjwwood commented Mar 7, 2015

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants