This is an archive of the discontinued LLVM Phabricator instance.

[clang-tidy] remove default header-filter for run-clang-tidy
ClosedPublic

Authored by torbjoernk on May 9 2019, 11:38 AM.

Details

Summary

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

Diff Detail

Event Timeline

torbjoernk created this revision.May 9 2019, 11:38 AM
Herald added a project: Restricted Project. · View Herald TranscriptMay 9 2019, 11:38 AM

I've also had issues with this behavior. It's a bad default, as the PR notes, but is there a way to provide a better one and still respect the config file?

Also, could you add a test for this? Perhaps in clang-tools-extra/test//clang-tidy/run-clang-tidy.cpp.

After thinking about it, I agree with this change -- there's no way to provide an appropriate default at this level.

So, LGTM, but wait for @alexfh's okay.

hintonda accepted this revision.May 20 2019, 3:53 PM

LGTM. If no further comments, I'll commit it for you tomorrow.

This revision is now accepted and ready to land.May 20 2019, 3:53 PM
This revision was automatically updated to reflect the committed changes.