Commit Graph

590 Commits

Author SHA1 Message Date
Laurent Destailleur
c49968bb4b Merge pull request #28825 from mdeweerd/fix/PhanNoopBinaryOperator
Fix & Enable PhanNoopBinaryOperator
2024-03-14 23:55:33 +01:00
MDW
ab7879c4a2 Fix & enable PhanPluginPHPDocInWrongComment
# Fix & enable PhanPluginPHPDocInWrongComment

Ignore error in file where the notification occurs & enable detection.
2024-03-14 23:36:24 +01:00
Laurent Destailleur
e478fd8cbc Merge pull request #28859 from mdeweerd/fix/PhanPluginUnknownClosureParamType
Fix & enable PhanPluginUnknownClosureParamType
2024-03-14 23:10:37 +01:00
Laurent Destailleur
2508523f66 Merge pull request #28826 from mdeweerd/fix/PhanNoopProperty
Fix & enable PhanNoopProperty
2024-03-14 23:08:00 +01:00
MDW
0f8b9e73f0 Fix: Enable/fix PhanPluginPrintfIncompatibleArgumentTypeWeak occurences
# Fix: Enable/fix PhanPluginPrintfIncompatibleArgumentTypeWeak occurences

Fix the PhanPluginPrintfIncompatibleArgumentTypeWeak occurences and fix the rule
2024-03-14 23:00:47 +01:00
MDW
43342c8978 Qual: Allow PhanNoopBinaryOperator (all fixed) 2024-03-14 22:57:43 +01:00
Laurent Destailleur
ae85f06ed3 Merge pull request #28857 from mdeweerd/phan/extended/disable_PhanPluginDuplicateCatchStatementBody
Qual: Disable PhanPluginDuplicateCatchStatementBody requires PHP7.1
2024-03-14 22:43:55 +01:00
MDW
a408288ba1 Fix & enable PhanPluginUnknownClosureParamType
# Fix & enable PhanPluginUnknownClosureParamType

Typing of anonymous functions to fix this notice.
Optimised some minor things.
2024-03-14 22:42:26 +01:00
MDW
97f4e4f462 Qual: Disable PhanPluginDuplicateCatchStatementBody which requires PHP7.1 for fix
# Qual: Disable PhanPluginDuplicateCatchStatementBody which requires PHP7.1 for fix

To fix this PHP7.1 is required, so skipping the message in the extended
report as well.
2024-03-14 20:05:32 +01:00
MDW
b2cbf7fe3c Qual: Enable PhanPluginDuplicateConditionalUnnecessary notices (all fixed) 2024-03-14 19:47:27 +01:00
MDW
69be3bbca6 Fix PhanTypeInvalidUnaryOperandNumeric & remove from exceptions
# Fix PhanTypeInvalidUnaryOperandNumeric & remove from exceptions

Fix by casting result of date() or by adding typing hints.

(This notification indicates a unary '-' or similar is performed
on a value that may not be a number).
2024-03-14 19:39:49 +01:00
MDW
49416784ce Fix PhanPluginSuspiciousParamPosition 2024-03-14 19:39:29 +01:00
MDW
b28f6a2cba Enable PhanNoopProperty 2024-03-14 19:37:47 +01:00
Eric Seigne
385732c12d codespell and datee 2024-03-14 18:09:04 +01:00
MDW
1e252dd587 Add spelling exception (datee + error in Changelog) 2024-03-14 17:05:27 +01:00
Eric Seigne
da543ac96d codespell and datee 2024-03-14 10:00:48 +01:00
MDW
0127cc76f5 Qual: Enable PhanTypeInvalidUnaryOperandIncOrDec (all fixed) 2024-03-13 17:38:14 +01:00
Laurent Destailleur
cad8f24322 Merge pull request #28799 from mdeweerd/fix/PhanPluginDuplicateExpressionAssignmentOperation
Fix & enable PhanPluginDuplicateExpressionAssignment
2024-03-13 14:49:21 +01:00
Laurent Destailleur
4afadf6dc4 Merge pull request #28804 from mdeweerd/fix/PhanPluginUnknownFunctionParamType
Fix & enable PhanPluginUnknownFunctionParamType
2024-03-13 14:31:18 +01:00
Laurent Destailleur
c3f28b8592 Merge pull request #28802 from mdeweerd/PhanPluginRedundantAssignment
Fix PhanPluginRedundantAssignment
2024-03-13 11:04:02 +01:00
MDW
73eeb69cc8 Qual: Enable PhanPluginUnknownFunctionParamType (all fixed) 2024-03-13 10:51:46 +01:00
MDW
1debf4f538 # Fix & enable PhanPluginPrintfNotPercent
Fix PhanPluginPrintfNotPercent by setting format length to non 0 value.

