diff options
author | 2019-02-05 13:24:26 +0100 | |
---|---|---|
committer | 2019-04-26 13:55:14 +0200 | |
commit | b7164eea5c7aeb5f230bdac881170520bf6b2de7 (patch) | |
tree | 8daeb37252987bff61138eb655a3c62935690b29 | |
parent | 5fa2044f91ef709ae076927bc354ce6f78905356 (diff) | |
download | paludis-b7164eea5c7aeb5f230bdac881170520bf6b2de7.tar.gz paludis-b7164eea5c7aeb5f230bdac881170520bf6b2de7.tar.xz |
ci: Add clang-tidy stage
Created using:
$ clang-tidy -dump-config > .clang-tidy
with
$ clang-tidy --version
LLVM (http://llvm.org/):
LLVM version 8.0.0svn
Optimized build with assertions.
Default target: x86_64-pc-linux-gnu
Host CPU: penryn
-rw-r--r-- | .clang-tidy | 50 | ||||
-rw-r--r-- | .gitlab-ci.yml | 10 |
2 files changed, 60 insertions, 0 deletions
diff --git a/.clang-tidy b/.clang-tidy new file mode 100644 index 000000000..4c46da7cd --- /dev/null +++ b/.clang-tidy @@ -0,0 +1,50 @@ +--- +Checks: "-*,\ +modernize-*,\ +-modernize-use-override,\ +-modernize-loop-convert,\ +-modernize-use-emplace,\ +-modernize-use-using,\ +-modernize-use-auto,\ +-modernize-deprecated-headers,\ +-modernize-pass-by-value,\ +-modernize-use-nullptr,\ +-modernize-use-equals-delete,\ +-modernize-use-default-member-init,\ +-modernize-avoid-c-arrays,\ +-modernize-raw-string-literal,\ +-modernize-redundant-void-arg,\ +-modernize-replace-random-shuffle,\ +-modernize-use-equals-default,\ +-modernize-return-braced-init-list" +WarningsAsErrors: '*' +HeaderFilterRegex: '.*' +AnalyzeTemporaryDtors: false +FormatStyle: none +CheckOptions: + - key: cert-dcl16-c.NewSuffixes + value: 'L;LL;LU;LLU' + - key: cppcoreguidelines-non-private-member-variables-in-classes.IgnoreClassesWithAllMemberVariablesBeingPublic + value: '1' + - key: google-readability-braces-around-statements.ShortStatementLines + value: '1' + - key: google-readability-function-size.StatementThreshold + value: '800' + - key: google-readability-namespace-comments.ShortNamespaceLines + value: '10' + - key: google-readability-namespace-comments.SpacesBeforeComments + value: '2' + - key: modernize-loop-convert.MaxCopySize + value: '16' + - key: modernize-loop-convert.MinConfidence + value: reasonable + - key: modernize-loop-convert.NamingStyle + value: CamelCase + - key: modernize-pass-by-value.IncludeStyle + value: llvm + - key: modernize-replace-auto-ptr.IncludeStyle + value: llvm + - key: modernize-use-nullptr.NullMacros + value: 'NULL' +... + diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index dcd893a21..068112c3a 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -1,6 +1,7 @@ stages: - build - test + - clang-tidy .build-template: &build-template stage: build @@ -89,3 +90,12 @@ test:gentoo: - build:gentoo <<: *test-template +clang-tidy: + stage: clang-tidy + dependencies: + - build:exherbo-clang + image: paludis/exherbo-clang + script: + - export PATH="${PATH}:$(llvm-config --prefix)/share/clang" + - run-clang-tidy.py -j$(nproc) -p build-obj/ -header-filter="${PWD}/.*" + |