Skip to content
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

linter invocation fixup #95

Merged
merged 3 commits into from
Mar 12, 2019

Conversation

mikaelarguedas
Copy link
Member

Follow up of #90

  • First commit removes the (apparently) unnecessary ament_cmake_test find_package call.
  • The second commit removes the dependency on ament_lint_auto altogether and only depends on ament_cmake_lint_cmake.

Second commit is more subjective, as this is not an ament package, each linter has to be called explicitly. At that point it seems that relying on ament_lint_auto loses its benefits while adding dependencies and CMake code. As this package is meant to only provide pure cmake macros it looks like ament_lint_cmake is the only linter it will need going forward .

Happy to revert the second commit if the ament_lint_auto approach is preferred.

Signed-off-by: Mikael Arguedas <mikael.arguedas@gmail.com>
Signed-off-by: Mikael Arguedas <mikael.arguedas@gmail.com>
@mikaelarguedas mikaelarguedas added in progress Actively being worked on (Kanban column) in review Waiting for review (Kanban column) and removed in progress Actively being worked on (Kanban column) labels Mar 10, 2019
Copy link
Member

@mjcarroll mjcarroll left a comment

Choose a reason for hiding this comment

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

Using just ament_lint_cmake seems reasonable to me in this case.

@@ -7,10 +7,8 @@ set(LIB_INSTALL_DIR lib/)
set(INCLUDE_INSTALL_DIR include/)
set(SYSCONFIG_INSTALL_DIR share/${PROJECT_NAME})

find_package(ament_cmake_test REQUIRED)
Copy link
Member

Choose a reason for hiding this comment

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

This command sets the build BUILD_TESTING flag.
If we remove it, we should do something else to enable testing (I think enable_testing()).

Copy link
Member

Choose a reason for hiding this comment

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

There is much more logic to it than just calling enable_testing(): see https://github.com/ament/ament_cmake/blob/207a07b72af1e5a780887d7c2268df57ef456af3/ament_cmake_test/ament_cmake_test-extras.cmake#L17-L37 so I don't think duplicating that logic makes sense.

Copy link
Member Author

Choose a reason for hiding this comment

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

e4ee571 applies suggestion from #90 (comment)

Signed-off-by: Mikael Arguedas <mikael.arguedas@gmail.com>
@mjcarroll mjcarroll self-requested a review March 12, 2019 14:15
@mjcarroll mjcarroll self-requested a review March 12, 2019 14:15
@mjcarroll mjcarroll merged commit 3b1d8bf into ros2:master Mar 12, 2019
@mjcarroll mjcarroll removed the in review Waiting for review (Kanban column) label Mar 12, 2019
mjcarroll pushed a commit that referenced this pull request Mar 12, 2019
* remove unecessary ament_cmake_test

Signed-off-by: Mikael Arguedas <mikael.arguedas@gmail.com>

* remove ament_lint_auto dependency

Signed-off-by: Mikael Arguedas <mikael.arguedas@gmail.com>

* add back ament_cmake_test with comment

Signed-off-by: Mikael Arguedas <mikael.arguedas@gmail.com>
@mikaelarguedas mikaelarguedas deleted the ament_cmake_lint_cmake branch March 12, 2019 14:36
ryanewel pushed a commit to aws-ros-dev/sros2 that referenced this pull request Jun 12, 2019
* remove unecessary ament_cmake_test

Signed-off-by: Mikael Arguedas <mikael.arguedas@gmail.com>

* remove ament_lint_auto dependency

Signed-off-by: Mikael Arguedas <mikael.arguedas@gmail.com>

* add back ament_cmake_test with comment

Signed-off-by: Mikael Arguedas <mikael.arguedas@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants