You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
test(ansible): the retired slm_port detector has no contrast pair and treats comments as uses #22095
repo_tests/slm_backend_port_one_name_test.py::test_slm_port_is_gone (from #20600) checks every ansible .yml/.yaml/.j2 file with the raw regex \bslm_port\b. Two gaps:
No contrast pair. Nothing proves that the detector trips on a live slm_port reference and stays quiet on slm_backend_port. A broken regex, or a scan that reads zero files, would pass green. The reach declaration bounds the file count but says nothing about matching.
Comments count as uses. The regex runs over raw text, so a YAML # comment or a Jinja {# #} comment that mentions the retired name fails the test. This is conservative, but it reports a comment as a live reference.
Raised during review of #20464 (CodeRabbit). It is outside that PR's diff, so it is filed here instead of being patched there.
Acceptance criteria
The detector is a named function, and the sweep and the fixtures both use it.
A contrast pair: a fixture with a live slm_port reference trips the detector, and one with only slm_backend_port does not.
The detector ignores YAML # comments and Jinja {# … #} comments, using the shared comment stripper tools.lint._comment_syntax.code_text or an equivalent. A fixture proves that a comment-only mention does not trip it.
Activity