Skip to content

linter invocation fixup#95

Merged
mjcarroll merged 3 commits intoros2:masterfrom
mikaelarguedas:ament_cmake_lint_cmake
Mar 12, 2019
Merged

linter invocation fixup#95
mjcarroll merged 3 commits intoros2:masterfrom
mikaelarguedas:ament_cmake_lint_cmake

Conversation

@mikaelarguedas
Copy link
Copy Markdown
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
Copy Markdown
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.

set(INCLUDE_INSTALL_DIR include/)
set(SYSCONFIG_INSTALL_DIR share/${PROJECT_NAME})

find_package(ament_cmake_test REQUIRED)
Copy link
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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.

4 participants