Page MenuHomePhabricator

D14307.diff
No OneTemporary

D14307.diff

diff --git a/src/lint/linter/ArcanistScriptAndRegexLinter.php b/src/lint/linter/ArcanistScriptAndRegexLinter.php
--- a/src/lint/linter/ArcanistScriptAndRegexLinter.php
+++ b/src/lint/linter/ArcanistScriptAndRegexLinter.php
@@ -324,7 +324,7 @@
* Get the line and character of the message from the regex match.
*
* @param dict Captured groups from regex.
- * @return pair<int,int> Line and character of the message.
+ * @return pair<int,int|null> Line and character of the message.
*
* @task parse
*/
@@ -336,8 +336,19 @@
return array($line + 1, $char + 1);
}
- $line = idx($match, 'line', 1);
+ $line = idx($match, 'line');
+ if ($line) {
+ $line = (int)$line;
+ } else {
+ $line = 1;
+ }
+
$char = idx($match, 'char');
+ if ($char) {
+ $char = (int)$char;
+ } else {
+ $char = null;
+ }
return array($line, $char);
}

File Metadata

Mime Type
text/plain
Expires
Fri, Mar 14, 7:53 AM (1 w, 3 d ago)
Storage Engine
blob
Storage Format
Encrypted (AES-256-CBC)
Storage Handle
7650936
Default Alt Text
D14307.diff (919 B)

Event Timeline