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

update cpplint configuration #31

Merged
merged 3 commits into from
Oct 15, 2015
Merged

update cpplint configuration #31

merged 3 commits into from
Oct 15, 2015

Conversation

dirk-thomas
Copy link
Contributor

The patch also implements a custom include guard pattern which follows the Google style guide with only one difference: instead of a single separator between folder names / namespaces and filenames it uses two. This ensures that separate packages have unique include guards.

The following example would otherwise in the same colliding include guards:

  • package foo_bar has a file baz.hpp
  • package foo has a file bar_baz.hpp

ament/ament_index#6 is an example what we need to update to make our code compliant with cpplint.

@dirk-thomas dirk-thomas added the in review Waiting for review (Kanban column) label Oct 14, 2015
@dirk-thomas dirk-thomas self-assigned this Oct 14, 2015
@wjwwood
Copy link
Contributor

wjwwood commented Oct 14, 2015

lgtm

@dirk-thomas
Copy link
Contributor Author

@esteve @jacquelinekay @tfoote Do you all agree to follow this style?

If yes, I will update the style guide in the wiki accordingly and we can start updating existing code to pass this linter before enabling it globally.

@jacquelinekay
Copy link

Alright, I pledge to follow the Google C++ style guidelines again.

Migrating the codebase back to this style will be an interesting process. Do we plan on doing it gradually or in one pass?

@wjwwood
Copy link
Contributor

wjwwood commented Oct 14, 2015

It shouldn't be too different from our current style. These addendums to the google style guide should be mentioned in our development guide: https://github.com/ros2/ros2/wiki/Developer-Guide#c-1 (which I believe Brain has gone through and made up to date recently, but if it needs more changes then they should be made since it's linked from our main ros2 wiki).

@tfoote
Copy link
Member

tfoote commented Oct 14, 2015

+1 to doing a double underscore between package name and file path.

It would be good to do a focused effort to get it migrated so we can turn on the automated checking soon.

dirk-thomas added a commit that referenced this pull request Oct 15, 2015
update cpplint configuration
@dirk-thomas dirk-thomas merged commit c1870cd into master Oct 15, 2015
@dirk-thomas dirk-thomas deleted the config_cpplint branch October 15, 2015 19:03
@dirk-thomas dirk-thomas removed the in review Waiting for review (Kanban column) label Oct 15, 2015
kenji-miyake referenced this pull request in kenji-miyake/ament_lint Oct 20, 2021
update cpplint configuration
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.

None yet

4 participants