summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--.clang-tidy13
-rw-r--r--.clangd15
-rw-r--r--makefile12
3 files changed, 27 insertions, 13 deletions
diff --git a/.clang-tidy b/.clang-tidy
index a06e38d7..40ceb20b 100644
--- a/.clang-tidy
+++ b/.clang-tidy
@@ -1,12 +1,17 @@
---
-Checks: "clang-diagnostic-*,clang-analyzer-*,-clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling"
+Checks: >
+ clang-analyzer-*,
+ bugprone-*,
+ llvm-*,
+ performance-*,
+ concurrency-*,
+ -bugprone-reserved-identifier,
+ -llvm-header-guard
+
WarningsAsErrors: ""
HeaderFileExtensions:
- h
ImplementationFileExtensions:
- c
SystemHeaders: false
-CheckOptions:
- - key: clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling
- value: "0"
...
diff --git a/.clangd b/.clangd
new file mode 100644
index 00000000..551d2c03
--- /dev/null
+++ b/.clangd
@@ -0,0 +1,15 @@
+CompileFlags:
+ Add: [-xc]
+
+Diagnostics:
+ ClangTidy:
+ FastCheckFilter: Strict
+ Add:
+ - clang-analyzer-*
+ - bugprone-*
+ - llvm-*
+ - performance-*
+ - concurrency-*
+ Remove:
+ - bugprone-reserved-identifier
+ - llvm-header-guard
diff --git a/makefile b/makefile
index 8c85fae1..ed552e29 100644
--- a/makefile
+++ b/makefile
@@ -144,7 +144,7 @@ defconfig:
$(Q)$(MAKE) -f scripts/kconfig/makefile defconfig
include-what-you-use: compile_commands.json
- $(Q)iwyu_tool.py -p. -j$(nproc) -- -Xiwyu --update_comments -Xiwyu --transitive_includes_only -Xiwyu --no_internal_mappings | \
+ $(Q)iwyu_tool.py -p. -j4 -- -Xiwyu --update_comments -Xiwyu --transitive_includes_only -Xiwyu --no_internal_mappings | \
fix_includes.py --comments \
--quoted_includes_first \
--nosafe_headers \
@@ -152,14 +152,8 @@ include-what-you-use: compile_commands.json
--reorder
clang-tidy: compile_commands.json
- $(Q)run-clang-tidy.py \
- -p . \
- -fix \
- -fix-errors \
- -header-filter='.*' \
- -source-filter='.*\.(c|h)$$' \
- -exclude-header-filter='(scripts/|dtoa|linux|arch|bits)' \
- -j $(shell nproc)
+ $(Q)clang-tidy -header-filter=.* -p=. -fix -fix-errors $(shell find . -name '*.c' -o -name '*.h' | grep -v './scripts/\|dtoa\|linux\|arch\|bits') \
+ --export-fixes=clang-tidy-fixes.yaml
clang-format:
$(Q)clang-format -i $(shell find . -name '*.c' -o -name '*.h' | grep -v './scripts/')