-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
Linter fixes #2879
Linter fixes #2879
Conversation
@padhupradheep, please properly fill in PR template in the future. @SteveMacenski, use this instead.
|
Ok with the last commit, now we only have 6 more linting errors. It is all in nav2_amcl to make it easy.. I was not sure, how to fix those. |
@padhupradheep, your PR has failed to build. Please check CI outputs and resolve issues. |
You will see CI complaining about uncrustify in inflation_layer.cpp, if I try to satisfy them, then I get I will check that tomorrow. |
static const std::string FILTER_NAME = "keepout_filter"; | ||
static const std::string INFO_TOPIC = "costmap_filter_info"; | ||
static const std::string MASK_TOPIC = "mask"; | ||
static const char FILTER_NAME[]{"keepout_filter"}; |
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.
Why not leave as string, you just cast to string later
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.
I wanted too, but the linters complained..
For a static/global string constant, use a C style string instead: "static const char FILTER_NAME[]
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.
you could remove const
then
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.
Hmm..
Static/global string variables are not permitted.
Let me check for alternates
static const std::string INFO_TOPIC = "costmap_filter_info"; | ||
static const std::string MASK_TOPIC = "mask"; | ||
static const std::string SPEED_LIMIT_TOPIC = "speed_limit"; | ||
static const char FILTER_NAME[]{"speed_filter"}; |
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.
Ditto
Still got
in CI |
Yup that’s what I had mentioned in one of the previous comments. If I satisfy uncrustify, lint complain and vice versa.. 😅 I’ll take a look at it tonight |
I was getting OCD on repeating the loop! Praise the lord, I broke the loop by finding this issue :-D |
* satisfying uncrustify * cpplint fixes * linter fixes * some more fixes * fix build - go back * build and linter both satisfied * crustify partial fix * reverting back fix for datatype in amcl * more amcl cleaning * update * no linters * copyright fixes * moving portable_utils
Some more linter fixes..