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, Jun 5, 5:03 PM
Unknown Object (File)
Apr 24 2025, 6:00 AM
Unknown Object (File)
Apr 19 2025, 6:27 PM
Unknown Object (File)
Apr 19 2025, 2:50 PM
Unknown Object (File)
Apr 16 2025, 6:35 PM
Unknown Object (File)
Apr 15 2025, 8:31 AM
Unknown Object (File)
Apr 12 2025, 11:46 AM
Unknown Object (File)
Apr 10 2025, 3:23 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