From df0f7f2b5d2b172a856e61e49888f7aefde0572c Mon Sep 17 00:00:00 2001 From: Niels Lohmann Date: Sun, 17 Mar 2019 12:02:23 +0100 Subject: [PATCH] :construction_worker: overworked clang-tidy target --- .clang-tidy | 23 +++++++++++++++++++++++ Makefile | 9 ++++----- 2 files changed, 27 insertions(+), 5 deletions(-) create mode 100644 .clang-tidy diff --git a/.clang-tidy b/.clang-tidy new file mode 100644 index 00000000..0a04d286 --- /dev/null +++ b/.clang-tidy @@ -0,0 +1,23 @@ +Checks: '-*, + bugprone-*, + cert-*, + clang-analyzer-*, + google-*, + -google-runtime-references, + hicpp-*, + -hicpp-no-array-decay, + -hicpp-uppercase-literal-suffix, + misc-*, + -misc-non-private-member-variables-in-classes, + llvm-*, + -llvm-header-guard, + modernize-*, + performance-*, + portability-*, + readability-*, + -readability-magic-numbers, + -readability-uppercase-literal-suffix' + +CheckOptions: + - key: hicpp-special-member-functions.AllowSoleDefaultDtor + value: 1 diff --git a/Makefile b/Makefile index 7d2bfb91..7d7ce5f6 100644 --- a/Makefile +++ b/Makefile @@ -192,9 +192,11 @@ pedantic_gcc: -Wdouble-promotion \ -Wduplicated-branches \ -Wduplicated-cond \ + -Weffc++ \ -Wempty-body \ -Wendif-labels \ -Wenum-compare \ + -Wexpansion-to-defined \ -Werror \ -Wextra \ -Wextra-semi \ @@ -249,13 +251,9 @@ pedantic_gcc: -Wmultistatement-macros \ -Wnarrowing \ -Wno-deprecated-declarations \ - -Wno-effc++ \ - -Wno-expansion-to-defined \ - -Wno-ignored-qualifiers \ -Wno-long-long \ -Wno-namespaces \ -Wno-padded \ - -Wno-switch-default \ -Wno-switch-enum \ -Wno-system-headers \ -Wno-templates \ @@ -332,6 +330,7 @@ pedantic_gcc: -Wsuggest-override \ -Wswitch \ -Wswitch-bool \ + -Wswitch-default \ -Wswitch-unreachable \ -Wsync-nand \ -Wsynth \ @@ -457,7 +456,7 @@ cpplint: third_party/cpplint/cpplint.py --filter=-whitespace,-legal,-readability/alt_tokens,-runtime/references,-runtime/explicit --quiet --recursive include clang_tidy: - $(COMPILER_DIR)/clang-tidy -checks='-*, readability-*, -readability-magic-numbers, -readability-uppercase-literal-suffix, modernize-*, bugprone-*, performance-*, clang-analyzer-*, portability-*, cert-*, hicpp-*, -hicpp-no-array-decay, -hicpp-uppercase-literal-suffix, google-*, -google-runtime-references' $(SRCS) -- -Iinclude -std=c++11 + $(COMPILER_DIR)/clang-tidy $(SRCS) -- -Iinclude -std=c++11 pvs_studio: rm -fr pvs_studio_build