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: Erroneously warns for do while loops #31

Closed
alexhenning opened this issue Jun 30, 2015 · 0 comments
Closed

cpplint: Erroneously warns for do while loops #31

alexhenning opened this issue Jun 30, 2015 · 0 comments

Comments

@alexhenning
Copy link
Contributor

cpplint currently doesn't like do while loops and erroneously warns about them. The problem seems to be due to the change in brace styles: https://github.com/ros/roslint/blob/master/src/roslint/cpplint.py#L3130

Given:

// Copyright 2015 Alex Henning

void dowhile()
{
  do
  {
    // Do some stuff
  }
  while (true);
}

Result:

dowhile.cpp:9:  Empty loop bodies should use {} or continue  [whitespace/empty_loop_body] [5]
Done processing dowhile.cpp
Total errors found: 1
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

No branches or pull requests

1 participant