Skip to content

Add checks using cpplint#209

Merged
etr merged 17 commits intomasterfrom
check-cpplint-on-build
Mar 8, 2021
Merged

Add checks using cpplint#209
etr merged 17 commits intomasterfrom
check-cpplint-on-build

Conversation

@etr
Copy link
Copy Markdown
Owner

@etr etr commented Aug 27, 2020

Identify the Bug

The code doesn't follow a proper style guide (more or less accumulated over the years).
This results in less readable code for anyone who wants to propose PRs.

Description of the Change

This change adds a cpplint check on travis and institutes a style guide on the code.
This way, style can be checked on every build (and on every PR). It will also be easier to communicate the style guide to contributors.

Alternate Designs

Using different tools (e.g. clang-tidy). I've decided to use cpplint because I broadly agree with the underlying style (Google code style) - changes to that are minor and can be managed through configuration.

Possible Drawbacks

Noisier builds. PRs might fail on contributors because of style errors. This might slow some people down, but the overall benefit in quality is superior. This is also mitigated by the well-known style guide adopted.

Verification Process

Travis checks.

Release Notes

Added a cpplint check on travis and institutes a style guide on the code.

@etr etr added build-system Related to the build system. work-in-progress Pull requests which are still being worked on, more changes will follow. labels Aug 27, 2020
@etr etr self-assigned this Aug 27, 2020
@etr etr linked an issue Aug 27, 2020 that may be closed by this pull request
@etr
Copy link
Copy Markdown
Owner Author

etr commented Aug 27, 2020

This PR is still in progress (it might take a few commits to complete).

@codecov
Copy link
Copy Markdown

codecov bot commented Mar 4, 2021

Codecov Report

Merging #209 (ba6e708) into master (b7ae750) will decrease coverage by 0.10%.
The diff coverage is 94.87%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #209      +/-   ##
==========================================
- Coverage   95.70%   95.59%   -0.11%     
==========================================
  Files          35       35              
  Lines        3256     3222      -34     
==========================================
- Hits         3116     3080      -36     
- Misses        140      142       +2     
Impacted Files Coverage Δ
test/littletest.hpp 72.07% <0.00%> (ø)
src/httpserver/http_resource.hpp 63.63% <63.63%> (ø)
src/httpserver/string_response.hpp 80.00% <80.00%> (ø)
src/http_response.cpp 80.00% <81.25%> (-4.00%) ⬇️
src/http_resource.cpp 83.33% <83.33%> (-1.29%) ⬇️
test/integ/ws_start_stop.cpp 88.62% <86.66%> (ø)
src/webserver.cpp 89.36% <89.17%> (-0.95%) ⬇️
src/httpserver/http_request.hpp 92.85% <92.85%> (ø)
src/details/http_endpoint.cpp 97.01% <95.00%> (-0.05%) ⬇️
src/http_request.cpp 96.55% <96.15%> (-0.15%) ⬇️
... and 25 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 b7ae750...ba6e708. Read the comment docs.

@etr etr merged commit 6d1df06 into master Mar 8, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

build-system Related to the build system. work-in-progress Pull requests which are still being worked on, more changes will follow.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[BUG] General code style issues

1 participant