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
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
F15447915: D21453.id51066.diff
Fri, Mar 28, 2:25 AM
F15386217: D21453.diff
Mar 15 2025, 12:11 AM
F15345038: D21453.id51066.diff
Mar 10 2025, 8:16 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