clang-tidy: Make tests more hermetic
authorNico Weber <thakis@chromium.org>
Fri, 30 Oct 2020 00:12:50 +0000 (20:12 -0400)
committerNico Weber <thakis@chromium.org>
Fri, 30 Oct 2020 00:14:57 +0000 (20:14 -0400)
commitf1e0944fe5bbafd99e7cddb0892d6396a7eba01f
tree0e20ecdb2bc56d9d5d274dd63212699238622cba
parentdb60e64036d11178f09048d4984f871527e543ea
clang-tidy: Make tests more hermetic

Make check_clang_tidy.py not just pass -format-style=none by default
but a full -config={}. Without this, with a build dir outside of
the llvm root dir and a .clang-tidy config further up that contains

  CheckOptions:
    - key:          modernize-use-default-member-init.UseAssignment
      value:        1

these tests would fail:

   Clang Tools :: clang-tidy/checkers/cppcoreguidelines-prefer-member-initializer-modernize-use-default-member-init.cpp
   Clang Tools :: clang-tidy/checkers/modernize-use-default-member-init-bitfield.cpp
   Clang Tools :: clang-tidy/checkers/modernize-use-default-member-init.cpp

After this change, they pass fine, despite the unrelated
.clang-tidy file further up.
clang-tools-extra/test/clang-tidy/check_clang_tidy.py