Skip to content

Commit

Permalink
When linting php files, always check for syntax errors
Browse files Browse the repository at this point in the history
  • Loading branch information
svemir committed Jan 12, 2017
1 parent 142df5b commit a8d1c47
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/lint/engine/symp/SympArcanistLintEngine.php
Expand Up @@ -5,11 +5,13 @@ class SympArcanistLintEngine extends ArcanistLintEngine {
public function buildLinters() {
$paths = $this->getPaths();
$project = $this->getWorkingCopy();
$php_syntax_linter = new ArcanistPhpLinter();
$php_linter = new ArcanistPhpcsLinter();
$php_linter->setBinary($project->getProjectConfig('lint.phpcs.bin'));
$php_linter->setLinterConfigurationValue('phpcs.standard', $project->getProjectConfig('lint.phpcs.standard'));
$linters = array(
$php_linter
$php_linter,
$php_syntax_linter
);
if ($project->getProjectConfig('lint.jshint.config')) {
$js_linter = new ArcanistJSHintLinter();
Expand All @@ -29,6 +31,7 @@ public function buildLinters() {
// specs are checked by the git hook, so until we can ignore PSR-1 skip them
$linter = $php_linter;
}
$php_syntax_linter->addPath($path);
} elseif (isset($css_linter) && preg_match('/\.css$/', $path)) {
$linter = $css_linter;
} elseif (isset($js_linter) && preg_match('/\.js$/', $path)) {
Expand Down

0 comments on commit a8d1c47

Please sign in to comment.