yams/.clangd
Trevon 577adf1e0f
build: standardize the Debug build dir on build/debug (#248)
* build: standardize the Debug build dir on build/debug

`docs/BUILD.md` and `AGENTS.md` document `./setup.sh Debug` producing
`build/debug`, but `setup.sh`/`setup.ps1` created `builddir` and `.clangd`
pointed there too, so the documented layout and the actual tree disagreed.

Align the Debug mapping with the documented layout:
- setup.sh / setup.ps1: Debug -> `build/debug`
- CMakeLists.txt: Debug `_meson_build_dir` -> `build/debug`
- .clangd: CompilationDatabase -> `build/debug`
- plugin test fallbacks, S3 smoke default, quality-gate candidate list, and
  doc examples -> `build/debug`

Legacy `builddir` trees stay readable: the quality gate and local-ci scripts
still probe `builddir` as a fallback, and `plugin_trust` already treats
`/build/` paths as build artifacts.

* build: migrate remaining Debug consumers off builddir

Follow-up to the Debug build-dir standardization: tracked consumers still
hardcoded `builddir` and would break or silently skip against a fresh
`build/debug` tree. Migrate them, keeping tolerant fallbacks where a legacy
tree may still exist.

- CI: `.github/workflows/tests.yml` runs `./setup.sh Debug` and then compiled
  `-C builddir`; switch BUILD_DIR/COMPILE_DB_DIR/compile paths to `build/debug`.
  Same for windows-test-diagnose.yml.
- IDE: `.vscode/tasks.json` build/test/bench tasks target `build/debug`.
- Runtime: `object_storage_plugin_loader` also probes `build/debug/plugins`
  (and the flat `build/debug`), retaining the `builddir` fallbacks.
- Tests/docs: ONNX tuning integration plugin dir, benchmarks, and plugin
  READMEs/examples use `build/debug`.

`./build/*` is already excluded from the quality-gate find and `.dockerignore`,
so no exclusion lists change.
2026-10-01 08:45:20 -06:00

144 lines
3.2 KiB
YAML

# YAMS clangd configuration - Performance optimized
# See https://clangd.llvm.org/config for full documentation
# Default settings for all files
CompileFlags:
# Point to the meson build directory
CompilationDatabase: build/debug
# Remove flags that slow down clangd analysis
Remove:
# Sanitizers add overhead and aren't needed for IDE features
- -fsanitize=*
- -fno-sanitize-recover=*
# Coverage instrumentation not needed
- -fprofile-*
- -fcoverage-*
# Debug info levels don't affect clangd
- -g*
# Link-time optimization flags (irrelevant for parsing)
- -flto*
# Warnings are handled separately by clangd
- -Werror
# Plugin flags that may not be available
- -fplugin=*
Index:
# Enable background indexing for better go-to-definition
Background: Build
# Index standard library for better completions
StandardLibrary: Yes
Diagnostics:
# Enable unused include detection
UnusedIncludes: Strict
# Disable missing includes (can be noisy during development)
MissingIncludes: None
ClangTidy:
# Only run fast checks for better performance
FastCheckFilter: Strict
# Enable useful checks
Add:
- bugprone-*
- modernize-*
- performance-*
- readability-identifier-naming
# Refactoring assistance: identify complex/duplicate code
- readability-function-size
- readability-function-cognitive-complexity
- readability-redundant-*
- misc-redundant-expression
# Remove slow or noisy checks
Remove:
- bugprone-easily-swappable-parameters
- modernize-use-trailing-return-type
- modernize-avoid-c-arrays
CheckOptions:
# Flag functions over 100 lines or 20 statements
readability-function-size.LineThreshold: 100
readability-function-size.StatementThreshold: 100
# Flag cognitive complexity over 25
readability-function-cognitive-complexity.Threshold: 25
Completion:
AllScopes: Yes
# Faster argument completion
ArgumentLists: Delimiters
InlayHints:
# Enable helpful hints but limit type name length for performance
Enabled: true
ParameterNames: true
DeducedTypes: true
Designators: true
BlockEnd: false
TypeNameLimit: 32
Hover:
ShowAKA: true
MacroContentsLimit: 1024
---
# Disable heavy processing for third-party code
If:
PathMatch: third_party/.*
Index:
Background: Skip
Diagnostics:
Suppress: '*'
UnusedIncludes: None
---
# BUT enable symspell (our own code in third_party)
If:
PathMatch: third_party/symspell/.*
Index:
Background: Build
Diagnostics:
Suppress: []
UnusedIncludes: Strict
---
# Skip background indexing for external submodules
If:
PathMatch: external/.*
Index:
Background: Skip
Diagnostics:
Suppress: '*'
UnusedIncludes: None
---
# Skip build directories
If:
PathMatch: build.*/.*
Index:
Background: Skip
---
# Skip Conan package cache (if symlinked)
If:
PathMatch: .*/\.conan2?/.*
Index:
Background: Skip
Diagnostics:
Suppress: '*'
---
# Test files - enable all diagnostics
If:
PathMatch: tests/.*
Diagnostics:
ClangTidy:
Add:
- cert-*
---
# Header files - additional style checks
If:
PathMatch: include/.*\.h(pp)?
Diagnostics:
ClangTidy:
Add:
- readability-*
Remove:
- readability-magic-numbers