StoglRobotics / ros_team_workspace

RosTeamWorkspace is a framework for boosting collaboration in teams when developing software for robots using Robot Operating System (ROS1 and ROS2).
https://rtw.stoglrobotics.de
Apache License 2.0
89 stars 19 forks source link

Update precommit #31

Closed mamueluth closed 2 years ago

mamueluth commented 2 years ago

*Updated pre-commit hooks to newer version

mamueluth commented 2 years ago

I think probably that for ament_cpplint ,check-ast',ament_copyright` ... all files that have by design an invalid syntax should be ignored, otherwise pre-commit is going to fail if rerun with -a flag. E.G . py files in /templates which include $LICENSE$

mamueluth commented 2 years ago

What are your thoughts on replacing the ament_* commands in .pre-commit-config.yaml with hooks provided by pre-commit? I think otherwise, we make pre-commit dependent on the installed ros-version, though iI am not sure if that's a problem...

destogl commented 2 years ago

This version of pre-commit config is created for the ROS repositories. Of course, one can use it otherwise, but it's not the main target. I tried before to replace commands with “upstream” commands but didn't find any good configuration. We can open an issue for this and check this later.

The idea is that one has to always have their workspace source before executing these commands.

Let's make it green first without much tweaking then needed, please.

destogl commented 2 years ago

@mergifyio backport foxy

mergify[bot] commented 2 years ago

backport foxy

✅ Backports have been created

* [#34 Update precommit (backport #31)](https://github.com/StoglRobotics/ros_team_workspace/pull/34) has been created for branch `foxy`