-
Notifications
You must be signed in to change notification settings - Fork 15
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* clang-format * Update linter action * Apply clang-format to all files and only trigger workflow on PR * Add .clang-tidy and apply it * Fix typo * disable tidy checks * Use .clang-tidy file * Disable clang-tidy
- Loading branch information
Showing
19 changed files
with
148 additions
and
97 deletions.
There are no files selected for viewing
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
--- | ||
Checks: 'clang-diagnostic-*,clang-analyzer-*,readability-braces-around-statements' | ||
WarningsAsErrors: '' | ||
HeaderFilterRegex: '' | ||
AnalyzeTemporaryDtors: false | ||
FormatStyle: none | ||
User: user | ||
CheckOptions: | ||
- key: llvm-else-after-return.WarnOnConditionVariables | ||
value: 'false' | ||
- key: modernize-loop-convert.MinConfidence | ||
value: reasonable | ||
- key: modernize-replace-auto-ptr.IncludeStyle | ||
value: llvm | ||
- key: cert-str34-c.DiagnoseSignedUnsignedCharComparisons | ||
value: 'false' | ||
- key: google-readability-namespace-comments.ShortNamespaceLines | ||
value: '10' | ||
- key: cert-err33-c.CheckedFunctions | ||
value: '::aligned_alloc;::asctime_s;::at_quick_exit;::atexit;::bsearch;::bsearch_s;::btowc;::c16rtomb;::c32rtomb;::calloc;::clock;::cnd_broadcast;::cnd_init;::cnd_signal;::cnd_timedwait;::cnd_wait;::ctime_s;::fclose;::fflush;::fgetc;::fgetpos;::fgets;::fgetwc;::fopen;::fopen_s;::fprintf;::fprintf_s;::fputc;::fputs;::fputwc;::fputws;::fread;::freopen;::freopen_s;::fscanf;::fscanf_s;::fseek;::fsetpos;::ftell;::fwprintf;::fwprintf_s;::fwrite;::fwscanf;::fwscanf_s;::getc;::getchar;::getenv;::getenv_s;::gets_s;::getwc;::getwchar;::gmtime;::gmtime_s;::localtime;::localtime_s;::malloc;::mbrtoc16;::mbrtoc32;::mbsrtowcs;::mbsrtowcs_s;::mbstowcs;::mbstowcs_s;::memchr;::mktime;::mtx_init;::mtx_lock;::mtx_timedlock;::mtx_trylock;::mtx_unlock;::printf_s;::putc;::putwc;::raise;::realloc;::remove;::rename;::scanf;::scanf_s;::setlocale;::setvbuf;::signal;::snprintf;::snprintf_s;::sprintf;::sprintf_s;::sscanf;::sscanf_s;::strchr;::strerror_s;::strftime;::strpbrk;::strrchr;::strstr;::strtod;::strtof;::strtoimax;::strtok;::strtok_s;::strtol;::strtold;::strtoll;::strtoul;::strtoull;::strtoumax;::strxfrm;::swprintf;::swprintf_s;::swscanf;::swscanf_s;::thrd_create;::thrd_detach;::thrd_join;::thrd_sleep;::time;::timespec_get;::tmpfile;::tmpfile_s;::tmpnam;::tmpnam_s;::tss_create;::tss_get;::tss_set;::ungetc;::ungetwc;::vfprintf;::vfprintf_s;::vfscanf;::vfscanf_s;::vfwprintf;::vfwprintf_s;::vfwscanf;::vfwscanf_s;::vprintf_s;::vscanf;::vscanf_s;::vsnprintf;::vsnprintf_s;::vsprintf;::vsprintf_s;::vsscanf;::vsscanf_s;::vswprintf;::vswprintf_s;::vswscanf;::vswscanf_s;::vwprintf_s;::vwscanf;::vwscanf_s;::wcrtomb;::wcschr;::wcsftime;::wcspbrk;::wcsrchr;::wcsrtombs;::wcsrtombs_s;::wcsstr;::wcstod;::wcstof;::wcstoimax;::wcstok;::wcstok_s;::wcstol;::wcstold;::wcstoll;::wcstombs;::wcstombs_s;::wcstoul;::wcstoull;::wcstoumax;::wcsxfrm;::wctob;::wctrans;::wctype;::wmemchr;::wprintf_s;::wscanf;::wscanf_s;' | ||
- key: cert-oop54-cpp.WarnOnlyIfThisHasSuspiciousField | ||
value: 'false' | ||
- key: cert-dcl16-c.NewSuffixes | ||
value: 'L;LL;LU;LLU' | ||
- key: google-readability-braces-around-statements.ShortStatementLines | ||
value: '1' | ||
- key: cppcoreguidelines-non-private-member-variables-in-classes.IgnoreClassesWithAllMemberVariablesBeingPublic | ||
value: 'true' | ||
- key: google-readability-namespace-comments.SpacesBeforeComments | ||
value: '2' | ||
- key: modernize-loop-convert.MaxCopySize | ||
value: '16' | ||
- key: modernize-pass-by-value.IncludeStyle | ||
value: llvm | ||
- key: modernize-use-nullptr.NullMacros | ||
value: 'NULL' | ||
- key: llvm-qualified-auto.AddConstToQualified | ||
value: 'false' | ||
- key: modernize-loop-convert.NamingStyle | ||
value: CamelCase | ||
- key: llvm-else-after-return.WarnOnUnfixable | ||
value: 'false' | ||
- key: google-readability-function-size.StatementThreshold | ||
value: '800' | ||
... | ||
|
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,28 +1,24 @@ | ||
# Workflow syntax: | ||
# https://help.github.com/en/articles/workflow-syntax-for-github-actions | ||
name: cpp-linter | ||
|
||
on: | ||
push: | ||
paths-ignore: "docs/**" | ||
pull_request: | ||
paths-ignore: "docs/**" | ||
branches: [master] | ||
|
||
jobs: | ||
cpp-linter: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- uses: shenxianpeng/cpp-linter-action@master | ||
- uses: cpp-linter/cpp-linter-action@v2 | ||
id: linter | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
with: | ||
style: file | ||
tidy-checks: '-*' | ||
|
||
- name: Fail fast?! | ||
if: steps.linter.outputs.checks-failed > 0 | ||
run: | | ||
echo "Some files failed the linting checks!" | ||
# for actual deployment | ||
# run: exit 1 | ||
exit 1 |
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
Oops, something went wrong.
0032f03
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Possible performance regression was detected for benchmark 'C++ Benchmark'.
Benchmark result of this commit is worse than the previous benchmark result exceeding threshold
1.50
.BM_EWPT/repeats:5_stddev
432876958.33903724
ns/iter60093734.67714155
ns/iter7.20
This comment was automatically generated by workflow using github-action-benchmark.
0032f03
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Possible performance regression was detected for benchmark 'C++ Benchmark'.
Benchmark result of this commit is worse than the previous benchmark result exceeding threshold
1.50
.BM_EWPT/repeats:5_stddev
454968557.2817794
ns/iter60093734.67714155
ns/iter7.57
BM_EWBG/repeats:5_stddev
1399860989.3376434
ns/iter794964005.6979237
ns/iter1.76
This comment was automatically generated by workflow using github-action-benchmark.
0032f03
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Possible performance regression was detected for benchmark 'C++ Benchmark'.
Benchmark result of this commit is worse than the previous benchmark result exceeding threshold
1.50
.BM_EWPT/repeats:5_stddev
723569475.3369749
ns/iter60093734.67714155
ns/iter12.04
This comment was automatically generated by workflow using github-action-benchmark.
0032f03
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Possible performance regression was detected for benchmark 'C++ Benchmark'.
Benchmark result of this commit is worse than the previous benchmark result exceeding threshold
1.50
.BM_NLOVEV
393455057.5000003
ns/iter261216633.77999935
ns/iter1.51
BM_EWPT/repeats:5
7449930948.999963
ns/iter4129559233.000009
ns/iter1.80
BM_EWPT/repeats:5
7740058804
ns/iter4129559233.000009
ns/iter1.87
BM_EWPT/repeats:5
6562898937
ns/iter4129559233.000009
ns/iter1.59
BM_EWPT/repeats:5
6596248064.999997
ns/iter4129559233.000009
ns/iter1.60
BM_EWPT/repeats:5
6504567497.999971
ns/iter4129559233.000009
ns/iter1.58
BM_EWPT/repeats:5_mean
6970740850.599986
ns/iter4199874431.4000077
ns/iter1.66
BM_EWPT/repeats:5_median
6596248064.999998
ns/iter4205490277.000081
ns/iter1.57
BM_EWPT/repeats:5_stddev
579950586.5713532
ns/iter60093734.67714155
ns/iter9.65
BM_EWBG/repeats:5
37481918274.00001
ns/iter23518631864.999973
ns/iter1.59
BM_EWBG/repeats:5
35559018886.00011
ns/iter23518631864.999973
ns/iter1.51
BM_EWBG/repeats:5_mean
35433643831.20002
ns/iter22134513563.599995
ns/iter1.60
BM_EWBG/repeats:5_median
34747351396
ns/iter21717198442.00004
ns/iter1.60
BM_EWBG/repeats:5_stddev
1203235715.159899
ns/iter794964005.6979237
ns/iter1.51
This comment was automatically generated by workflow using github-action-benchmark.