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
F15535620: D21453.id51066.diff
Thu, Apr 24, 6:00 AM
F15518955: D21453.id51058.diff
Sat, Apr 19, 6:27 PM
F15518584: D21453.id51066.diff
Sat, Apr 19, 2:50 PM
F15510076: D21453.id.diff
Wed, Apr 16, 6:35 PM
F15506081: D21453.diff
Tue, Apr 15, 8:31 AM
F15492160: D21453.id51066.diff
Sat, Apr 12, 11:46 AM
F15485896: D21453.id51058.diff
Thu, Apr 10, 3:23 AM
F15472075: D21453.diff
Sat, Apr 5, 10:49 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