Empty output when calculating metrics for this function in C
I maintainer di solito rispondono entro 1 giorno
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 4/5
- Tempo stimato
- 3-5 giorni
- Idoneità per principianti
- 35/100
Direzione di ricerca
Start with the C parser and metric extraction paths in rust-code-analysis; the issue does not name specific files or tests. Run the provided rust-code-analysis-cli command on the reproducer and inspect how the parser's ERROR nodes affect function metric collection. Done means the function produces metrics for this input, with a regression test covering the case.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
Description
I attempted to extract code metrics from a certain function, but the output turned out to be empty. I discovered that there are multiple nodes labeled as ERROR in AST. Is it caused by this?
Steps to reproduce
The command I tried
$ rust-code-analysis-cli --paths foo.c -m
The code
static YYACTIONTYPE
yy_find_shift_action(YYCODETYPE iLookAhead, /* The look-ahead token */
YYACTIONTYPE stateno /* Current state number */
) {
int i;
if (stateno > YY_MAX_SHIFT)
return stateno;
assert(stateno <= YY_SHIFT_COUNT);
#if defined(YYCOVERAGE)
yycoverage[stateno][iLookAhead] = 1;
#endif
do {
i = yy_shift_ofst[stateno];
assert(i >= 0);
/* assert( i+YYNTOKEN<=(int)YY_NLOOKAHEAD ); */
assert(iLookAhead != YYNOCODE);
assert(iLookAhead < YYNTOKEN);
i += iLookAhead;
if (i >= YY_NLOOKAHEAD || yy_lookahead[i] != iLookAhead) {
#ifdef YYFALLBACK
YYCODETYPE iFallback; /* Fallback token */
if (iLookAhead < sizeof(yyFallback) / sizeof(yyFallback[0]) &&
(iFallback = yyFallback[iLookAhead]) != 0) {
#ifndef NDEBUG
if (yyTraceFILE) {
fprintf(yyTraceFILE, "%sFALLBACK %s => %s\n", yyTracePrompt,
yyTokenName[iLookAhead], yyTokenName[iFallback]);
}
#endif
assert(yyFallback[iFallback] == 0); /* Fallback loop must terminate */
iLookAhead = iFallback;
continue;
}
#endif
#ifdef YYWILDCARD
{
int j = i - iLookAhead + YYWILDCARD;
if (
#if YY_SHIFT_MIN + YYWILDCARD < 0
j >= 0 &&
#endif
#if YY_SHIFT_MAX + YYWILDCARD >= YY_ACTTAB_COUNT
j < YY_ACTTAB_COUNT &&
#endif
j < (int)(sizeof(yy_lookahead) / sizeof(yy_lookahead[0])) &&
yy_lookahead[j] == YYWILDCARD && iLookAhead > 0) {
#ifndef NDEBUG
if (yyTraceFILE) {
fprintf(yyTraceFILE, "%sWILDCARD %s => %s\n", yyTracePrompt,
yyTokenName[iLookAhead], yyTokenName[YYWILDCARD]);
}
#endif /* NDEBUG */
return yy_action[j];
}
}
#endif /* YYWILDCARD */
return yy_default[stateno];
} else {
return yy_action[i];
}
} while (1);
}
- Lingua principale
- Rust
- Stelle
- 469
- Fork
- 74
- Merge medio
- 17h 16m
- PR unite (30g)
- 10
Preparare l'ambiente
Questo progetto non fornisce container di sviluppo, Dockerfile né guida per i contributori, quindi l'ambiente è a tuo carico: parti dal suo README e consulta la nostra guida al primo contributo per i passaggi generali.
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 mozilla/rust-code-analysis
-
mozcpp: refresh the list of Mozilla annotation macrosForse già presa Una pull request collegata a questa issue è aperta o già unita. Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 80/100
mozilla/rust-code-analysis#1267 ·
I maintainer di solito rispondono entro 1 giorno
-
mozcpp: parse a string literal followed by a PRI*/SCN* format macroForse già presa @marco-c l’ha presa 2 giorni fa. Aperta
Difficoltà 4/5 3-5 giorni Idoneità per principianti 15/100
mozilla/rust-code-analysis#1266 ·
I maintainer di solito rispondono entro 1 giorno
-
Grammar check tasks compare unrelated files and skip most of the othersForse di nuovo libera Una pull request per questa issue è stata chiusa senza essere unita. Aperta
Difficoltà 3/5 1-2 giorni Idoneità per principianti 45/100
mozilla/rust-code-analysis#1261 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 4/5 3-5 giorni Idoneità per principianti 48/100
mozilla/rust-code-analysis#1250 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 4/5 3-5 giorni Idoneità per principianti 48/100
mozilla/rust-code-analysis#1249 ·
I maintainer di solito rispondono entro 1 giorno
Tutte le issue di mozilla/rust-code-analysis
Issue simili
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 82/100
ubugeeei-prod/vize#13586 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 62/100
storytold/photocraft#16565 ·
I maintainer di solito rispondono entro 1 giorno
-
flaky needs-triage
Difficoltà 2/5 1-3 ore Idoneità per principianti 66/100
bherbruck/solvecraft#21315 ·
-
bug
Difficoltà 2/5 1-3 ore Idoneità per principianti 75/100
undergroundrap/hatchling#624 ·
I maintainer di solito rispondono entro 1 giorno
-
node:url: url.parse and url.resolve report name parse/resolve instead of Node's urlParse/urlResolveApertaarea:stdlib effort:S impact:low parity type:bug
Difficoltà 2/5 1-3 ore Idoneità per principianti 82/100
I maintainer di solito rispondono entro 1 giorno