Example of Notification message:

    'Format string "%0.10F" contains something that is not a percent sign, it will be treated as a format string '%0.10F' with padding of "0" and alignment of '' but no width. Use %% for a literal percent sign, or '%1$.10F' to be less ambiguous' .
2024-03-13 10:42:13 +01:00
MDW
fcca1b6987 Qual: Enable PhanPluginRedundantAssignment (all fixed) 2024-03-13 01:05:05 +01:00
MDW
6170ebe82e Qual: Enable PhanPluginDuplicateExpressionAssignment, all fixed 2024-03-12 22:27:58 +01:00
MDW
4df31b5664 Qual: Enable PhanPluginMixedKeyNoKey, all cases fixed 2024-03-12 21:35:54 +01:00
MDW
8f7fb3fac9 Qual: No more exception for PhanPluginDuplicateIfCondition 2024-03-12 19:16:44 +01:00
Laurent Destailleur
a6926c29c0 Merge pull request #28778 from fappels/develop_fix_delivery_note
Fix shipping is not a delivery_note (is sub module of shipping)
2024-03-12 14:53:51 +01:00
Laurent Destailleur
367f47428f Merge pull request #28734 from mdeweerd/fix/PhanTypeMismatchDimAssignment
Qual: Fix and enable PhanTypeMismatchDimAssignment
2024-03-12 14:20:34 +01:00
Laurent Destailleur
d62ef14064 Merge pull request #28768 from mdeweerd/fix/PhanTypeMismatchDeclaredParamNullable
Fix: PhanTypeMismatchDeclaredParamNullable & enable detection
2024-03-12 14:19:41 +01:00
Francis Appels
6f1b184f17 Merge remote-tracking branch 'Dolibarr/develop' into develop_fix_delivery_note 2024-03-12 14:13:41 +01:00
Francis Appels
75e99a6dee Fix phan tool for shipping 2024-03-12 11:21:42 +01:00
Frédéric FRANCE
d7517b5f20 Merge remote-tracking branch 'upstream/develop' into clean_mod_code 2024-03-12 09:25:53 +01:00
Laurent Destailleur
d94d7ef700 Merge branch 'develop' of git@github.com:Dolibarr/dolibarr.git into develop 2024-03-12 00:41:50 +01:00
Frédéric France
c8c003a437 restore rule 2024-03-11 23:46:48 +01:00
Frédéric France
e60db40fa4 clean code and phpdoc 2024-03-11 22:20:29 +01:00
Frédéric France
7a7d342aaa clean code and phpdoc 2024-03-11 22:14:39 +01:00
MDW
200bc042bd Qual: Enable PhanTypeMismatchDeclaredParamNullable
# Qual: Enable PhanTypeMismatchDeclaredParamNullable

