-
Notifications
You must be signed in to change notification settings - Fork 7
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
clang_format fails with GitHub action but passes locally #318
Comments
What exact command are you running locally to get the result you want? |
The repo is at: https://github.com/christianrauch/camera_ros_ci_test. I added compiler errors to the repo to test if the CI fails for them (it does not) but you can see in the latest workflow is https://github.com/christianrauch/camera_ros_ci_test/runs/4375884681?check_suite_focus=true. The package depends on libcamera. If you are using Ubuntu, you can try my ppa https://launchpad.net/~christianrauch/+archive/ubuntu/libcamera. To compile and test:
The last command will run the test and they should pass |
For better comparison, here are two workflows to test the package using the same code base, but different actions:
The |
So in the CMake you have
But
Not familiar with clang_format directly, but I assume it can take a config file as an input argument somehow |
Well, yes. I mentioned that I am using a custom clang-format style. I assumed the lint action would just use the CMake settings and hence see that
Do you mean the lint action is not using the CMake file at all? The There should be more documentation and an example of how to configure the |
Correct, it just invokes the
PRs welcome :) |
I didn't even know that this feature exists... so I am going to leave this to someone who knows how things work :-) I will use the |
Description
I am using a custom clang-format style and when running the
clang_format
linter locally (colcon test
), it passes without suggested code changes. In the GitHub action, this fails, suggesting changes that should not be suggested according to custom format style.E.g. the linter on the GitHub action suggests:
while the format style defines:
Expected Behavior
GitHub action should behave the same as locally.
Actual Behavior
clang-format behaviour differs between local installation and GitHub action
To Reproduce
System (please complete the following information)
Additional context
It appears that the local and remove
clang-format
versions differ:local clang (Ubuntu repo):
ros-tooling/action-ros2-lint:
The text was updated successfully, but these errors were encountered: