diff --git a/ci/test/06_script_a.sh b/ci/test/06_script_a.sh index 4742cb02ead..6a6bde05a10 100755 --- a/ci/test/06_script_a.sh +++ b/ci/test/06_script_a.sh @@ -49,7 +49,7 @@ if [[ ${USE_MEMORY_SANITIZER} == "true" ]]; then fi if [[ "${RUN_TIDY}" == "true" ]]; then - MAYBE_BEAR="bear" + MAYBE_BEAR="bear --config src/.bear-tidy-config" MAYBE_TOKEN="--" fi diff --git a/configure.ac b/configure.ac index 4c80899e5f2..554083a44ce 100644 --- a/configure.ac +++ b/configure.ac @@ -1935,6 +1935,7 @@ AC_CONFIG_LINKS([contrib/devtools/test-security-check.py:contrib/devtools/test-s AC_CONFIG_LINKS([contrib/devtools/test-symbol-check.py:contrib/devtools/test-symbol-check.py]) AC_CONFIG_LINKS([contrib/filter-lcov.py:contrib/filter-lcov.py]) AC_CONFIG_LINKS([contrib/macdeploy/background.tiff:contrib/macdeploy/background.tiff]) +AC_CONFIG_LINKS([src/.bear-tidy-config:src/.bear-tidy-config]) AC_CONFIG_LINKS([src/.clang-tidy:src/.clang-tidy]) AC_CONFIG_LINKS([test/functional/test_runner.py:test/functional/test_runner.py]) AC_CONFIG_LINKS([test/fuzz/test_runner.py:test/fuzz/test_runner.py]) diff --git a/src/.bear-tidy-config b/src/.bear-tidy-config new file mode 100644 index 00000000000..111ef6ee444 --- /dev/null +++ b/src/.bear-tidy-config @@ -0,0 +1,15 @@ +{ + "output": { + "content": { + "include_only_existing_source": true, + "paths_to_include": [], + "paths_to_exclude": [ + "src/leveldb" + ] + }, + "format": { + "command_as_array": true, + "drop_output_field": false + } + } +} diff --git a/src/.clang-tidy b/src/.clang-tidy index 27616ad072f..fda95967f54 100644 --- a/src/.clang-tidy +++ b/src/.clang-tidy @@ -1,2 +1,2 @@ -Checks: '-*,bugprone-argument-comment' -WarningsAsErrors: bugprone-argument-comment +Checks: '-*,bugprone-argument-comment,modernize-use-nullptr' +WarningsAsErrors: 'bugprone-argument-comment,modernize-use-nullptr'