Skip to content

Sort include (using the Google C++ style pattern). Also add some more…#184

Merged
etr merged 1 commit intoetr:masterfrom
bcsgh:bcsgh_sort_include
Mar 7, 2020
Merged

Sort include (using the Google C++ style pattern). Also add some more…#184
etr merged 1 commit intoetr:masterfrom
bcsgh:bcsgh_sort_include

Conversation

@bcsgh
Copy link
Copy Markdown
Contributor

@bcsgh bcsgh commented Mar 7, 2020

Identify the Bug

#177 (General code style issues)

Description of the Change

Sort include (using the Google C++ style pattern).

The pattern I'm recommending is:

[if in foo.cpp or foo_test.cpp
#include <full/path/to/foo.hpp>
]

#include <c-headers.h>  
#include <c++header>

#include <local/headers.hpp> 

This is somewhat complicated by the #if WINDOWS ... stuff, but there wasn't many of those.

Also this shuffling surface some files that used symbols that were not defined in a header they included. It seems rather that they were depending on the needed header having already been included by something up the stack.

Alternate Designs

Leaving it as whatever.

Possible Drawbacks

It's possible this could break a consuming build somehow, however any break should be fixable by adding some needed header (probably in the consuming code) which should be done anyway.

Verification Process

./bootstrap
mkdir build ; cs build
../configure
make

Release Notes

Sort include (using the Google C++ style pattern).

… includes where indirection inclusions were broken.
@codecov-io
Copy link
Copy Markdown

Codecov Report

Merging #184 into master will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@           Coverage Diff           @@
##           master     #184   +/-   ##
=======================================
  Coverage   95.19%   95.19%           
=======================================
  Files          35       35           
  Lines        3140     3140           
=======================================
  Hits         2989     2989           
  Misses        151      151
Impacted Files Coverage Δ
src/httpserver/details/http_endpoint.hpp 100% <ø> (ø) ⬆️
src/httpserver/http_resource.hpp 33.33% <ø> (ø) ⬆️
test/integ/deferred.cpp 100% <ø> (ø) ⬆️
test/unit/http_endpoint_test.cpp 100% <ø> (ø) ⬆️
test/integ/nodelay.cpp 100% <ø> (ø) ⬆️
test/unit/string_utilities_test.cpp 100% <ø> (ø) ⬆️
test/integ/basic.cpp 99.68% <ø> (ø) ⬆️
src/file_response.cpp 83.33% <ø> (ø) ⬆️
src/details/http_endpoint.cpp 100% <ø> (ø) ⬆️
test/littletest.hpp 67.27% <ø> (ø) ⬆️
... and 17 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update a53647e...1925c38. Read the comment docs.

@bcsgh bcsgh marked this pull request as ready for review March 7, 2020 20:18
@etr etr merged commit ee2f258 into etr:master Mar 7, 2020
@bcsgh bcsgh deleted the bcsgh_sort_include branch February 15, 2021 02:36
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