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
F18719537: D21453.diff
Mon, Sep 29, 5:19 PM
F18704840: D21453.diff
Sun, Sep 28, 9:02 AM
F18704831: D21453.diff
Sun, Sep 28, 9:01 AM
F18704812: D21453.diff
Sun, Sep 28, 8:57 AM
F18704787: D21453.diff
Sun, Sep 28, 8:51 AM
F18704786: D21453.diff
Sun, Sep 28, 8:51 AM
F18680282: D21453.diff
Fri, Sep 26, 2:29 AM
F18679505: D21453.id51058.diff
Fri, Sep 26, 12:53 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