Justification YAML validation accepts locations without lines and boolean integers
Maintainers usually reply within 2 days
Nobody has claimed this yet.
Assessment
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Newbie friendliness
- 74/100
- Issue type
- Bug
- Clarity
- Clearly specified
- Activity status
- Active
- Tech stack
- python
- Domain
- testing-qa, tooling
Research direction
Start with score_coverage/justify.py, especially validate_yaml and resolve_location_lines, then inspect the validation tests for justification YAML. Check how locations without line selectors and boolean values are handled, and whether validation continues after a missing or invalid id. Done means malformed examples are rejected and all findings for an entry are reported.
Written by the indexing model from the issue text.
Description
Found while reviewing the user manual against the implementation at fe013fe (score_coverage/justify.py).
The justification YAML is validated before it is applied, but some malformed input passes:
- A location without any line selector, or with only
line_startor onlyline_end, is accepted.resolve_location_linesreturns no lines for it, so the entry silently justifies nothing. version: trueis accepted, becauseboolis anintin Python. The same holds for boolean values ofline,line_start,line_endand inlines.- An entry without
id, or with a non-stringid, reports only that finding; its other fields are not checked.
Reproduction
version: true
justifications:
- id: a-b
category: other
platforms: [linux]
reason: x
locations:
- file: a.cpp
line_start: 3
justify.validate_yaml accepts this document. resolve_location_lines({'file': 'a.cpp', 'line_start': 3}) returns [].
Expected behavior
Reject a location that does not select at least one line, reject booleans where an integer is required, and report all findings of an entry.
- Dominant language
- Python
- Stars
- 0
- Forks
- 4
- Avg merge
- 1d 16h
- Merged PRs (30d)
- 16
Getting set up
This project ships no dev container, Dockerfile or contributing guide, so setting up is up to you: start from its README, and see our first-contribution guide for the general steps.
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from eclipse-score/coverage_tool
-
enhancement
Difficulty 2/5 1-3 hours Newbie friendliness 70/100
eclipse-score/coverage_tool#101 ·
Maintainers usually reply within 2 days
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
eclipse-score/coverage_tool#98 ·
Maintainers usually reply within 2 days
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 73/100
eclipse-score/coverage_tool#96 ·
Maintainers usually reply within 2 days
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
eclipse-score/coverage_tool#95 ·
Maintainers usually reply within 2 days
-
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
eclipse-score/coverage_tool#27 ·
Maintainers usually reply within 2 days
All issues in eclipse-score/coverage_tool
Similar issues
-
accepted
Difficulty 2/5 1-3 hours Newbie friendliness 66/100
future-agi/future-agi#5908 ·
Maintainers usually reply within 1 day
-
Placeholder export disables HTML image input for picture descriptionPossibly taken @cloudiful claimed this today. Open
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
docling-project/docling-serve#817 ·
Maintainers usually reply within 1 day
-
Difficulty 1/5 Under an hour Newbie friendliness 92/100
Techiebutler/freeframe#687 ·
Maintainers usually reply within 1 day
-
Parse truncated verbose GC logs up to the first XML errorPossibly taken A pull request linked to this issue is open or already merged. Openbug verbose GC
Difficulty 2/5 1-3 hours Newbie friendliness 74/100
IBM/javacore-analyser#677 ·
Maintainers usually reply within 1 day
-
Image publishing fails for annotated release tags (v0.2.3 never published)Possibly taken @zgypa-agent claimed this today. Open
Difficulty 2/5 1-3 hours Newbie friendliness 77/100
bolton-brush/BFD9000#119 ·