mirror of
https://we.phorge.it/source/arcanist.git
synced 2024-11-22 06:42:41 +01:00
Don't throw an exception if no configuration is set for linter tests
Summary: This was broken in D9641. If `$config` is not set, then a `PhutilJSONParserException` will be thrown. The expected behaviour is that it is okay to not explicitly set any configuration. Test Plan: Ran `arc unit`. Reviewers: #blessed_reviewers, epriestley Reviewed By: #blessed_reviewers, epriestley Subscribers: epriestley, Korvin Differential Revision: https://secure.phabricator.com/D9643
This commit is contained in:
parent
5ee12bbad6
commit
a428f22cbf
1 changed files with 5 additions and 1 deletions
|
@ -38,7 +38,11 @@ abstract class ArcanistLinterTestCase extends ArcanistPhutilTestCase {
|
||||||
|
|
||||||
$basename = basename($file);
|
$basename = basename($file);
|
||||||
|
|
||||||
$config = phutil_json_decode($config);
|
if ($config) {
|
||||||
|
$config = phutil_json_decode($config);
|
||||||
|
} else {
|
||||||
|
$config = array();
|
||||||
|
}
|
||||||
PhutilTypeSpec::checkMap(
|
PhutilTypeSpec::checkMap(
|
||||||
$config,
|
$config,
|
||||||
array(
|
array(
|
||||||
|
|
Loading…
Reference in a new issue