[PATCH] D61747: [clang-tidy] remove default header-filter for run-clang-tidy

Torbjörn Klatt via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Thu May 9 11:38:28 PDT 2019


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:


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D61747.198877.patch
Type: text/x-patch
Size: 580 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20190509/6f1e90ab/attachment.bin>


More information about the cfe-commits mailing list