Page MenuHomePhabricator

D17814.diff
No OneTemporary

D17814.diff

diff --git a/src/lint/linter/ArcanistTextLinter.php b/src/lint/linter/ArcanistTextLinter.php
--- a/src/lint/linter/ArcanistTextLinter.php
+++ b/src/lint/linter/ArcanistTextLinter.php
@@ -245,7 +245,7 @@
$matches = null;
$preg = preg_match_all(
- '/ +$/m',
+ '/[[:blank:]]+$/m',
$data,
$matches,
PREG_OFFSET_CAPTURE);
diff --git a/src/lint/linter/__tests__/text/trailing-whitespace.lint-test b/src/lint/linter/__tests__/text/trailing-whitespace-1.lint-test
rename from src/lint/linter/__tests__/text/trailing-whitespace.lint-test
rename to src/lint/linter/__tests__/text/trailing-whitespace-1.lint-test
diff --git a/src/lint/linter/__tests__/text/trailing-whitespace-2.lint-test b/src/lint/linter/__tests__/text/trailing-whitespace-2.lint-test
new file mode 100644
--- /dev/null
+++ b/src/lint/linter/__tests__/text/trailing-whitespace-2.lint-test
@@ -0,0 +1,15 @@
+Lorem ipsum dolor sit amet,
+consectetur adipiscing elit.
+Phasellus sodales nibh erat,
+in hendrerit nulla dictum interdum.
+~~~~~~~~~~
+error:1:28
+autofix:1:28
+autofix:2:29
+autofix:3:29
+autofix:4:36
+~~~~~~~~~~
+Lorem ipsum dolor sit amet,
+consectetur adipiscing elit.
+Phasellus sodales nibh erat,
+in hendrerit nulla dictum interdum.
diff --git a/src/lint/linter/__tests__/text/trailing-whitespace-3.lint-test b/src/lint/linter/__tests__/text/trailing-whitespace-3.lint-test
new file mode 100644
--- /dev/null
+++ b/src/lint/linter/__tests__/text/trailing-whitespace-3.lint-test
@@ -0,0 +1,15 @@
+Lorem ipsum dolor sit amet,
+consectetur adipiscing elit.
+Phasellus sodales nibh erat,
+in hendrerit nulla dictum interdum.
+~~~~~~~~~~
+error:1:28
+autofix:1:28
+autofix:2:29
+autofix:3:29
+autofix:4:36
+~~~~~~~~~~
+Lorem ipsum dolor sit amet,
+consectetur adipiscing elit.
+Phasellus sodales nibh erat,
+in hendrerit nulla dictum interdum.

File Metadata

Mime Type
text/plain
Expires
Fri, Nov 22, 8:06 PM (18 h, 58 m)
Storage Engine
blob
Storage Format
Encrypted (AES-256-CBC)
Storage Handle
6775831
Default Alt Text
D17814.diff (1 KB)

Event Timeline