Skip to content

fix: precision follow-up - typed Should Be Equal (C5/C7), empty STARTS: (C9), nested swallow (audit) #89

Description

@vinicq

Audit findings (2026-07-01), outside the scope of #88. Ordered by severity.

  • 1. Should Be Equal As Integers/Numbers/Strings escape C5 and C7 (P1, FN). scanner.py:954 matched exactly should be equal for self-compare (C7) and equal literals (C5). The typed variants (BuiltIn, idiomatic in Robot) are equally tautological when both sides are equal and pass silently: is_verification matches "should" so not even C2b remains. Repro: Should Be Equal As Integers ${x} ${x} -> no finding; Should Be Equal As Numbers 5 5 -> no finding. Fix: a {should be equal, ...as integers, ...as numbers, ...as strings} set before the args[0]==args[1] check. Acceptance: As Integers ${x} ${x} -> C7; As Numbers 5 5 -> C5; As Integers ${a} ${b} and As Numbers 5 6 stay clean.
  • 2. STARTS: with an empty prefix is a catch-all that is not flagged (P2, FN). scanner.py:934-936. Every string starts with "", so Run Keyword And Expect Error STARTS: Kw accepts any error (a vacuous oracle, C9's target) but is not caught. Fix: a ^STARTS:\s*$ pattern (and empty EQUALS:) in the catch-all OR. Acceptance: empty STARTS: -> C9; STARTS: connection stays clean.
  • 3. A swallow (Run Keyword And Return Status) nested inside a soft-assert reports C2b instead of C3 (P3). scanner.py:376/316 inspected only c.keyword; when the swallow sits under a wrapper (Run Keyword And Continue On Failure Run Keyword And Return Status ...), the real smell (C3 HIGH) became C2b (LOW). Low reach. Fix: unwrap one wrapper layer in _swallow_status_unused reusing the is_verification recursion.

Resolved in #92 (all three covered, no known-ceiling deferral).

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingpriority: highAlta prioridade

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions