dolibarr/dev/tools/phan
2025-02-19 13:28:35 +01:00
..
plugins Qual: Fix ifsql argument type 2025-02-09 20:14:22 +01:00
stubs Qual: Fix Phan notices 2025-01-27 19:15:09 +01:00
.gitignore QUAL Use phan to help detect new issues (#27706) 2024-02-21 18:14:29 +01:00
baseline_extended.txt Qual: Fix phan notices (reception) 2025-02-13 15:39:39 +01:00
baseline.txt Qual: Fix phan notices (theme) 2025-02-19 13:28:35 +01:00
config_extended.php Qual: Update baseline, enable PhanTypeMismatchArgument 2025-02-03 16:05:59 +01:00
config_fixer.php Qual: Fix ifsql argument type 2025-02-09 20:14:22 +01:00
config.php Qual: Enable and fix phan notices for scripts 2025-02-18 16:33:41 +01:00
PHAN.BAT Qual: Enable detection of deprecated modulename & GETPOST(...,'int') (#28457) 2024-02-28 23:25:16 +01:00
README.md QUAL Use phan to help detect new issues (#27706) 2024-02-21 18:14:29 +01:00
run-phan.sh QUAL Use phan to help detect new issues (#27706) 2024-02-21 18:14:29 +01:00
runPhanDocker.sh QUAL Use phan to help detect new issues (#27706) 2024-02-21 18:14:29 +01:00

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