Style/cpplint fixes - #28
Merged
Merged
Conversation
…e Google) cpplint 1.6.1 reads CPPLINT.cfg, not .cpplintrc. Filters three categories that conflict with higher-priority constraints (subject, C++98), documented inline.
Closed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
style: apply cpplint fixes, filter what conflicts with 42/C++98
Second phase of the team style adoption (after the clang-format PR).
Runs cpplint (Google style) and resolves every finding under an explicit
priority order: 42's subject > C++98 > project decisions > Google style.
Google is an adopted baseline of good practices, overridden wherever a
higher layer conflicts.
Adopted (applied to the code)
Bot(Server*)markedexplicit; prevents accidentalimplicit conversion of a
Server*into aBot.if/elsemade brace-symmetric; prevents the"second statement silently outside the else" class of bug.
FancyLogSink.hppnow includes<string>directly instead of relying on a transitive include.
(own header, C system, C++ system, project), which also verifies each
header is self-contained. All compiled clean → headers were already
autonomous.
Filtered (documented in CPPLINT.cfg, each a higher-authority conflict)
to this tree.
(
INCLUDE_CLIENT_HPP_); 42's CPP modules expect header/source name parityand short guards, and there are no cross-directory name collisions, so the
path convention solves a problem we don't have.
Google's pointer-for-mutables rule is a call-site house preference.
the subject uses
int/size_t/time_t.Verification
cpplint clean (exit 0), three tiers
-Werrorclean, full suite 511/511, noregression. Config lives in
CPPLINT.cfg(cpplint 1.6.1 reads that, not.cpplintrc) with the rationale inline.Responds to issue #22