SONARPHP-1925 S1313: Fix FPs on test files and with almost-IPv4 strings - #1802
Conversation
lijun-chen-sonarsource
left a comment
There was a problem hiding this comment.
LGTM!
Just left a small question.
de4b510 to
3a43b63
Compare
Code Review ✅ Approved 3 resolved / 3 findingsFixes false positives in S1313 (hardcoded IP addresses) by excluding test files and refining regex patterns. Parameterized suppression test message and S1313 ruling expectations were corrected, and the IPv6 regex was simplified. No issues remain. ✅ 3 resolved✅ Quality: Parameterized suppression test hardcodes S6418 in its message
✅ Bug: Ruling expectations for S1313 still list issues under test/
✅ Quality: IPv6 lookahead edit is a no-op and misses the trailing dot
Implementation Status ✅ 2 of 2 objectives covered✅ SONARPHP-1925 - 2 of 2 objectives coveredThis PR covers both objectives by preventing S1313 from being raised on test files and refining the regular expressions to avoid false positives on almost-IPv4 strings. ✅ 2 covered here
OptionsAuto-apply is off → Gitar will not commit updates to this branch. Comment with these commands to change the behavior for this request:
Was this helpful? React with 👍 / 👎 | Gitar |
|




Additionally, simplify the
IP_V6regex (NFC).Summary by Gitar
IPv4CheckThis will update automatically on new commits.