-
Notifications
You must be signed in to change notification settings - Fork 201
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
Add common linters to tf2 #258
Conversation
I still have some issues with some copyright headers located in tf2/LinearMath. This copyright header is no defined in the templates. Any thoughts about how to include this particular copyrights? |
Ug. That looks like some kind of MIT derivative, or something. We'll have to do some research on it; for now, I'll suggest that we just disable copyright checking. |
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.
Overall, this looks pretty good. A lot of little nits inline. There are also some bigger things listed below. But since I don't want this PR to get much bigger, please open issues for these so we can follow-up later:
- Rename all
.h
->.hpp
files. This will have to also have a deprecation warning, and should be done post-Foxy. - Go through the comments (particularly API comments) and fix the ones that say
todo
. - Go through the comments and use a common Doxygen style (some of the comments use
\
and some use@
).
{ | ||
*this = rhs; | ||
} | ||
|
||
TF2_PUBLIC | ||
TransformStorage& operator=(const TransformStorage& rhs) | ||
TransformStorage & operator=(const TransformStorage & rhs) | ||
{ | ||
#if 01 |
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.
This looks like a bug. If you don't want to deal with it in this PR, please open an issue to follow-up on it.
Thanks for the review! it's quite long the PR. The issue was created #259 |
For now I will not remove because it's part of the public API. Maybe in the post-foxy release review. |
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.
Two more minor things to fix, then I think we're good to go.
One question: in #259, what do you mean by "remove time.h"? I think we added that relatively recently so that people could just get the time conversions, but maybe I'm misremembering. Can you elaborate more on why?
tf2/include/tf2/time.h
Outdated
#ifndef TF2__TIME_H_ | ||
#define TF2__TIME_H_ | ||
|
||
#include <stdio.h> |
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.
This comment about removing stdio.h is still open.
I understood the comment wrong. I read that the "file" was not used, not just the |
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.
Looks good with green CI.
I'd really like to not apply the linters to LinearMath files. It's a fork of Bullets LinearMath implementation and we periodically sync between them. Can we suppress the linting in that subdirectory? |
For now we can only suppress the linting in uncrustify, but with this PR ament/ament_lint#234 we can suppress them also in cppcheck and cpplint |
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.
Thanks this looks much better with excluding the LinearMath content.
Since Foxy will be supported for 3+ years I would highly suggest to not have such a big diff between the Foxy and G-turtle branch. |
Why? |
Because of the extra effort to backport fixes. |
This package is one of the candidates for Quality Level 1 or 2. This means that linters is a must. what's the best way to proceed? |
My opinion hasn't changed; if we keep shoveling stuff into Foxy, then it will never get done. That being said, if others think we should proceed, then I won't stand in the way. |
Clearly it's a risk, but I think continuity with G-Turtle and forward will be more valuable than backwards compatibility with Noetic so the maintenance hopefully will be reduced. We're already pretty diverged from the ROS 1 branch so patches won't just apply across. Clearly any big change is a risk but this has reasonable coverage so I think it's relatively low especially with it theoretically being just reformatting. @ros-pull-request-builder retest this please |
@ros-pull-request-builder retest this please |
Testing changes on ament_lint ament/ament_lint#238. Running CI up-to tf2 |
bec7635
to
dc9126d
Compare
I've now rebased and force-pushed this on the latest. It still needs the changes from ament/ament_lint#238 to go in first, though. |
Signed-off-by: Chris Lalancette <clalancette@openrobotics.org> Signed-off-by: ahcorde <ahcorde@gmail.com>
dc9126d
to
dd033ec
Compare
I've rebased this onto the latest, and also replaced the actual linting checks with a TODO. I'd like to go ahead and merge this, since this is going to affect any incoming PRs that touch the With all of that said, then, here is another CI up to tf2. If this succeeds, I'll merge: |
Each of the common linters were individually `find_package`-d and invoked in the CMakeLists.txt file. This is because there is no simple way to pass file exclusion information through `ament_lint_auto`. File exclusion is necessary because we do not want to run linters on the include/tf2/LinearMath/ headers, since these are external and periodically synced with upstream. See #258 (comment) for more information. Signed-off-by: Abrar Rahman Protyasha <aprotyas@u.rochester.edu>
Each of the common linters were individually `find_package`-d and invoked in the CMakeLists.txt file. This is because there is no simple way to pass file exclusion information through `ament_lint_auto`. File exclusion is necessary because we do not want to run linters on the include/tf2/LinearMath/ headers, since these are external and periodically synced with upstream. See #258 (comment) for more information. Signed-off-by: Abrar Rahman Protyasha <aprotyas@u.rochester.edu>
As discussed in #467: - Enables a subset of relevant linter tests from `ament_lint_common` in `tf2`. - Excludes LinearMath headers (include/tf2/LinearMath) from being linted. - Fixes line-length formatting issues in a few source files, so that there are no lint failures in the current state. Note that individual linters had to be invoked rather than use `ament_lint_auto` because the LinearMath headers should not have linters run on them - see #258 (comment) for more information - and because `ament_lint_auto` does not provide a general way of providing file exclusion lists. Signed-off-by: Abrar Rahman Protyasha <aprotyas@u.rochester.edu>
This PR adds common linters. It builds on top of this other PR #257.