Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F14076892
D17814.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
1 KB
Referenced Files
None
Subscribers
None
D17814.diff
View Options
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
Details
Attached
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)
Attached To
Mode
D17814: Detect trailing spaces and tabs
Attached
Detach File
Event Timeline
Log In to Comment