diff --git a/arcanist/linter/ShellLocaleLinter.php b/arcanist/linter/ShellLocaleLinter.php --- a/arcanist/linter/ShellLocaleLinter.php +++ b/arcanist/linter/ShellLocaleLinter.php @@ -1,19 +1,20 @@ pht('`'.self::LOCALE_STATEMENT.'` should be '. - 'the first statement.'), + self::INVALID_LOCALE => pht( + '`'.join('` or `', self::LOCALE_STATEMENTS).'` should be '. + 'the first statement.'), ); } @@ -46,7 +48,8 @@ 'have only comments and/or empty lines.', $path)); } - if (!(trim($matches[0][0]) === self::LOCALE_STATEMENT)) { + if (array_search(trim($matches[0][0]), + self::LOCALE_STATEMENTS, true) === false) { return $this->raiseLintAtPath( self::INVALID_LOCALE, pht('Shell scripts should set the locale to avoid side effects.')