Skip to content

Commit debf19a

Browse files
committed
Style: Add .clangd config
1 parent 75ce426 commit debf19a

File tree

2 files changed

+32
-1
lines changed

2 files changed

+32
-1
lines changed

.clangd

+31
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
# https://clangd.llvm.org/config
2+
---
3+
# Default conditions, apply everywhere.
4+
5+
Diagnostics:
6+
Includes:
7+
IgnoreHeader:
8+
- core/typedefs\.h # Our "main" header, featuring transitive includes; allow everywhere.
9+
- \.compat\.inc
10+
---
11+
# Header-specific conditions.
12+
13+
If:
14+
PathMatch: .*\.(h|hh|hpp|hxx|inc)
15+
16+
# Exclude certain, noisy warnings that lack full context. Replace with lowered severity if/when
17+
# clangd gets diagnostic severity support. (See: https://github.com/clangd/clangd/issues/1937)
18+
CompileFlags:
19+
Add:
20+
- -Wno-unneeded-internal-declaration
21+
- -Wno-unused-const-variable
22+
- -Wno-unused-function
23+
- -Wno-unused-variable
24+
---
25+
# Suppress all third-party warnings.
26+
27+
If:
28+
PathMatch: thirdparty/.*
29+
30+
Diagnostics:
31+
Suppress: "*"

.editorconfig

+1-1
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ indent_style = space
1818
indent_size = 4
1919

2020
# YAML requires indentation with spaces instead of tabs.
21-
[*.{yml,yaml}]
21+
[{*.{yml,yaml},.clang{-format,-tidy,d}}]
2222
indent_style = space
2323
indent_size = 2
2424

0 commit comments

Comments
 (0)