EA1: wildcard pattern still false-positives on footnote-legend '*' and on blank lines before the colon
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 17.9k
- Forks
- 1.5k
- Avg merge
- 5d 10h
- Merged PRs (30d)
- 66
Description
Summary
Follow-up to #405 / #417. The single-line + standalone-* fix killed the markdown-bold and cross-heading false positives, but two false-positive paths remain in the EA1 wildcard pattern:
(r"(?:tools?|permissions?)\s*:[ \t]*\[?[ \t]*['\"]?\*(?!\*|\w)['\"]?[ \t]*\]?", 0.85)
Case 1: footnote/legend text still matches
The (?!\*|\w) lookahead only rejects a * followed by another * or a word character. A standalone * followed by a space passes — and documentation legitimately uses a bare * as a footnote marker after a label:
Tools: * = requires authentication
Tools: * marks optional parameters
Both match today (verified with re.IGNORECASE | re.MULTILINE, matched text Tools: * ) and fire EA1/MEDIUM on benign docs — same class of false positive as #405.
Case 2: the gap before the colon still crosses blank lines
#417 bounded the whitespace after the colon to [ \t]*, but the \s* before the colon still matches newlines. A line ending in tools/permissions followed by a blank line and a markdown definition-list line starting with : still bridges paragraphs:
several tools
: * item
Matched text: tools\n\n: * — the same cross-paragraph disease #405 reported, on the other side of the colon.
Proposed fix
- Bare (unquoted)
*should only count when it ends the line (optionally followed by]and/or a#comment): a real bare-scalar grant has nothing after the value, a footnote legend always does. Quoted forms ("*",'*') stay as-is — they are unambiguous. - Bound the pre-colon gap to the same line:
[ \t]*:instead of\s*:. No real YAML/JSON/TOML syntax puts a newline between a key and its colon.
Verified against the full single-line grant matrix (quoted, bracketed, bare, no-space, tab, CRLF, uppercase, trailing comment): no genuine form is lost.
Contributor guide
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.
Research direction
Locate the EA1 wildcard pattern and its existing single-line grant tests, then run the full grant matrix described in the issue with the footnote and blank-line cases included. Done means those benign documentation examples no longer match while quoted, bracketed, bare, no-space, tab, CRLF, uppercase, and trailing-comment grant forms still match.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- security
- Issue type
- Bug
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Active
- Clarity
- Clearly specified
- Newbie friendliness
- 86/100