fixed on_set_chained_mode implementations to avoid cpplint warnings#1564
Conversation
| { | ||
| // Always accept switch to/from chained mode (without linting type-cast error) | ||
| return true || chained_mode; | ||
| // Fix to adhere to CppLint standards |
There was a problem hiding this comment.
A moor reference isn't really adhering to cppkint standards ;)
There was a problem hiding this comment.
You can achieve the same by commenting out the name of the argument. It tricks the parser and also the compiler. We already use that approach in the codebase, just look for "/*" in ros2_control
There was a problem hiding this comment.
No, I don't think so. See #1491 and the linked cpplint issue.
bmagyar
left a comment
There was a problem hiding this comment.
Thank you for the contribution! Great that you found out this. Please take a look at the solution I recommended.
| { | ||
| // Always accept switch to/from chained mode (without linting type-cast error) | ||
| return true || chained_mode; | ||
| // Fix to adhere to CppLint standards |
There was a problem hiding this comment.
You can achieve the same by commenting out the name of the argument. It tricks the parser and also the compiler. We already use that approach in the codebase, just look for "/*" in ros2_control
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #1564 +/- ##
=======================================
Coverage 85.60% 85.61%
=======================================
Files 123 123
Lines 11873 11860 -13
Branches 1016 1015 -1
=======================================
- Hits 10164 10154 -10
+ Misses 1384 1383 -1
+ Partials 325 323 -2
Flags with carried forward coverage won't be shown. Click here to find out more.
🚀 New features to boost your workflow:
|
d8dc4b1
into
ros-controls:master
) (#1688) Co-authored-by: Bhagyesh Agresar <82998852+bhagyeshagresar@users.noreply.github.com>
) (#1687) Co-authored-by: Bhagyesh Agresar <82998852+bhagyeshagresar@users.noreply.github.com>
Fixed warnings generated by cpplint/cpplint#131 on some of the controllers that implement the chained mode.