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
F12850965: D21453.diff
Fri, Mar 29, 6:07 AM
Unknown Object (File)
Wed, Mar 27, 2:01 AM
Unknown Object (File)
Tue, Mar 12, 7:14 PM
Unknown Object (File)
Wed, Mar 6, 8:18 AM
Unknown Object (File)
Tue, Mar 5, 1:15 PM
Unknown Object (File)
Feb 9 2024, 6:37 AM
Unknown Object (File)
Jan 20 2024, 4:42 PM
Unknown Object (File)
Jan 19 2024, 12:12 AM
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