I modified the .clang-format and .clang-tidy files. I remove the Google-specific lint options (eg, "google", "fuchsia"...) and kept the rest (so, that introduces a couple more lint options, "cppcoreguidelines" or "cert" or "misc").
For formatting, I made a very long list, instead of relying on a BasedOn like before.
I also created a "better" format and lint script than the default format-lint-all one. This one only formats and lints the staged files. It will require the following dependencies:
# installed from clang-tools-extra
clang-format
clang-tidy
# installed from cmakelang
cmake-format
cmake-lint
markdownlint
vale
Since it only check your staged files, this is a pretty good one to put onto your pre-commit Git hook.
A lot of this is redundant of course.
Why:
It's opinionated, but I believe being super specific would benefit more. A "bad" standard is better than none at all.
More strict lint options
I modified the .clang-format and .clang-tidy files. I remove the Google-specific lint options (eg, "google", "fuchsia"...) and kept the rest (so, that introduces a couple more lint options, "cppcoreguidelines" or "cert" or "misc").
For formatting, I made a very long list, instead of relying on a BasedOn like before.
I also created a "better" format and lint script than the default format-lint-all one. This one only formats and lints the staged files. It will require the following dependencies:
Since it only check your staged files, this is a pretty good one to put onto your pre-commit Git hook.
A lot of this is redundant of course.
It's opinionated, but I believe being super specific would benefit more. A "bad" standard is better than none at all.
I run these two commands:
Then changed the tabsize to 4 (instead of the default 8)
This is a very opinionated PR. If you don't like these changes, do leave a comment and then you can reject the PR :+1:.
@qu-ngx @BAOELIETRAN @AbstractionHLR @bebeminhminh @aqt169
Pull request by: Huy Nguyen