Commit Graph

11 Commits

Author SHA1 Message Date
MDW
158de3d54a Qual: Fix Plugin ParamMatchRegexPlugin when classname is variable (#30970)
# Qual: Fix Plugin ParamMatchRegexPlugin when classname is variable

Fix a case where the plugin throws an undefined variable because the
classname in the php source is variable
2024-09-23 03:36:17 +02:00
Laurent Destailleur
ed212d0e84 Fix errormessage 2024-05-31 15:57:03 +02:00
Francis Appels
75e99a6dee Fix phan tool for shipping 2024-03-12 11:21:42 +01:00
MDW
3b57795895 Qual: Update selectDate '' arguments h, m and empty to match PHPdoc (set to 0) (#28718)
* Qual: Update selectDate '' arguments h, m and empty to match PHPdoc (set to 0)

* Qual: Update selectDate '' arguments h, m and empty to match PHPdoc (set to 0)

* Qual: Update selectDate '' arguments h, m and empty to match PHPdoc (set to 0)

* Qual: Update selectDate '' arguments h, m and empty to match PHPdoc (set to 0)

* Qual: Update selectDate '' arguments h, m and empty to match PHPdoc (set to 0)

* Qual: Update selectDate '' arguments h, m and empty to match PHPdoc (set to 0)

* Qual: Update selectDate '' arguments h, m and empty to match PHPdoc (set to 0)

* Qual: Update selectDate '' arguments h, m and empty to match PHPdoc (set to 0)

* Qual: Update selectDate '' arguments h, m and empty to match PHPdoc (set to 0)

* Qual: Update selectDate '' arguments h, m and empty to match PHPdoc (set to 0)

* Qual: Update selectDate '' arguments h, m and empty to match PHPdoc (set to 0)

* Qual: Update selectDate '' arguments h, m and empty to match PHPdoc (set to 0)

* Qual: Update selectDate '' arguments h, m and empty to match PHPdoc (set to 0)

* Qual: Update selectDate '' arguments h, m and empty to match PHPdoc (set to 0)

* Qual: Update selectDate '' arguments h, m and empty to match PHPdoc (set to 0)

* Qual: Update selectDate '' arguments h, m and empty to match PHPdoc (set to 0)

* Qual: Update selectDate '' arguments h, m and empty to match PHPdoc (set to 0)

* Qual: Update selectDate '' arguments h, m and empty to match PHPdoc (set to 0)

* Qual: Update selectDate '' arguments h, m and empty to match PHPdoc (set to 0)

* Qual: Update selectDate '' arguments h, m and empty to match PHPdoc (set to 0)

* Qual: Update selectDate '' arguments h, m and empty to match PHPdoc (set to 0)

* Qual: Update selectDate '' arguments h, m and empty to match PHPdoc (set to 0)

* Qual: Update selectDate '' arguments h, m and empty to match PHPdoc (set to 0)

* Qual: Update selectDate '' arguments h, m and empty to match PHPdoc (set to 0)

* Qual: Update selectDate '' arguments h, m and empty to match PHPdoc (set to 0)

* Qual: Update selectDate '' arguments h, m and empty to match PHPdoc (set to 0)

* Qual: Update selectDate '' arguments h, m and empty to match PHPdoc (set to 0)

* Qual: Update selectDate '' arguments h, m and empty to match PHPdoc (set to 0)

* Qual: Update selectDate '' arguments h, m and empty to match PHPdoc (set to 0)

* Qual: Update selectDate '' arguments h, m and empty to match PHPdoc (set to 0)

* Qual: Update selectDate '' arguments h, m and empty to match PHPdoc (set to 0)

* Qual: Update selectDate '' arguments h, m and empty to match PHPdoc (set to 0)

* Qual: Update selectDate '' arguments h, m and empty to match PHPdoc (set to 0)

* Qual: Update selectDate '' arguments h, m and empty to match PHPdoc (set to 0)

* Qual: Update selectDate '' arguments h, m and empty to match PHPdoc (set to 0)

* Qual: Update selectDate '' arguments h, m and empty to match PHPdoc (set to 0)

* Qual: Update selectDate '' arguments h, m and empty to match PHPdoc (set to 0)

* Qual: Update selectDate '' arguments h, m and empty to match PHPdoc (set to 0)

* Qual: Update selectDate '' arguments h, m and empty to match PHPdoc (set to 0)

* Qual: Update selectDate '' arguments h, m and empty to match PHPdoc (set to 0)

* Qual: Update selectDate '' arguments h, m and empty to match PHPdoc (set to 0)

* Qual: Update selectDate '' arguments h, m and empty to match PHPdoc (set to 0)

* Qual: Update selectDate '' arguments h, m and empty to match PHPdoc (set to 0)

* Qual: Update selectDate '' arguments h, m and empty to match PHPdoc (set to 0)

* Qual: Update selectDate '' arguments h, m and empty to match PHPdoc (set to 0)

* Qual: Update selectDate '' arguments h, m and empty to match PHPdoc (set to 0)

* Qual: Update selectDate '' arguments h, m and empty to match PHPdoc (set to 0)

* Qual: Update selectDate '' arguments h, m and empty to match PHPdoc (set to 0)

* Qual: Update selectDate '' arguments h, m and empty to match PHPdoc (set to 0)

* Qual: Update selectDate '' arguments h, m and empty to match PHPdoc (set to 0)

* Qual: Update selectDate '' arguments h, m and empty to match PHPdoc (set to 0)

* Qual: Update selectDate '' arguments h, m and empty to match PHPdoc (set to 0)

* New: Fixer for selectDate '' arguments h, m and empty

* Qual: Update codespell exceptions
2024-03-09 01:04:15 +01:00
MDW
6cce456b8c Qual: Add fixers for price(ARG2), and urlencode((string)...) (#28701)
# Qual: Add fixers for price(ARG2), and urlencode((string)...)

Register the fixers used to fix phan messages by adjusting arguments and casts.
2024-03-08 12:18:22 +01:00
Laurent Destailleur
8528b3f363 Clean conf 2024-03-04 18:33:32 +01:00
Laurent Destailleur
61dd78b95e Fix regression. Removed bad fixer. GETPOST(... int) is not GETPOSTINT 2024-03-04 17:49:43 +01:00
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
MDW
a351bc05e5 New: Phan Plugin (with fixer) for GETPOST->GETPOSTINT (#28447)
* New: Phan Plugin (with fixer) for GETPOST->GETPOSTINT

# New: Phan Plugin (with fixer) for GETPOST->GETPOSTINT

This detects GETPOST calls with second parameter 'int' and can
convert to GETPOSTINT

* New: Fixer for deprecated module names
2024-02-27 14:08:07 +01:00
MDW
1c3a035ae5 Qual: New Phan plugin for testing that argument matches regex (#28424)
* Qual: New Phan plugin for testing that argument matches regex

# Qual: New Phan plugin for testing that argument matches regex

This Plugin - currently applied to GETPOST - allows verifying that a selected
argument of a function matches a regular expression.

* Qual: Add isModEnabled verification to phan

# Qual: Add isModEnabled verification in phan

Using ParamMatchRegexPlugin, add isModEnabled parameter verification.

* Qual: Verify sanitizeVal check value

# Qual: Verify sanitizeVal check value

Use ParamMatchPlugin to check sanitizeVal check value

* Qual: Extend ParamMatchRegexPlugin with class_method

# Qual: Extend ParamMatchRegexPlugin with class_method

Allow matching class methods for argument verification.

* Update config.php

* Qual: New Phan plugin for testing that argument matches regex

# Qual: New Phan plugin for testing that argument matches regex

This Plugin - currently applied to GETPOST - allows verifying that a selected
argument of a function matches a regular expression.

* Qual: Add isModEnabled verification to phan

# Qual: Add isModEnabled verification in phan

Using ParamMatchRegexPlugin, add isModEnabled parameter verification.

* Qual: Verify sanitizeVal check value

# Qual: Verify sanitizeVal check value

Use ParamMatchPlugin to check sanitizeVal check value

* Qual: Extend ParamMatchRegexPlugin with class_method

# Qual: Extend ParamMatchRegexPlugin with class_method

Allow matching class methods for argument verification.

* Report scalar values (see null, etc)

* Qual: Ignore false Phan Notification

* Qual: Ignore false Phan Notification

* Qual: Fix Phan needs specific message keys for coloring.

---------

Co-authored-by: Laurent Destailleur <eldy@destailleur.fr>
2024-02-26 23:10:16 +01:00
MDW
0d60041d8f Qual: Add custom phan plugin to detect var_dump (#28420)
# Qual: Add custom phan plugin to detect var_dump

This adds a custom plugin to detect the presence of var_dump.

Also disable a standard plugin in the extended configuration
(avoid reporting suggestions to add typing to the function
definitions (/declarations).
2024-02-25 22:11:25 +01:00