dolibarr/dev/tools/phan
Frédéric France 6f2611cf74
fix phan
2024-12-17 18:36:52 +01:00
..
plugins Qual: Fix Plugin ParamMatchRegexPlugin when classname is variable (#30970) 2024-09-23 03:36:17 +02:00
stubs fix phpdoc (#31262) 2024-10-04 09:40:05 +02:00
.gitignore
baseline_extended.txt Try to exclude phan 2024-11-14 00:06:45 +01:00
baseline.txt fix phan 2024-12-17 18:36:52 +01:00
config_extended.php Qual: Fix phan notices (in order of appearance) (#31768) 2024-11-12 00:35:14 +01:00
config_fixer.php Exclude dir for phan 2024-11-14 00:03:31 +01:00
config.php Exclude dir for phan 2024-11-14 00:03:31 +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