dolibarr/dev/tools/phan
MDW 11c43e8c63
Fix: ticket.class phan/phpstan notices (#31448)
* Qual: Fix ticket.class notices

* Do not analyze custom

* Fix: Correct reference to cache (+phpdoc)

* Update baseline, ignore everything in custom

* Qual: Fix notices in files related to ticket class
2024-10-19 01:21:41 +02: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 QUAL Use phan to help detect new issues (#27706) 2024-02-21 18:14:29 +01:00
baseline_extended.txt Exclude false positive 2024-06-16 13:17:10 +02:00
baseline.txt Fix: ticket.class phan/phpstan notices (#31448) 2024-10-19 01:21:41 +02:00
config_extended.php Qual: Enable & fix or ignore Invalid DimOffset (#31176) 2024-09-29 21:52:31 +02:00
config_fixer.php Add checks on dol_(mktime|now|print_date) + avoid duplicate phan conf 2024-03-27 10:18:39 +01:00
config.php Fix: ticket.class phan/phpstan notices (#31448) 2024-10-19 01:21:41 +02: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