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
F15447915: D21453.id51066.diff
Fri, Mar 28, 2:25 AM
F15386217: D21453.diff
Sat, Mar 15, 12:11 AM
F15345038: D21453.id51066.diff
Mon, Mar 10, 8:16 AM
F15308498: D21453.id51066.diff
Thu, Mar 6, 6:21 AM
F15302708: D21453.id.diff
Mar 5 2025, 8:18 PM
F15291678: D21453.id51058.diff
Mar 5 2025, 1:03 AM
Unknown Object (File)
Mar 3 2025, 8:33 PM
Unknown Object (File)
Feb 15 2025, 5:06 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