Skip to content
This repository was archived by the owner on Jun 21, 2023. It is now read-only.

update code to pass ament_cpplint - #102

Merged
dirk-thomas merged 1 commit into
masterfrom
cpplint
Oct 19, 2015
Merged

dirk-thomas merged 1 commit into
masterfrom
cpplint

Conversation

@dirk-thomas

Copy link
Copy Markdown
Member

No description provided.

@dirk-thomas dirk-thomas added the in review Waiting for review (Kanban column) label Oct 16, 2015
@dirk-thomas dirk-thomas self-assigned this Oct 16, 2015
@dirk-thomas
dirk-thomas force-pushed the cpplint branch 2 times, most recently from 79d4323 to dc5a625 Compare October 16, 2015 00:06
@dirk-thomas dirk-thomas changed the title Cpplint update code to pass ament_cpplint Oct 16, 2015
Comment thread rmw_connext_cpp/src/functions.cpp Outdated

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

I don't think these count as our headers, and so I believe they should be included with <> and should be treated something like boost would be. I think they should fall under "Other libraries' .h files." as described in https://google-styleguide.googlecode.com/svn/trunk/cppguide.html#Names_and_Order_of_Includes. To be fair, the guide doesn't clearly state which include style should be used for "Other libraries' .h files.".

This might be a case which isn't covered by the linter and in which case we need to clearly state what we do and make the linter agree with a patch. In my opinion it should be something like this example:

(project/src/foo.cpp)

#include "project/foo.hpp"

#include <stdio.h>

#include <iostream>

#include <boost/thread.hpp>

#include "project/other.hpp"

Thoughts?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Afaik it is recommended to use <> for system headers. I wouldn't classify Connext as such.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Hmm, I'm not sure I agree. Neither Boost nor Qt examples suggest to user to use quotes when including their headers and they are not "system headers". The Google style guide doesn't say one way or the other and neither does the "include what you use" tool from Google. I don't see good rationals out there for one way or the other, but this just seems like using quotes to make the linter happy.

I suppose we just forget about it.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

For these lines cpplint actually doesn't care. I reverted them to how they were before the PR.

@dirk-thomas
dirk-thomas force-pushed the cpplint branch 2 times, most recently from fe9f2d5 to 10b3705 Compare October 16, 2015 00:45
@wjwwood

wjwwood commented Oct 16, 2015

Copy link
Copy Markdown
Member

+1

dirk-thomas added a commit that referenced this pull request Oct 19, 2015
update code to pass ament_cpplint
@dirk-thomas
dirk-thomas merged commit 45596c3 into master Oct 19, 2015
@dirk-thomas
dirk-thomas deleted the cpplint branch October 19, 2015 22:23
@dirk-thomas dirk-thomas removed the in review Waiting for review (Kanban column) label Oct 19, 2015
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants