Skip to content

update cpplint configuration - #31

Merged
dirk-thomas merged 3 commits into
masterfrom
config_cpplint
Oct 15, 2015
Merged

dirk-thomas merged 3 commits into
masterfrom
config_cpplint

Conversation

@dirk-thomas

Copy link
Copy Markdown
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

wjwwood commented Oct 14, 2015

Copy link
Copy Markdown
Contributor

lgtm

@dirk-thomas

Copy link
Copy Markdown
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.

@jackieokay

Copy link
Copy Markdown

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

wjwwood commented Oct 14, 2015

Copy link
Copy Markdown
Contributor

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

tfoote commented Oct 14, 2015

Copy link
Copy Markdown
Member

+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.

4 participants