Files
dolibarr/dev/tools/phan/PHAN.BAT
MDW 7391ad42ed Qual: Enable detection of deprecated modulename & GETPOST(...,'int') (#28457)
* Qual: Enable detection of deprecated modulename & GETPOST(...,'int')

# Qual: Enable detection of deprecated modulename & GETPOST(...,'int')

Enable phan rules to verify deprecated modulename usage and GETPOST(...,'int')
usage in the code.

* Qual: Try type hint on  to help avoid notification

* Qual: Accept 3 parameters for GETPOST to GETPOSTINT conversion

* Qual: Convert GETPOST(...,'int',VALUE) to GETPOSTINT(...,VALUE)

# Qual: Convert GETPOST(...,'int',VALUE) to GETPOSTINT(...,VALUE)

Following the update to the fixer to also convert GETPOST... with 3 parameters.
The files are now converted.
2024-02-28 23:25:16 +01:00

47 lines
1.0 KiB
Batchfile

@ECHO OFF
REM Usage (use from root of project):
REM - Standard checks:
REM PHAN.BAT
REM - Extended checks:
REM PHAN.BAT extended
REM - Use fixer configuration:
REM PHAN.BAT fix
REM
REM Standard phan options can be added on the command line.
set MEMOPT=--memory-limit=4G
set CONFIG=--config-file
set CONFIG_FILE=dev/tools/phan/config.php
set FIX=
set USERARGS=
SET TWICE=--analyze-twice
rem Iterate through each argument
for %%i in (%*) do (
if "%%i"=="--memory-limit" (
set MEMOPT=""
)
if "%%i"=="extended" (
set CONFIG="--config-file"
set CONFIG_FILE=dev/tools/phan/config_extended.php
goto :nextloop
)
if "%%i"=="fix" (
set FIX="--automatic-fix"
set CONFIG="--config-file"
set CONFIG_FILE=dev/tools/phan/config_fixer.php
set TWICE=
goto :nextloop
)
if "%%i"=="--config-file" (
set CONFIG=
set CONFIG_FILE=
)
set "USERARGS=%USERARGS% %%i"
:nextloop
REM NEXTLOOP
)
../phan/vendor/bin/phan.bat %TWICE% %MEMOPT% %FIX% %CONFIG% %CONFIG_FILE% %USERARGS%