-
Notifications
You must be signed in to change notification settings - Fork 38
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
avoid printing on stderr if linter successful #88
base: master
Are you sure you want to change the base?
avoid printing on stderr if linter successful #88
Conversation
… linter successful Signed-off-by: Mikael Arguedas <[email protected]>
This fix is wrong. The I think it might be better to write the output to a temporary file. When the linter is done, check if the file is nonempty. If it is, write it to stderr, otherwise do nothing. |
Signed-off-by: Mikael Arguedas <[email protected]>
oh wow, of course, you're right |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Also, please add echo "$LINTER_OUTPUT"
to the success branch. I think it's important to see any messages from the linter. Printing them to stdout is compatible with catkin_tools so that they don't treat it as a warning.
An example of useful logs from a succeeded linter can be found e.g. at the top of this build: https://build.ros.org/job/Ndev__cras_ros_utils__ubuntu_focal_amd64/86/console .
I haven't figured if printing to stdout could break something else, though.
Signed-off-by: Mikael Arguedas <[email protected]>
@arne48 @mikepurvis friendly 🛎️ , WDYT about this workaround ? do you think it can make it in the codebase ? |
Hey there 👋
Thanks for this utility!
I'm experimenting it to invoke
catkin_lint
as described in https://discourse.ros.org/t/ros1-now-is-a-great-time-to-add-catkin-lint-to-your-packages/36521To be precise I'm invoking it like this
roslint_custom(catkin_lint -W2 --strict -q .)
)An issue I face is that it is generating a catkin_tools warning on each package it is used even if the linter passes.
This PR is a workaround for this issue. I guess it doesnt have a strong impact as this pipe was not present in earlier version of ROS 1 (https://github.com/ros/roslint/pull/79/files#diff-75b2bc3dc9e3948395dbe27abe404923f62e0fbf445bdada52b0ce5264b4b186) but I actually have no idea of the potential impact.
Catkin build logs without and with this change
Without this change:
With this change
@peci1 FYI as I may be using this wrong and maybe there is a better way around it ?