* Update tool versions in .pre-commit-config
# Update tool versions in .pre-commit-config
Update tool versions for pre-commit.
codespell is updated in #33493 .
Prettier was upgraded to 3.1.0 - higher versions are
not compatible with the normal pre-commit workflow apparently.
* Ignore notice from sqlfluff
Ignore LT14 - The 'WHERE' keyword should always start a new line.
* new: add duration extrafields
* style: fix style
* ci: fix precommit config
* style: run cs fixer
* ci: adapt type to fit with php-stan
* ci: adapt type to fit with php-stan
* ci: adapt type to fit with php-stan
---------
Co-authored-by: Benoît PASCAL <contact@p-ben.com>
* Qual: More specific ignoreErrors for phpstan
# Qual: More specific ignoreErrors for phpstan
More specific ignore expressions helps identify new exceptions that
would have matched the more generic ignore expressions.
It also helps to progressively solve phpstan notices
in smaller steps by modifying the expressions
* CamelCase for dictFieldList
* Update phan baseline
* QUAL: Add sqlfluff (SQL code and style check)
# QUAL: Add sqlfluff (SQL code and style check)
This adds a validity and style check on the .sql files.
The same tool can be used to fix style (which can be set up as a
pre-commit hook).
* Ignore some sqlfluff notices
* Ignore RF04 notice, warning about the use of sql keywords
* Adjust dialects for some directories
# NEW: Script for fast identification of missing/unused/duplicate translations
Fast analysis of files to identify missing, unused and duplicate translations.
Fast = less than 3 seconds when there are no exceptions (on my development machine).
# Qual: Review pre-commit configure - re-enable no-commit-to-branch
This reviews some of the documentation inside the pre-commit-config.yaml file.
It also re-enables the no-commit-to-branch hook.
Also enable spelling on hidden files (changes to pyproject.toml +
exceptions file).
* Fix: PhanParamSignatureMismatch
# Fix: PhanParamSignatureMismatch
PhanDoc was updated to require specific types which changes the method signature
versus the parent.
This results in a signature mismatch.
Updated to maintain the method signature but dynamically check that
the object type is correct.
* Update pre-commit for php-cs
* 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)
* Qual: Fix/extend language scripts, integrate in pre-commit
Updated scripts to comply with shellscript.
Integrated one in pre-commit that seems useful.
* Qual: Find duplicate lang keys
* Add line numbers (to allow annotation)
* Fix fixaltlanguages.sh and add to pre-commit
* Make historical language checks 'manual' in 'pre-commit'
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)
# 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.
Backport the pre-commit tool to bring extra checks to the older versions
so that they are fixed earlier before merging in upper versions.
Other PRs will be created for backporting to 18.0 and 19.0.
The PRs should be accepted in reverse order:
- develop;
- 19.0:
- 18.0;
- 17.0.
That should avoid merge conflicts and ensure that options (and ignored
messages or steps) are adapted to the version branch.