The few cases for PhanTypeMismatchDeclaredParamNullable were fixed,
so the notification can be enabled
2024-03-11 16:48:55 +01:00
Laurent Destailleur
e236553ea8 Merge branch 'develop' into fix/PhanTypeMismatchDimAssignment 2024-03-11 14:41:04 +01:00
MDW
dbfb1180ee Qual: Fix PhanPluginDuplicateIfStatements & remove exceptions (#28749)
# Qual: Fix PhanPluginDuplicateIfStatements & remove exceptions

Fix occurences of PhanPluginDuplicateIfStatements which are if statements where the
consecutive branches execute the same code, making it useles to test the condition
2024-03-11 12:58:51 +01:00
Laurent Destailleur
5c84032d41 Merge branch 'develop' into fix/PhanTypeMismatchDimAssignment 2024-03-11 12:56:23 +01:00
MDW
9c00a465c9 Qual: phan: Add more global definitions (#28745)
* Qual: phan: Add more global definitions

# Qual: phan: Add more global definitions

Add some more typing information for globals

* Qual: phan: ignore local conf file which may contain exceptions

* Qual: phan: add a few more global typings
2024-03-11 12:55:44 +01:00
Laurent Destailleur
0fb4a44563 Fix nb of lines 2024-03-10 22:13:37 +01:00
Laurent Destailleur
c03b5dc2ec Fix for phan output 2024-03-10 18:50:02 +01:00
MDW
c6fa4e4945 Qual: Enable reporting PhanTypeMismatchDimAssignment 2024-03-10 02:17:20 +01:00
MDW
6d9e7b8144 Qual: Fix PhanTypeMismatchArgumentInternalProbablyReal (#28732)
* Fix: False positive for PhanTypeMismatchArgumentInternalProbablyReal

* Qual: phan: suppress false positive on ssl_set

* Qual: Enable PhanTypeMismatchArgumentInternalProbablyReal

# Qual: Enable PhanTypeMismatchArgumentInternalProbablyReal

PhanTypeMismatchArgumentInternalProbablyReal are fixed and reporting can
be enabled.

* Qual: Fix PhanTypeMismatchArgumentInternalProbablyReal by improving typing

* Qual: Rewrite/optimize to fix PhanTypeMismatchArgumentInternalProbablyReal

# Qual: Rewrite/optimize to fix PhanTypeMismatchArgumentInternalProbablyReal

False positive detecting that  is not an int, rewriting to check
impact
2024-03-10 01:55:56 +01:00
MDW
d524e97137 Qual: Fix & enable PhanPluginRedundantAssignmentInLoop (#28733)
# Qual: Fix & enable PhanPluginRedundantAssignmentInLoop

Fixes the occurences that generated this notice & enable the report
for PhanPluginRedundantAssignmentInLoop
2024-03-10 01:54:34 +01:00
MDW
c95bab2818 Qual: Add check on addExtraField type argument (#28738)
* Qual: Add check on addExtraField type argument

# Qual: Add check on addExtraField type argument

Added a check on the type argument for addExtraField

* Qual: Update phan ignore with more specific name
2024-03-10 01:46:10 +01:00
MDW
0b19aa415c Fix: Initialise array before assigning values (#28728)
* Qual: Enable PhanUndeclaredVariableDim

# Qual: Enable PhanUndeclaredVariableDim

The notifications are fixed in the code so the detection no longer
needs to be suppressed in the default flow

* Fix: initialise array before adding fields

* Fix: initialise array before adding fields

* Fix: initialise array before adding fields

* Fix: initialise array before adding fields

* Fix: initialise array before adding fields

* Fix: initialise array before adding fields

* Fix: initialise array before adding fields

* Fix: initialise array before adding fields

* Fix: initialise array before adding fields

* Fix: initialise array before adding fields

* Fix: initialise array before adding fields

* Fix: initialise array before adding fields

* Fix: initialise array before adding fields

* Fix: initialise array before adding fields

* Fix: initialise array before adding fields

* Fix: initialise array before adding fields

* Fix: initialise array before adding fields

* Fix: initialise array before adding fields

* Fix: initialise array before adding fields

* Fix: initialise array before adding fields

* Fix: initialise array before adding fields

* Fix: initialise array before adding fields

* Fix: initialise array before adding fields

* Fix: initialise array before adding fields

* Fix: initialise array before adding fields

* Fix: initialise array before adding fields

* Fix: initialise array before adding fields

* Fix: initialise array before adding fields

* Fix: initialise array before adding fields

* Fix: initialise array before adding fields

* Fix: initialise array before adding fields

* Fix: initialise array before adding fields

* Fix: initialise array before adding fields

* Fix: initialise array before adding fields

* Fix: initialise array before adding fields

* Fix: initialise array before adding fields

* Fix: initialise array before adding fields

* Fix: initialise array before adding fields

* Fix: initialise array before adding fields

* Fix: initialise array before adding fields

* Fix: initialise array before adding fields

* Fix: initialise array before adding fields

* Fix: initialise array before adding fields

* Fix: initialise array before adding fields

* Fix: initialise array before adding fields

* Fix: initialise array before adding fields

* Fix: initialise array before adding fields

* Fix: initialise array before adding fields

* Fix: initialise array before adding fields

* Fix: initialise array before adding fields

* Fix: initialise array before adding fields

* Fix: initialise array before adding fields

* Fix: initialise array before adding fields

* Fix: initialise array before adding fields

* Fix: initialise array before adding fields

* Fix: initialise array before adding fields

* Fix: initialise array before adding fields

* Fix: initialise array before adding fields

* Fix: initialise array before adding fields

* Fix: initialise array before adding fields

* Fix: initialise array before adding fields

* Fix: initialise array before adding fields

* Fix: initialise array before adding fields

* Fix: initialise array before adding fields

* Fix: initialise array before adding fields

* Fix: initialise array before adding fields

* Fix: initialise array before adding fields

* Fix: initialise array before adding fields

* Fix: initialise array before adding fields

* Fix: initialise array before adding fields

* Qual: Add type hint to array to avoid phan notification

* Qual: Add type hint to array to avoid phan notification

* Qual: Enable PhanParamSpecial1 (all resolved)

* Qual: Ignore false PhanTypeArraySuspiciousNullable

* Qual: Improve typing to fix PhanTypeArraySuspicious

* Qual: Fix PhanTypeArraySuspicious by replacing null assignment with empty array

* Qual: Fix PhanTypeArraySuspicious by testing as instancof DebugBar

* Qual: Fix PhanTypeComparisonToArray with enhanced typing

* Qual: Fix PhanTypeComparisonToArray with enhanced typing

* Qual: Enable phan messages that no longer appear

* Qual: Exclude phan stubs from codesniffer ruleset
2024-03-09 16:32:02 +01:00
Laurent Destailleur
302ea702e6 Add v19 in stats 2024-03-09 02:55:25 +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