Cppcheck addon reports are dropped since 6.27 (regression from #4690)
I maintainer di solito rispondono entro 8 giorni
Valutazione
- Difficoltà
- 3/5
- Tempo stimato
- 1-2 giorni
- Idoneità per principianti
- 76/100
Direzione di ricerca
Start by reading CppcheckResultHandler.postprocess_result and get_analyzer_checkers(); the issue identifies the filter that drops addon reports and names docs/analyzer/checker_and_analyzer_configuration.md for the existing addon behavior. Reproduce with the provided C example and cppcheck:addons=misra.py, then inspect the raw .plist.bak output alongside parsed results. Done when addon findings appear while informational diagnostics such as normalCheckLevelMaxBranches remain filtered.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
Describe the bug
Since CodeChecker 6.27, the findings of Cppcheck addons enabled with
--analyzer-config cppcheck:addons=... (e.g. misra.py, threadsafety.py,
y2038.py, namingng.py) no longer appear in the results.
Cppcheck still reports them: they are in the raw output under
<output>/cppcheck/<hash>/*.plist.bak. But CppcheckResultHandler.postprocess_result
drops every report whose checker is not in get_analyzer_checkers()
(cppcheck --errorlist plus the label file). Addon checkers are never in that list,
so every addon report is filtered out, without a warning.
The filter came with #4690 ("Cppcheck reports from checkers only"), whose goal was to
drop informational diagnostics such as normalCheckLevelMaxBranches.
The documentation (docs/analyzer/checker_and_analyzer_configuration.md, "Specific
considerations for Cppcheck") still says: "Addon checkers can be used, but their
reports severity will be displayed as Unspecified."
CodeChecker version
- Broken: 6.27.1, 6.29.1 (the filter is also on
master). - Works: 6.26.2.
- Cppcheck 2.16.0, Python 3.9, Ubuntu 20.04.
To Reproduce
src/t.c:
int f(int a)
{
int b;
if (a) b = 1;
return b + 0x1u;
}
cc.json (with <dir> replaced by the folder that contains src/):
[{"directory": "<dir>", "command": "gcc -c src/t.c", "file": "src/t.c"}]
CodeChecker analyze cc.json --analyzers cppcheck \
--analyzer-config cppcheck:addons=misra.py -o rep
CodeChecker parse rep
Expected behaviour
As with 6.26.2:
[cppcheck-misra-c2012-8.4]
[cppcheck-misra-c2012-10.4]
[cppcheck-misra-c2012-14.4]
[cppcheck-uninitvar]
Actual behaviour
With 6.27.1 and 6.29.1 only [cppcheck-uninitvar] is reported. The raw Cppcheck
output of the same run, rep/cppcheck/<hash>/t_*.plist.bak, contains
misra-c2012-8.4, misra-c2012-10.4 and misra-c2012-14.4.
Additional context
A possible fix: filter only the informational diagnostics (such as
normalCheckLevelMaxBranches) instead of everything outside the checker list, or keep
the reports of the addons enabled with cppcheck:addons.
- Lingua principale
- Python
- Stelle
- 2.6k
- Fork
- 494
- Merge medio
- 9g 2h
- PR unite (30g)
- 23
Preparare l'ambiente
- Nessun Dockerfile né file Docker Compose
- Nessun modello di pull request
- Leggi la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di Ericsson/codechecker
-
infer analyzer does not work with --jobsForse già presa @pcbeingused333 l’ha presa 7 giorni fa. Apertagood to go :rocket:
Difficoltà 2/5 1-3 ore Idoneità per principianti 76/100
Ericsson/codechecker#5110 ·
I maintainer di solito rispondono entro 8 giorni
-
Bug Report: diagtool not found on WindowsForse già presa @pujitha24 l’ha presa 18 giorni fa. Apertagood to go :rocket:
Difficoltà 2/5 1-3 ore Idoneità per principianti 70/100
Ericsson/codechecker#4802 ·
I maintainer di solito rispondono entro 8 giorni
-
analyzer :chart_with_upwards_trend: CLI :computer: discussion :bulb: enhancement :star2:
Difficoltà 2/5 1-3 ore Idoneità per principianti 66/100
Ericsson/codechecker#3836 · 2 commenti ·
I maintainer di solito rispondono entro 8 giorni
-
Difficoltà 4/5 3-5 giorni Idoneità per principianti 48/100
Ericsson/codechecker#5165 ·
I maintainer di solito rispondono entro 8 giorni
-
Add --use-path-prefix parameter to CodeChecker store/parse/diff [bazel]Forse già presa @furtib l’ha presa 19 giorni fa. Apertabazel :jigsaw: new feature :+1:
Ericsson/codechecker#5150 · 1 assegnatario ·
I maintainer di solito rispondono entro 8 giorni
Tutte le issue di Ericsson/codechecker
Issue simili
-
bug ready-for-dev
Difficoltà 1/5 1-3 ore Idoneità per principianti 92/100
OpenHands/extensions#897 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
tensorflow/datasets#11253 ·
I maintainer di solito rispondono entro 1 giorno
-
fix(core): a config section with all keys commented out crashes startupForse già presa @Aryanbhargava18 l’ha presa oggi. Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 75/100
kubeflow/mcp-server#512 ·
I maintainer di solito rispondono entro 1 giorno
-
Stop trusting the compromised eMudhra CA certificatesForse già presa @anth-volk l’ha presa oggi. Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 82/100
PolicyEngine/uk-triple-lock#54 ·
I maintainer di solito rispondono entro 1 giorno
-
DBFS append mode silently overwrites existing filesForse già presa @IlyaKhalafi l’ha presa oggi. Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 77/100
fsspec/filesystem_spec#2429 ·
I maintainer di solito rispondono entro 1 giorno