Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 4 additions & 3 deletions clang-tools-extra/clang-tidy/tool/run-clang-tidy.py
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ def find_compilation_database(path: str) -> str:


def get_tidy_invocation(
f: str,
f: Optional[str],
clang_tidy_binary: str,
checks: str,
tmpdir: Optional[str],
Expand Down Expand Up @@ -147,7 +147,8 @@ def get_tidy_invocation(
start.append(f"--warnings-as-errors={warnings_as_errors}")
if allow_no_checks:
start.append("--allow-no-checks")
start.append(f)
if f:
start.append(f)
return start


Expand Down Expand Up @@ -490,7 +491,7 @@ async def main() -> None:

try:
invocation = get_tidy_invocation(
"",
None,
clang_tidy_binary,
args.checks,
None,
Expand Down
3 changes: 3 additions & 0 deletions clang-tools-extra/docs/ReleaseNotes.rst
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,9 @@ Improvements to clang-tidy
- Fixed bug in :program:`clang-tidy` by which `HeaderFilterRegex` did not take
effect when passed via the `.clang-tidy` file.

- Fixed bug in :program:`run_clang_tidy.py` where the program would not
correctly display the checks enabled by the top-level `.clang-tidy` file.

New checks
^^^^^^^^^^

Expand Down
Loading