1
0
mirror of https://github.com/danog/psalm.git synced 2024-11-30 04:39:00 +01:00

Fix custom config loading

This commit is contained in:
Matthew Brown 2017-01-16 11:05:29 -05:00
parent 54ccd9dfd2
commit 34c72756f4

View File

@ -111,7 +111,7 @@ if ($input_paths) {
}
}
$path_to_config = isset($options['config']) ? realpath($options['config']) : null;
$path_to_config = isset($options['c']) ? realpath($options['c']) : null;
$use_color = !array_key_exists('m', $options);
@ -123,13 +123,13 @@ $is_diff = isset($options['diff']);
$update_docblocks = isset($options['update-docblocks']);
$project_checker = new ProjectChecker($use_color, $show_info, $output_format, $debug, $update_docblocks);
// initialise custom config, if passed
if ($path_to_config) {
ProjectChecker::setConfigXML($path_to_config);
$project_checker->setConfigXML($path_to_config);
}
$project_checker = new ProjectChecker($use_color, $show_info, $output_format, $debug, $update_docblocks);
\Psalm\IssueBuffer::setStartTime(microtime(true));
if (array_key_exists('self-check', $options)) {