Skip to content
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

cpplint: Enforce line_length on C-style comments #31

Merged
merged 1 commit into from
Aug 4, 2020

Conversation

jwnimmer-tri
Copy link

@jwnimmer-tri jwnimmer-tri commented Jul 29, 2020

Prior to this patch, cpplint ignores C-style comments entirely, so in Drake they had trailing whitespace, overly long lines, etc.

Note that this adds false positives for whitespace/todo when TODO is used within a C-style comment. We don't care, because we have that warning disabled in Drake.

Tested vs Drake in RobotLocomotion/drake#13804.


This change is Reviewable

Note that this adds false positives for whitespace/todo when TODO is
used within a C-style comment.  We don't care, because we have that
warning disabled in Drake.
@jwnimmer-tri jwnimmer-tri marked this pull request as ready for review August 3, 2020 14:55
@EricCousineau-TRI
Copy link
Collaborator

Er, actually, I'm not sure if I understand why we need this?

Can you point to a spot in the Drake codebase or a Drake PR where you were bitten by this?

(Also, just to make sure, this doesn't conflict with the rules set out in #30, does it?)

@jwnimmer-tri
Copy link
Author

This change diagnosed all of these problems: RobotLocomotion/drake#13762.

Prior to this patch, cpplint ignores C-style comments entirely, so in Drake they had trailing whitespace, overly long lines, etc.

This is not at odds with #30. This PR is only enabling linting of C-style comments. Where we use C vs C++ style, Doxygen style, or indentation, are unaffected.

Copy link
Collaborator

@EricCousineau-TRI EricCousineau-TRI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

:lgtm: - thanks for the explanation!

Reviewed 2 of 2 files at r1.
Reviewable status: needs platform reviewer assigned, needs at least two assigned reviewers

Copy link
Collaborator

@EricCousineau-TRI EricCousineau-TRI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewable status: 1 unresolved discussion, needs at least two assigned reviewers (waiting on @jwnimmer-tri)

a discussion (no related file):
Should this be blocked once it doesn't trigger errors on Drake? (the 300-character long lines mentioned in Slack convo)?


Copy link
Collaborator

@EricCousineau-TRI EricCousineau-TRI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewable status: 1 unresolved discussion, needs at least two assigned reviewers (waiting on @jwnimmer-tri)

a discussion (no related file):

Previously, EricCousineau-TRI (Eric Cousineau) wrote…

Should this be blocked once it doesn't trigger errors on Drake? (the 300-character long lines mentioned in Slack convo)?

  • blocked until it doesn't [...]

@jwnimmer-tri
Copy link
Author

Yup; that's why I haven't assigned the second reviewer yet.

Copy link
Author

@jwnimmer-tri jwnimmer-tri left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewable status: 1 unresolved discussion, needs at least two assigned reviewers (waiting on @jwnimmer-tri)

a discussion (no related file):

Previously, EricCousineau-TRI (Eric Cousineau) wrote…
  • blocked until it doesn't [...]

Will use RobotLocomotion/drake#13804 to show pass/fail of Drake.


Copy link
Author

@jwnimmer-tri jwnimmer-tri left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

+@sherm1 for platform review per rotation, please.

Reviewable status: 1 unresolved discussion, LGTM missing from assignee sherm1(platform) (waiting on @EricCousineau-TRI and @sherm1)

a discussion (no related file):

Previously, jwnimmer-tri (Jeremy Nimmer) wrote…

Will use RobotLocomotion/drake#13804 to show pass/fail of Drake.

Passing now.


Copy link
Author

@jwnimmer-tri jwnimmer-tri left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Dismissed @EricCousineau-TRI from a discussion.
Reviewable status: LGTM missing from assignee sherm1(platform) (waiting on @sherm1)

Copy link
Member

@sherm1 sherm1 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Platform :lgtm:
Q: is there automatic support for NOLINT(readability/multiline_comment)?

Reviewed 2 of 2 files at r1.
Reviewable status: :shipit: complete! all discussions resolved, LGTM from assignees EricCousineau-TRI(platform),sherm1(platform)

@jwnimmer-tri
Copy link
Author

The NOLINT probably works out of the box, though I haven't tried it. We've never had to use it before, nor on master currently.

@jwnimmer-tri jwnimmer-tri merged commit 5d2a134 into RobotLocomotion:gh-pages Aug 4, 2020
@jwnimmer-tri jwnimmer-tri deleted the c-style-80 branch August 4, 2020 17:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants