A rejected nested COV_JUSTIFIED_START lets its STOP close the enclosing region

Aperta Adatta ai principianti
#96 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 2 giorni

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
2/5
Tempo stimato
1-3 ore
Idoneità per principianti
73/100
Tipo di issue
Bug
Chiarezza
Specificata chiaramente
Stato di attività
Attiva
Stack tecnologico
python
Ambito
testing-qa

Direzione di ricerca

Inizia da justify.scan_file_for_markers, il punto di ingresso indicato nell’issue, e segui come gestisce gli ID sconosciuti e i marker COV_JUSTIFIED_START filtrati per piattaforma nello stack delle regioni. Usa la riproduzione nell’issue per verificare quali righe sono giustificate e quali avvisi vengono segnalati. Il lavoro è concluso quando lo STOP della regione interna rifiutata non chiude più la regione che la contiene e viene risolta la questione aperta dell’issue sull’attribuzione delle righe interne.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

bug

Found while reviewing the user manual against the implementation at fe013fe. Reproduced by calling justify.scan_file_for_markers.

A COV_JUSTIFIED_START whose id is unknown, or filtered out by the platform, is reported as a warning and is not pushed onto the region stack. Its COV_JUSTIFIED_STOP then closes the enclosing region instead. Lines inside the rejected region are credited to the outer justification, and the lines after it up to the outer STOP are not.

Reproduction
// COV_JUSTIFIED_START outer
int a;
// COV_JUSTIFIED_START nope
int b;
// COV_JUSTIFIED_STOP
int c;
// COV_JUSTIFIED_STOP

With only outer in the YAML, the scan justifies lines 2, 3 and 4 under outer and warns:

a.cpp:3: COV_JUSTIFIED_START references unknown ID 'nope'
a.cpp:7: COV_JUSTIFIED_STOP without matching START

Expected: the inner STOP closes the rejected inner region, so that outer justifies lines 2 to 6 and only the unknown id is reported. Whether the lines of the rejected inner region count under outer needs a decision; they must not be the only ones that do.

Effect

The set of justified lines depends on a marker that the tool itself rejected. The same happens when the inner justification lists another platform than the one given with --platform.

Lingua principale
Python
Stelle
0
Fork
4
Merge medio
1g 16h
PR unite (30g)
16

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

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di eclipse-score/coverage_tool

Tutte le issue di eclipse-score/coverage_tool

Issue simili

Altre issue su Python

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.