Page MenuHomePhabricator

Fix a false negative in lint for "xsprintf()"-family functions
ClosedPublic

Authored by epriestley on Sep 5 2020, 12:07 AM.
Tags
None
Referenced Files
F14941051: D21453.id51066.diff
Sat, Feb 15, 5:06 PM
Unknown Object (File)
Sat, Feb 1, 10:51 AM
Unknown Object (File)
Mon, Jan 27, 3:30 AM
Unknown Object (File)
Tue, Jan 21, 9:52 AM
Unknown Object (File)
Sun, Jan 19, 10:24 PM
Unknown Object (File)
Sun, Jan 19, 5:41 PM
Unknown Object (File)
Jan 2 2025, 8:06 PM
Unknown Object (File)
Dec 31 2024, 8:22 PM
Subscribers
None

Details

Summary

Ref T13577. This lint rule correctly detects the error in pht('x %s y') but the narrow test for n_STRING_SCALAR prevents it from detecting the error in pht('x %s y'.'z').

Make the test broader.

Test Plan
  • Ran arc lint on HTTPSFuture.php, got a detection of the issue in T13577.
  • Added a failing test and made it pass.

Diff Detail

Repository
rARC Arcanist
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline