Support multiple severity levels for diags from a single checker
I maintainer di solito rispondono entro 1 giorno
Nessuno ha ancora preso questa issue.
Valutazione
Questa issue non è ancora stata valutata.
Descrizione
I have a checker that flags differences in parameter type declaration spelling between the prototype and definition for C functions. Some differences (for example, inconsistent use of 'const' qualifier) are purely questions of STYLE. But it can be argued that some (for example, inconsistent use of 'restrict' qualifier) have real risk, even though the difference in declaration spelling is meaningless to the compiler. So, I'd like to set the severity for some of the diagnostics differently than for the purely-STYLE findings.
As things stand, with CodeChecker settings, I don't see a way for distinct diagnostics from a single checker to have different severity levels. I think it might be possible to do something like this with regular expressions in the codechecker config, though. Perhaps, instead of
"mychecker": [ "doc_url:https://blah-blah-blah/blah-blah", "severity:STYLE" ],
we might have:
"mychecker": [ "doc_url:https://blah-blah-blah/blah-blah", "conditional-severity": [ "match-regex:.*restrict.*", "severity:LOW" ], "severity:STYLE" ],
Not sure what would make the most sense for the config parser, as this format looks like JSON at the top, but values in the JSON look like they are further broken into key/value pairs with some additional custom syntax expectations...
The only other alternative is for me to break the checker into multiple checkers with different severity levels, which costs extra runtime, and also can generate redundant diagnostics (consider a single declaration where both 'const' and 'restrict' are used inconsistently between prototype and definition, for example -- a single checker can emit one diagnostic and one fixit covering both conditions, but multiple checkers cannot). Breaking up the checker also increases code complexity and/or maintenance risk for the checker implementation.
I've had similar cases before that forced me to break checkers up into multiple checkers. Since this came up for me a second time, I thought I might ask...
- Lingua principale
- Python
- Stelle
- 2.6k
- Fork
- 494
- Merge medio
- 3g 1h
- PR unite (30g)
- 20
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
-
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 82/100
Ericsson/codechecker#5129 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 76/100
Ericsson/codechecker#5110 ·
I maintainer di solito rispondono entro 1 giorno
-
CodeChecker 6.29+ ignores locale settings and forces UTF-8Forse già presa @ump45nose l’ha presa 6 giorni fa. Apertabazel :jigsaw: bug :bug: CLI :computer: good first issue good to go :rocket: usability :+1:
Difficoltà 4/5 3-5 giorni Idoneità per principianti 35/100
Ericsson/codechecker#5121 · 2 commenti ·
I maintainer di solito rispondono entro 1 giorno
-
Upgrade psycopg versionApertagood to go :rocket:
Difficoltà 4/5 3-5 giorni Idoneità per principianti 48/100
Ericsson/codechecker#5118 ·
I maintainer di solito rispondono entro 1 giorno
-
SQLAlchemy deprecation warning in CIForse già presa @Anandb71 l’ha presa 2 giorni fa. Apertagood to go :rocket:
Difficoltà 1/5 1-3 ore Idoneità per principianti 25/100
Ericsson/codechecker#5116 ·
I maintainer di solito rispondono entro 1 giorno
Tutte le issue di Ericsson/codechecker
Issue simili
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 68/100
pyjanitor-devs/pyjanitor#1758 ·
I maintainer di solito rispondono entro 1 giorno
-
bug ready for review
Difficoltà 2/5 1-3 ore Idoneità per principianti 86/100
odysseus-dev/odysseus#6641 ·
I maintainer di solito rispondono entro 1 giorno
-
bug
Difficoltà 2/5 1-3 ore Idoneità per principianti 76/100
happypawspillaro/happypaws#78 ·
I maintainer di solito rispondono entro 4 giorni
-
pydanty:is-working
Difficoltà 2/5 1-3 ore Idoneità per principianti 82/100
pydantic/pydantic-ai#10020 ·
I maintainer di solito rispondono entro 1 giorno
-
stdlib type-bug
Difficoltà 2/5 1-3 ore Idoneità per principianti 68/100
python/cpython#159044 · 4 commenti ·
I maintainer di solito rispondono entro 1 giorno