Skip to content

Commit 7d2c4a2

Browse files
committed
fix: only keep clang-format diagnostics unfiltered
1 parent 39c351b commit 7d2c4a2

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

clangd_tidy/line_filter.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -90,8 +90,8 @@ def passes_line_filter(self, file: Path, diagnostic: Diagnostic) -> bool:
9090
if first_match_filter is None:
9191
return False
9292

93-
# EXTRA: don't touch non-clang-tidy diagnostics
94-
if diagnostic.source is not None and diagnostic.source != "clang-tidy":
93+
# EXTRA: keep clang-format diagnostics unfiltered
94+
if diagnostic.source is not None and diagnostic.source == "clang-format":
9595
return True
9696
# EXTRA: filter out clang-tidy diagnostics without source and code
9797
if diagnostic.source is None and diagnostic.code is None:

test/a.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
#include <any>
2+
13
class AA {
24
public:
35
public:

0 commit comments

Comments
 (0)