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
Unknown Object (File)
Thu, Oct 24, 7:59 AM
Unknown Object (File)
Oct 9 2024, 1:40 PM
Unknown Object (File)
Sep 30 2024, 3:56 AM
Unknown Object (File)
Sep 4 2024, 2:38 PM
Unknown Object (File)
Sep 3 2024, 4:42 AM
Unknown Object (File)
Aug 25 2024, 2:59 PM
Unknown Object (File)
Aug 17 2024, 7:49 PM
Unknown Object (File)
Aug 16 2024, 11:05 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