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)
Sun, Jul 12, 7:50 AM
Unknown Object (File)
Thu, Jul 2, 6:57 PM
Unknown Object (File)
Tue, Jun 30, 12:58 PM
Unknown Object (File)
Jun 25 2026, 2:37 AM
Unknown Object (File)
Jun 22 2026, 4:05 AM
Unknown Object (File)
Apr 17 2026, 6:40 AM
Unknown Object (File)
Mar 30 2026, 12:52 AM
Unknown Object (File)
Mar 26 2026, 2:27 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