torbjoernk created this revision.
torbjoernk added reviewers: alexfh, bkramer.
torbjoernk added a project: clang-tools-extra.
Herald added subscribers: cfe-commits, xazax.hun.
Herald added a project: clang.

run-clang-tidy.py was enforcing '-header-filter' parameter with an
unfortunate default value when none was given. Thus, leading to
overwritten clang-tidy configuration (e.g. from .clang-tidy).

This change removes the default value for '-header-filter' resulting in
the default behaviour of clang-tidy itself.

Fixes PR#41426


Repository:
  rCTE Clang Tools Extra

https://reviews.llvm.org/D61747

Files:
  clang-tools-extra/clang-tidy/tool/run-clang-tidy.py


Index: clang-tools-extra/clang-tidy/tool/run-clang-tidy.py
===================================================================
--- clang-tools-extra/clang-tidy/tool/run-clang-tidy.py
+++ clang-tools-extra/clang-tidy/tool/run-clang-tidy.py
@@ -84,9 +84,6 @@
   start = [clang_tidy_binary]
   if header_filter is not None:
     start.append('-header-filter=' + header_filter)
-  else:
-    # Show warnings in all in-project headers by default.
-    start.append('-header-filter=^' + build_path + '/.*')
   if checks:
     start.append('-checks=' + checks)
   if tmpdir is not None:


Index: clang-tools-extra/clang-tidy/tool/run-clang-tidy.py
===================================================================
--- clang-tools-extra/clang-tidy/tool/run-clang-tidy.py
+++ clang-tools-extra/clang-tidy/tool/run-clang-tidy.py
@@ -84,9 +84,6 @@
   start = [clang_tidy_binary]
   if header_filter is not None:
     start.append('-header-filter=' + header_filter)
-  else:
-    # Show warnings in all in-project headers by default.
-    start.append('-header-filter=^' + build_path + '/.*')
   if checks:
     start.append('-checks=' + checks)
   if tmpdir is not None:
_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to