dolibarr/dev/tools/phan
MDW 97f4e4f462
Qual: Disable PhanPluginDuplicateCatchStatementBody which requires PHP7.1 for fix
# Qual: Disable PhanPluginDuplicateCatchStatementBody which requires PHP7.1 for fix

To fix this PHP7.1 is required, so skipping the message in the extended
report as well.
2024-03-14 20:05:32 +01:00
..
plugins Fix phan tool for shipping 2024-03-12 11:21:42 +01:00
stubs
.gitignore
baseline.txt Qual: No more exception for PhanPluginDuplicateIfCondition 2024-03-12 19:16:44 +01:00
config_extended.php Qual: Disable PhanPluginDuplicateCatchStatementBody which requires PHP7.1 for fix 2024-03-14 20:05:32 +01:00
config_fixer.php Merge remote-tracking branch 'Dolibarr/develop' into develop_fix_delivery_note 2024-03-12 14:13:41 +01:00
config.php Qual: Enable PhanTypeInvalidUnaryOperandIncOrDec (all fixed) 2024-03-13 17:38:14 +01:00
PHAN.BAT Qual: Enable detection of deprecated modulename & GETPOST(...,'int') (#28457) 2024-02-28 23:25:16 +01:00
README.md
run-phan.sh
runPhanDocker.sh

Static Code Checks using phan

Installation, running

run-phan.sh can install and run phan.

See instructions in run-phan.sh for installing (or just run it).

The configuration file in PROJECT_DIR/.phan/config.php also allows you to run phan independently from the script.

Run options:

No option : Runs the minimum checks

Option 'full' : Runs all an extensive set of checks

Option '1' : Writes the baseline

Examples:

  • run-phan.sh runs the default checks
  • run-phan.sh 1 updates the baseline for the default checks
  • run-phan.sh full runs the extended checks
  • run-phan.sh full 1 updates the baseline for the extended checks

Baseline

The baseline.txt file in this directory defines the issues that are currently excluded from the final report. In principle you should not add any more exceptions to that file, but rather fix the issues or add phan annotations that provide more information or to exclude specific cases.

Configuration

config.php : Default configuration file

config_extended.php : Configuration that enables more checks.

baseline.txt : Ignored issues (with config.php)

baseline_extended.txt : Ignored issues (with config_extended.php), not currently in git