Skip to content

Commit

Permalink
Set rather low clang-tidy warnings and moved the file to the root dir (
Browse files Browse the repository at this point in the history
  • Loading branch information
FlorianReimold authored May 13, 2022
1 parent 232afd1 commit 274b79d
Show file tree
Hide file tree
Showing 5 changed files with 62 additions and 28 deletions.
15 changes: 15 additions & 0 deletions .clang-tidy
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
---
# This clang-tidy settings have been taken from here:
# https://github.com/googleapis/google-cloud-cpp/blob/main/.clang-tidy
#
# The first block are the exact google settings.
# The second block are warnings that I assumed to be irrelevant
# The third block are warnings that I would actually like to take care of for future projects
#

Checks: "-*,
clang-*
"
WarningsAsErrors: ''
HeaderFilterRegex: ''
FormatStyle: none
45 changes: 45 additions & 0 deletions .clang-tidy-for-the-future
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
---
# This clang-tidy settings have been taken from here:
# https://github.com/googleapis/google-cloud-cpp/blob/main/.clang-tidy
#
# The first block are the exact google settings.
# The second block are warnings that I assumed to be irrelevant
# The third block are warnings that I would actually like to take care of for future projects
#

Checks: "-*,
bugprone-*,
google-*,
misc-*,
modernize-*,
performance-*,
portability-*,
readability-*,
-google-readability-braces-around-statements,
-google-readability-namespace-comments,
-google-runtime-references,
-misc-non-private-member-variables-in-classes,
-modernize-return-braced-init-list,
-modernize-use-trailing-return-type,
-modernize-avoid-c-arrays,
-performance-move-const-arg,
-readability-braces-around-statements,
-readability-identifier-length,
-readability-magic-numbers,
-readability-named-parameter,
-readability-redundant-declaration,
-readability-function-cognitive-complexity,
-bugprone-narrowing-conversions,
-bugprone-easily-swappable-parameters,
-bugprone-implicit-widening-of-multiplication-result,

-readability-else-after-return,
-google-readability-todo

-modernize-use-auto,
-google-runtime-int,
-modernize-pass-by-value,
"
WarningsAsErrors: ''
HeaderFilterRegex: ''
FormatStyle: none
3 changes: 1 addition & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -46,5 +46,4 @@ doc/extensions/_autogen
cmake-build-*

# clang-tidy
/.clang-tidy
log_*.txt
log_*.txt
19 changes: 0 additions & 19 deletions build_linux/clang-tidy/.clang-tidy

This file was deleted.

8 changes: 1 addition & 7 deletions build_linux/clang-tidy/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -244,8 +244,7 @@ filter_compile_commands() {
cat "$PATH_EXC_CONFIG"
python3 ${PATH_FILTER} --build "${DIR_BUILD}"

cp -a "${DIR_SCRIPT}/.clang-tidy" "${DIR_ROOT}"
cp -a "${DIR_SCRIPT}/.clang-tidy" "${DIR_BUILD}"
cp -a "${DIR_ROOT}/.clang-tidy" "${DIR_BUILD}"
cd "${DIR_BUILD}"
${CLANG_TIDY} --dump-config > ${FILE_CLANG_TIDY_CONFIG}

Expand Down Expand Up @@ -418,10 +417,6 @@ run_clang_tidy_on_files() {
fi
}

tear_down() {
rm -f "${DIR_ROOT}/.clang-tidy"
}

# ------------------------------------------------------------------------------

check_args
Expand All @@ -430,7 +425,6 @@ run_make
filter_compile_commands
run_clang_tidy_on_database
run_clang_tidy_on_files
tear_down

# for GitHub actions
# https://docs.github.com/en/actions/using-workflows/workflow-commands-for-github-actions
Expand Down

0 comments on commit 274b79d

Please sign in to comment.