| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748 |
- # clangd now reads a REAL native build: build-host/compile_commands.json, which
- # covers src/, tests/ and runner/ including runner/src/main.cpp. Generate it
- # with scripts/host-build.sh.
- CompileFlags:
- CompilationDatabase: build-host
- Add:
- # clangd defaults to its own driver; the build uses clang++ 21, and these
- # keep the diagnostics the compiler would actually give.
- - -Wall
- - -Wextra
- Remove:
- # Emitted by the generated protos' build flags and meaningless to the
- # indexer, which parses rather than codegens.
- - -fno-canonical-system-headers
- Diagnostics:
- UnusedIncludes: Strict
- MissingIncludes: Strict
- ClangTidy:
- # Narrow on purpose. The checks here are the ones that catch real bugs in
- # this codebase; the broad modernize/readability families would bury them
- # under thousands of style notes on 20k lines of existing code.
- Add:
- - bugprone-*
- - cert-*
- - clang-analyzer-*
- - misc-*
- - performance-*
- Remove:
- # Handlers legitimately take JSON by value and move it onward.
- - performance-unnecessary-value-param
- # Fires on every GoogleTest macro.
- - misc-use-anonymous-namespace
- # Our ApiError-throwing handlers are not noexcept candidates.
- - bugprone-exception-escape
- # std::rand is not used for anything security-relevant in tests.
- - cert-msc30-c
- - cert-msc50-cpp
- # Deliberate: see the include-what-you-use note above.
- - misc-include-cleaner
- InlayHints:
- Enabled: true
- ParameterNames: true
- DeducedTypes: true
- Hover:
- ShowAKA: true
|