Changeset View
Changeset View
Standalone View
Standalone View
src/lint/engine/ArcanistLintEngine.php
Context not available. | |||||
$char_to_line = array(); | $char_to_line = array(); | ||||
$line_to_first_char = array(); | $line_to_first_char = array(); | ||||
$lines = explode("\n", $this->loadData($path)); | $lines = @explode("\n", $this->loadData($path)); | ||||
$line_number = 0; | $line_number = 0; | ||||
$line_start = 0; | $line_start = 0; | ||||
foreach ($lines as $line) { | foreach ($lines as $line) { | ||||
$len = strlen($line) + 1; // Account for "\n". | $len = @strlen($line) + 1; // Account for "\n". | ||||
$line_to_first_char[] = $line_start; | $line_to_first_char[] = $line_start; | ||||
$line_start += $len; | $line_start += $len; | ||||
for ($ii = 0; $ii < $len; $ii++) { | for ($ii = 0; $ii < $len; $ii++) { | ||||
Context not available. | |||||
ArcanistLintMessage $message) { | ArcanistLintMessage $message) { | ||||
$name = $message->getName(); | $name = $message->getName(); | ||||
if (!strlen($name)) { | if (!@strlen($name)) { | ||||
throw new Exception( | throw new Exception( | ||||
pht( | pht( | ||||
'Linter "%s" generated a lint message that is invalid because it '. | 'Linter "%s" generated a lint message that is invalid because it '. | ||||
Context not available. |
Content licensed under Creative Commons Attribution-ShareAlike 4.0 (CC-BY-SA) unless otherwise noted; code licensed under Apache 2.0 or other open source licenses. · CC BY-SA 4.0 · Apache 2.0