mirror of
https://we.phorge.it/source/arcanist.git
synced 2024-12-23 22:10:54 +01:00
Trigger bad charset lint warning only once per line
Summary: Makes lots of noise: {F22758} Test Plan: Linted file with several bad characters per line. Linted file with one bad character per line. Reviewers: epriestley Reviewed By: epriestley CC: aran, Korvin Differential Revision: https://secure.phabricator.com/D3896
This commit is contained in:
parent
0938091a99
commit
d53dcbe952
1 changed files with 2 additions and 1 deletions
|
@ -136,8 +136,9 @@ final class ArcanistTextLinter extends ArcanistLinter {
|
|||
$data = $this->getData($path);
|
||||
|
||||
$matches = null;
|
||||
$bad = '[^\x09\x0A\x20-\x7E]';
|
||||
$preg = preg_match_all(
|
||||
'/[^\x09\x0A\x20-\x7E]+/',
|
||||
"/{$bad}(.*{$bad})?/",
|
||||
$data,
|
||||
$matches,
|
||||
PREG_OFFSET_CAPTURE);
|
||||
|
|
Loading…
Reference in a new issue