diff options
| author | Ha Thach <[email protected]> | 2026-06-11 23:19:17 +0700 |
|---|---|---|
| committer | GitHub <[email protected]> | 2026-06-11 23:19:17 +0700 |
| commit | 5014146fef1aac07362ee35c0c361b8475f7636d (patch) | |
| tree | 880ae25885c649108a044d185a3b2166d9284079 /AGENTS.md | |
| parent | 848216a6a278f98ba5b977219adac5eabb07e0c4 (diff) | |
| parent | dd31ba4530f1904b0d2d83fa6b008502354fb400 (diff) | |
Merge pull request #3695 from hathach/claude/adoring-pasteur-kbaFa
Add pvs skill to run PVS-Studio analysis for a board
Diffstat (limited to 'AGENTS.md')
| -rw-r--r-- | AGENTS.md | 19 |
1 files changed, 13 insertions, 6 deletions
@@ -153,28 +153,35 @@ Reports land in `cmake-metrics/<board>/metrics_compare.md` (per-board) and `cmak ## Static Analysis (PVS-Studio) -Requires `compile_commands.json` (CMake `-DCMAKE_EXPORT_COMPILE_COMMANDS=ON`). +Requires `compile_commands.json`, which the examples build exports by default +(`hw/bsp/family_support.cmake` sets `CMAKE_EXPORT_COMPILE_COMMANDS ON`). The +`pvs` skill (`.claude/skills/pvs/SKILL.md`) wraps the build + analyze flow for a +board; the commands below are the underlying steps. ```bash # Whole project: pvs-studio-analyzer analyze \ -f examples/cmake-build-raspberry_pi_pico/compile_commands.json \ -R .PVS-Studio/.pvsconfig \ - -o pvs-report.log -j12 --dump-files \ + -o pvs-report.log -j12 \ + --security-related-issues \ --misra-c-version 2023 --misra-cpp-version 2008 --use-old-parser -# Specific files (add one or more `-S <file>`): +# Specific files: -S takes a plaintext list (one path per line), not paths directly: +printf 'src/foo.c\nsrc/bar.c\n' > files.txt pvs-studio-analyzer analyze \ -f examples/cmake-build-raspberry_pi_pico/compile_commands.json \ -R .PVS-Studio/.pvsconfig \ - -S src/foo.c -S src/bar.c \ - -o pvs-report.log -j12 --dump-files \ + -S files.txt \ + -o pvs-report.log -j12 \ + --security-related-issues \ --misra-c-version 2023 --misra-cpp-version 2008 --use-old-parser plog-converter -a GA:1,2 -t errorfile pvs-report.log # view results ``` -Takes ~10-30 s. +Takes ~10-30 s. (`--dump-files` adds preprocessed `.PVS-Studio.i/.cfg` dumps next +to every source for false-positive debugging — omit it for normal runs.) ## Validation After Changes |
