mirror of
https://github.com/Combodo/iTop.git
synced 2026-02-12 23:14:18 +01:00
N°6644 - PHP Static Analysis: Update configuration to:
- Ignore compiled folders other than "env-production" - Ignore Lempar.php as its content isn't valid PHP and it won't be included in the baseline
This commit is contained in:
@@ -5,8 +5,8 @@ includes:
|
|||||||
|
|
||||||
parameters:
|
parameters:
|
||||||
level: 0
|
level: 0
|
||||||
#phpVersion: null # Explicitly commented as we rather use the detected version from the above include (`php-includes/target-php-version.php`)
|
#phpVersion: null # Explicitly commented as we rather use the detected version from the above include (`php-includes/target-php-version.php`)
|
||||||
editorUrl: 'phpstorm://open?file=%%file%%&line=%%line%%' # Open in PHPStorm asit is Combodo's default IDE
|
editorUrl: 'phpstorm://open?file=%%file%%&line=%%line%%' # Open in PHPStorm as it's Combodo's default IDE
|
||||||
bootstrapFiles:
|
bootstrapFiles:
|
||||||
- ../../../approot.inc.php
|
- ../../../approot.inc.php
|
||||||
- ../../../bootstrap.inc.php
|
- ../../../bootstrap.inc.php
|
||||||
@@ -22,11 +22,19 @@ parameters:
|
|||||||
- ../../../lib # Irrelevant as we only want to analyze our codebase
|
- ../../../lib # Irrelevant as we only want to analyze our codebase
|
||||||
- ../../../node_modules # Irrelevant as we only want to analyze our codebase
|
- ../../../node_modules # Irrelevant as we only want to analyze our codebase
|
||||||
analyseAndScan:
|
analyseAndScan:
|
||||||
#- ../../../data # Left and commented on purpose to show that we want to analyse the generated cache files
|
# This file generates "unignorable errors" for the baseline due to its format, so we don't have any other choice than to exclude it.
|
||||||
# Note 1: We can analyse these folders as if a PHP file requires another PHP element declared in an XML file, it won't find it. So we rely only on `env-production`
|
# But mind that it will prevent PHPStan from warning us about PHP syntax errors in this file.
|
||||||
|
- ../../../core/oql/build/PHP/Lempar.php
|
||||||
|
|
||||||
|
#- ../../../data # Left and commented on purpose to show that we want to analyse the generated cache files
|
||||||
|
|
||||||
|
# Note 1: We can't analyse these folders as if a PHP file requires another PHP element declared in an XML file, it won't find it. So we rely only on `env-production`
|
||||||
# Note 2: Only the options selected during the setup will be analysed correctly in `env-production`. For unselected options, we still want to ignore them during the analysis as they would only give a false sentiment of security as their XML PHP classes / snippets / etc would not be tested.
|
# Note 2: Only the options selected during the setup will be analysed correctly in `env-production`. For unselected options, we still want to ignore them during the analysis as they would only give a false sentiment of security as their XML PHP classes / snippets / etc would not be tested.
|
||||||
- ../../../data/production-modules # Irrelevent as it will already be in `env-production` (for local run only, not useful in the CI)
|
- ../../../data/production-modules # Irrelevent as it will already be in `env-production` (for local run only, not useful in the CI)
|
||||||
- ../../../datamodels # Irrelevent as it will already be in `env-production`
|
- ../../../datamodels # Irrelevent as it will already be in `env-production`
|
||||||
- ../../../extensions # Irrelevent as it will already be in `env-production` (for local run only, not useful in the CI)
|
- ../../../extensions # Irrelevent as it will already be in `env-production` (for local run only, not useful in the CI)
|
||||||
- ../../../tests # Exclude tests for now
|
- ../../../env-php-unit-tests # Irrelevant as it will either already be in `env-production` or might be desynchronized from `env-production`
|
||||||
- ../../../toolkit # Exlclude toolkit for now
|
- ../../../env-toolkit # Irrelevent as it will either already be in `env-production` or might be desynchronized from `env-production` (for local run only, not useful in the CI)
|
||||||
|
|
||||||
|
- ../../../tests # Exclude tests for now
|
||||||
|
- ../../../toolkit # Exlclude toolkit for now
|
||||||
|
|||||||
Reference in New Issue
Block a user