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
F22663173: D21453.id51058.diff
Thu, Oct 1, 11:10 AM
Unknown Object (File)
Aug 18 2026, 10:29 PM
Unknown Object (File)
Aug 1 2026, 7:16 PM
Unknown Object (File)
Jul 31 2026, 4:08 PM
Unknown Object (File)
Jul 12 2026, 7:50 AM
Unknown Object (File)
Jul 2 2026, 6:57 PM
Unknown Object (File)
Jun 30 2026, 12:58 PM
Unknown Object (File)
Jun 25 2026, 2:37 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