2
0
forked from Wavyzz/dolibarr
Commit Graph

172 Commits

Author SHA1 Message Date
Laurent Destailleur
d62bd87f06 Clean. Too many files that are not uptodate. Better to update doc to
explain how to regenerate them.
2024-05-24 15:07:31 +02:00
Laurent Destailleur
22987e35f3 Add API setup for Bruno 2024-04-30 22:52:26 +02:00
MDW
bbde552979 Qual: Enable Phan Rules and update baseline (#29255)
* Fix script generating trailing whitespace

* Add nusoap as a stub for better analysis

* Qual: Return type for fetch_name_optionals_label to fix phan message

* Qual: Enable Phan Rules and update baseline

# Qual: Enable Phan Rules and update baseline

This enables all of the rules that are currently also
enabled for cti, but sets the baseline to ignore the
exceptions already present.
This will help detect exceptions added by code modifications
if the rule is not ignored for the given file.
2024-04-07 11:55:39 +02:00
MDW
a094ad38fc Fix spelling (using beta codespell)
# Fix spelling (using beta codespell

New spelling fixes - ignoring thirdparty which should be either third-party
or third party.
2024-03-20 00:35:01 +01:00
MDW
c181144c49 Qual: setup.sh - allow PHP envvar and force error reporting 2024-03-19 03:43:36 +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
61e69b352b Doc 2024-03-07 18:44:55 +01:00
Frédéric FRANCE
016de3ef66 fix codespell (#28536)
* fix codespell

* fix phpstan

* fix phpstan

* fix phpstan

* fix phpstan
2024-03-01 12:39:23 +01:00
MDW
cec3a6c8e8 Qual: Add AbstractRestApiTest class, refactor RestApiUserTest, add RestApiMosTest (#28484)
* New: AbstractRestAPITest class

* Qual: Create RestAPIMosTest
2024-02-28 17:03:53 +01:00
Laurent Destailleur
78622c24a0 Doc 2024-02-24 19:28:14 +01:00
MDW
b343181789 Update phpunit.bat sample script and setup_conf.sh (#28307)
# Update phpunit.bat sample script and setup_conf.sh

- setup_conf.sh - Added caching feature;
- phpunit.bat - Example updated based on experience with php web server
2024-02-20 23:02:59 +01:00
Laurent Destailleur
9b288e349e Merge branch '19.0' of git@github.com:Dolibarr/dolibarr.git into develop 2024-02-18 17:20:16 +01:00
Laurent Destailleur
e38e9618ac Merge branch '18.0' of git@github.com:Dolibarr/dolibarr.git into 19.0 2024-02-18 17:14:03 +01:00
Laurent Destailleur
ebe68c9075 Merge branch '17.0' of git@github.com:Dolibarr/dolibarr.git into 18.0 2024-02-18 17:06:36 +01:00
Laurent Destailleur
d707a1d668 Fix errors 2024-02-18 14:36:45 +01:00
Laurent Destailleur
a59fa7eca0 Test 2024-02-18 14:27:15 +01:00
Laurent Destailleur
ead53cf4f5 Avoid beautysh error 2024-02-18 14:09:02 +01:00
Laurent Destailleur
fb54306a1e Update precommit 2024-02-18 13:39:25 +01:00
MDW
acf09b805f Fix: Make all 'relative paths' absolute (#28196)
# Fix: Make all 'relative paths' absolute

The phpcs ruleset xml file's relative exclude patterns are relative to
the filename(s) provided on the command line.
Hence with partial verifications, the path exclusion does not function
as we would like.
Removing the relative-path attribute from the patterns the exclusion
works.
At the same time, the patterns were optimized and a comment was added.
2024-02-16 12:59:04 +01:00
MDW
e5423d5c59 Qual: Add exceptions for codespell (#28186)
* Dev: Add setup scripts for phpunit/database

# Dev: Add setup scripts for phpunit/database

Some scripts that helped to setup some unit testing.

* NEW Add Windows ci workflow

# NEW Add Windows ci workflow

This adds a workflow to execute ci on a windows platform

* Disable open_basedir for now, to test effect

* Qual: Exclude documents directory from codespell

# Qual: Exclude documents directory from codespell

Documents directory may be present during development (unit tests).
Do not check spelling there

* Qual: Add codespell exceptions

# Qual: Add codespell exceptions

Add new exceptions to codespell (var identified as misspelling).
2024-02-15 14:49:09 +01:00
Laurent Destailleur
248119fc8c Move setup files 2024-02-15 11:50:38 +01:00
Laurent Destailleur
ff2d609814 Merge branch '18.0' of git@github.com:Dolibarr/dolibarr.git into 19.0
Conflicts:
	htdocs/core/class/commonobject.class.php
	htdocs/mrp/mo_production.php
2024-02-12 03:35:39 +01:00
Laurent Destailleur
65533360a2 Merge branch '17.0' of git@github.com:Dolibarr/dolibarr.git into 18.0
Conflicts:
	htdocs/main.inc.php
2024-02-12 03:32:58 +01:00
MDW
60f15baef2 Qual: Backport: pre-commit php-cs with cache (#28123)
* Qual: Lower severity on php-cs messages that should not block (#28072)

# Qual: Lower severity on php-cs messages that should not block

Some warning messages result in php-cs having an exit code of 2 and others
only have an exit ocde of 1.  When the exit code is 2, the warnings are fixable
by php-cbf.

In order to be able to filter on the warnings in the github ci flow, but still
show them in the travis flow, I lower the level of the warnings that should not
be blocking to 4.

At the same time, the php-cs configuration in pre-commit now requires that the
severity is minimum 5 to show the message (level 5 is the default for all warnings
and errors).

So this will limit the warning messages to the ones that should result in a failing
ci action.  If any new cases are discovered, they should also be lowered in the
php-cs configuration file.

* Qual: ci: Run pre-commit/php-cs with cache (#28079)

This adds a hook to .pre-commit-config.yaml and updates the workflow
to run php-cs with cache when it is run for all files.
When running on changed files only, the cache is not useful.

The php-codesniffer ruleset.xml was cleaned up (duplicates removal/formatted)
2024-02-12 03:30:19 +01:00
MDW
7a389299c3 Qual: ci: Run pre-commit/php-cs with cache (#28079)
This adds a hook to .pre-commit-config.yaml and updates the workflow
to run php-cs with cache when it is run for all files.
When running on changed files only, the cache is not useful.

The php-codesniffer ruleset.xml was cleaned up (duplicates removal/formatted)
2024-02-10 01:22:07 +01:00
MDW
f6fc93249d Qual: Lower severity on php-cs messages that should not block (#28072)
# Qual: Lower severity on php-cs messages that should not block

Some warning messages result in php-cs having an exit code of 2 and others
only have an exit ocde of 1.  When the exit code is 2, the warnings are fixable
by php-cbf.

In order to be able to filter on the warnings in the github ci flow, but still
show them in the travis flow, I lower the level of the warnings that should not
be blocking to 4.

At the same time, the php-cs configuration in pre-commit now requires that the
severity is minimum 5 to show the message (level 5 is the default for all warnings
and errors).

So this will limit the warning messages to the ones that should result in a failing
ci action.  If any new cases are discovered, they should also be lowered in the
php-cs configuration file.
2024-02-09 11:38:37 +01:00
MDW
ef95c56ecd Qual: Fix spelling.
# Qual: Fix some spelling
2024-01-21 13:37:53 +01:00
MDW
0fe6b8122a NEW: Dev documentation about setting up pre-commit locally
# NEW: Dev documentation about setting up pre-commit locally

A quick start guide about setting up pre-commit.
2024-01-18 15:54:08 +01:00
Laurent Destailleur
1600c985da Fix phpcs 2024-01-14 20:34:25 +01:00
MDW
c885c6917e Qual: Ignore most shellcheck annotations, fix some (#27452)
# Qual: Ignore most shellcheck annotations, fix some

Most shellcheck annotations are ignored - this is to make sure that ci
can work for existing scripts.

Some fixes were applied.

pre-commit script was beautyfied by temporarily suppressing the IFS= expression on 2 lines.
2024-01-12 21:03:08 +01:00
MDW
42a0d05b63 Qual: Spelling outside htdocs (#27448)
* Qual: Spelling outside htdocs

# Qual: Fix spelling of files not in the htdocs subdirectory.

Highlight:
- Change in email test from unvalid to invalid that should give the same test result.

* Update Dolibarr-soapui-project.xml

---------

Co-authored-by: Laurent Destailleur <eldy@destailleur.fr>
2024-01-12 17:14:13 +01:00
MDW
5d69728703 Qual: Apply beautysh (#27395)
# Qual: Apply beautysh

Beautysh the shell scripts.
Also fixed some spelling.
2024-01-10 19:47:29 +01:00
MDW
2e31005afb Fix: Make some scripts with shebang executable in git. (#27393)
# Fix: Make some scripts with shebang executable in git.

Make some scripts executable according to git.
This can help running them after checkout.
It also helps with future automatic checks.
2024-01-10 17:33:52 +01:00
Laurent Destailleur
329473c3cb Merge branch '18.0' of git@github.com:Dolibarr/dolibarr.git into develop 2023-08-21 14:14:44 +02:00
Laurent Destailleur
50bf5281c8 FIX encrypt sensitive data not be done for const MAIN_AGENDA_ACTIONAUTO 2023-08-20 22:20:15 +02:00
Laurent Destailleur
759ba40780 Test for sonarqube 2023-08-02 03:03:26 +02:00
Laurent Destailleur
9249ae6176 Doc 2023-08-02 00:27:53 +02:00
Laurent Destailleur
38d6abbc76 Better fail2ban files 2023-07-28 14:19:27 +02:00
Laurent Destailleur
e41f449f95 FIX #yogosha17128 2023-07-19 04:14:49 +02:00
Laurent Destailleur
01d8be4447 Try to replace stickler with github actions 2023-06-30 09:39:08 +02:00
Laurent Destailleur
c0e2f53b88 Increase nb of try before ban 2023-06-06 11:38:41 +02:00
Laurent Destailleur
42696954f3 Increase public limit 2023-02-25 04:25:23 +01:00
Laurent Destailleur
6f978383cd Doc 2023-02-11 13:29:21 +01:00
Laurent Destailleur
b73df9724d First test of qodana 2022-12-27 18:18:23 +01:00
Laurent Destailleur
41f1c20d4c Merge branch '17.0' of git@github.com:Dolibarr/dolibarr.git into develop 2022-12-20 23:25:59 +01:00
Laurent Destailleur
7db9da4769 css 2022-12-19 13:10:27 +01:00
Laurent Destailleur
b73c29f817 Doc 2022-12-15 19:04:51 +01:00
Laurent Destailleur
77265b8828 Add example of fail2ban to block 403 forbidden tries 2022-12-15 11:29:32 +01:00
Laurent Destailleur
cacce73d9a Doc 2022-11-15 11:00:33 +01:00
Laurent Destailleur
938bc27917 Update sample for fail2ban 2022-10-18 12:59:15 +02:00