Support multiple severity levels for diags from a single checker
Los mantenedores suelen responder en 1 día
Nadie ha tomado este issue todavía.
Evaluación
- Dificultad
- 5/5
- Tiempo estimado
- Más de una semana
- Aptitud para principiantes
- 8/100
Línea de trabajo
This is a design question, not a patch. The issue asks how a checker's per-checker config (the doc_url and severity entries) could assign different severities to diagnostics from one checker, based on a regex match on the message. Before any code, a maintainer needs to pick the config syntax and how it is parsed; the issue itself leaves that open. Starting point: the checker configuration and severity handling in the CodeChecker repository. Done means an agreed format and a decision on whether the feature belongs in CodeChecker at all.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
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...
- Lenguaje dominante
- Python
- Estrellas
- 2.6k
- Forks
- 494
- Merge medio
- 3 d 1 h
- PR fusionados (30 d)
- 20
Preparar el entorno
- Sin Dockerfile ni archivo de Docker Compose
- Sin plantilla de pull request
- Leer la guía de contribución
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Más de Ericsson/codechecker
-
Dificultad 1/5 Menos de una hora Aptitud para principiantes 82/100
Ericsson/codechecker#5129 ·
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 76/100
Ericsson/codechecker#5110 ·
Los mantenedores suelen responder en 1 día
-
good to go :rocket:
Dificultad 2/5 1-3 horas Aptitud para principiantes 70/100
Ericsson/codechecker#4802 ·
Los mantenedores suelen responder en 1 día
-
analyzer :chart_with_upwards_trend: CLI :computer: discussion :bulb: enhancement :star2:
Dificultad 2/5 1-3 horas Aptitud para principiantes 66/100
Ericsson/codechecker#3836 · 2 comentarios ·
Los mantenedores suelen responder en 1 día
-
CodeChecker 6.29+ ignores locale settings and forces UTF-8Posiblemente ocupada @ump45nose la tomó hace 7 días. Abiertobazel :jigsaw: bug :bug: CLI :computer: good first issue good to go :rocket: usability :+1:
Dificultad 4/5 3-5 días Aptitud para principiantes 35/100
Ericsson/codechecker#5121 · 2 comentarios ·
Los mantenedores suelen responder en 1 día
Todos los issues de Ericsson/codechecker
Issues similares
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 62/100
Los mantenedores suelen responder en 1 día
-
enhancement good first issue Stellar Wave trivial
Dificultad 2/5 1-3 horas Aptitud para principiantes 75/100
StellarCanary/ProtocolCanary-Fixtures#258 ·
Los mantenedores suelen responder en 1 día
-
enhancement
Dificultad 2/5 1-3 horas Aptitud para principiantes 70/100
IBM/ai-atlas-nexus#295 ·
Los mantenedores suelen responder en 6 días
-
github_actions
Dificultad 2/5 1-3 horas Aptitud para principiantes 65/100
Hochfrequenz/aibap.mcp#578 ·
Los mantenedores suelen responder en 1 día
-
bug
Dificultad 2/5 1-3 horas Aptitud para principiantes 75/100
mishraprafful/multihull#150 ·
Los mantenedores suelen responder en 1 día