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
F18829059: D21453.id.diff
Fri, Oct 24, 7:33 PM
F18822977: D21453.diff
Thu, Oct 23, 9:38 AM
F18803744: D21453.diff
Sat, Oct 18, 3:25 AM
F18719537: D21453.diff
Sep 29 2025, 5:19 PM
F18704840: D21453.diff
Sep 28 2025, 9:02 AM
F18704831: D21453.diff
Sep 28 2025, 9:01 AM
F18704812: D21453.diff
Sep 28 2025, 8:57 AM
F18704787: D21453.diff
Sep 28 2025, 8:51 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