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

fix CI warnings

This commit is contained in:
kkmuffme 2023-06-13 16:59:25 +02:00
parent 2c50745d8f
commit 51fd63cfbb
6 changed files with 7 additions and 3 deletions

View File

@ -1201,7 +1201,7 @@ class Config
}
if (!isset($config_xml['findUnusedBaselineEntry'])) {
$config->config_warnings[] = '"findUnusedBaselineEntry" will be defaulted to "true" in Psalm 6.'
$config->config_warnings[] = '"findUnusedBaselineEntry" will default to "true" in Psalm 6.'
. ' You should explicitly enable or disable this setting.';
}
@ -1210,7 +1210,7 @@ class Config
$config->find_unused_code = $attribute_text === 'true' || $attribute_text === '1';
$config->find_unused_variables = $config->find_unused_code;
} else {
$config->config_warnings[] = '"findUnusedCode" will be defaulted to "true" in Psalm 6.'
$config->config_warnings[] = '"findUnusedCode" will default to "true" in Psalm 6.'
. ' You should explicitly enable or disable this setting.';
}

View File

@ -235,7 +235,7 @@ class PsalmEndToEndTest extends TestCase
$this->runPsalmInit();
$psalmXml = file_get_contents(self::$tmpDir . '/psalm.xml');
$psalmXml = preg_replace('/findUnusedCode="(true|false)"/', '', $psalmXml);
$psalmXml = preg_replace('/findUnusedCode="(true|false)"/', '', $psalmXml, 1);
file_put_contents(self::$tmpDir . '/psalm.xml', $psalmXml);
$result = $this->runPsalm(['--no-progress'], self::$tmpDir);

View File

@ -2,6 +2,7 @@
<psalm
autoloader="autoloader.php"
resolveFromConfigFile="true"
findUnusedCode="false"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns="https://getpsalm.org/schema/config"
xsi:schemaLocation="https://getpsalm.org/schema/config vendor/vimeo/psalm/config.xsd"

View File

@ -1,5 +1,6 @@
<?xml version="1.0"?>
<psalm
findUnusedCode="false"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns="https://getpsalm.org/schema/config"
xsi:schemaLocation="https://getpsalm.org/schema/config vendor/vimeo/psalm/config.xsd"

View File

@ -1,5 +1,6 @@
<?xml version="1.0"?>
<psalm
findUnusedCode="false"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns="https://getpsalm.org/schema/config"
xsi:schemaLocation="https://getpsalm.org/schema/config vendor/vimeo/psalm/config.xsd"

View File

@ -2,6 +2,7 @@
<psalm
autoloader="autoloader.php"
resolveFromConfigFile="true"
findUnusedCode="false"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns="https://getpsalm.org/schema/config"
xsi:schemaLocation="https://getpsalm.org/schema/config vendor/vimeo/psalm/config.xsd"