forked from Wavyzz/dolibarr
Qual: Review pre-commit configure - re-enable no-commit-to-branch (#28385)
# 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).
This commit is contained in:
@@ -5,22 +5,30 @@ repos:
|
|||||||
- repo: https://github.com/pre-commit/pre-commit-hooks
|
- repo: https://github.com/pre-commit/pre-commit-hooks
|
||||||
rev: v4.5.0
|
rev: v4.5.0
|
||||||
hooks:
|
hooks:
|
||||||
# This hook test the name of the branch and return error if the name is 'develop' or an official version 'x.y'
|
# This hook tests the name of the branch and return an error if the name is
|
||||||
# so you can't commit if your branch name is not a custom branch name. Using a custom branch name is good
|
# 'develop' or an official version 'x.y'
|
||||||
# practice that make easier to manage PR. You can enable/disable this if you want to commit or not on branch
|
# So you can't commit if your branch name is not a custom branch name.
|
||||||
# with common names.
|
# Using a custom branch name is good practice that makes it easier to manage PRs.
|
||||||
#- id: no-commit-to-branch
|
# You can skip this:
|
||||||
# args: [--branch, develop, --pattern, \d+.0]
|
# - Permanently:
|
||||||
# This check format of xml files
|
# export SKIP=no-commit-to-branch # In your .bashrc or session.
|
||||||
|
# - Only this for one commit:
|
||||||
|
# SKIP=no-commit-to-branch git commit -a -m "My message"
|
||||||
|
# - Skipping all checks for a commit:
|
||||||
|
# git commit -a -m "My message" --no-verify
|
||||||
|
# (Recommendation: run git commit -a .. once, then with `--no-verify`)
|
||||||
|
- id: no-commit-to-branch
|
||||||
|
args: [--branch, develop, --pattern, \d+.0]
|
||||||
|
# This checks that xml files are correct
|
||||||
- id: check-xml
|
- id: check-xml
|
||||||
exclude: |
|
exclude: |
|
||||||
(?x)^(htdocs/includes/.*)$
|
(?x)^(htdocs/includes/.*)$
|
||||||
# This check format of yaml files
|
# This checks that yaml files are correct
|
||||||
- id: check-yaml
|
- id: check-yaml
|
||||||
args: [--unsafe]
|
args: [--unsafe]
|
||||||
# This checl format of json files
|
# This checks that json files are correct
|
||||||
- id: check-json
|
- id: check-json
|
||||||
# Fix DOS end of files to get Unix end of files
|
# Fixes Fix files that have DOS end of line endings
|
||||||
- id: mixed-line-ending
|
- id: mixed-line-ending
|
||||||
# alternative for dev/tools/fixdosfiles.sh
|
# alternative for dev/tools/fixdosfiles.sh
|
||||||
exclude: |
|
exclude: |
|
||||||
@@ -28,14 +36,14 @@ repos:
|
|||||||
|.*/CRLF.*.php # Files in swiftmailer
|
|.*/CRLF.*.php # Files in swiftmailer
|
||||||
)$
|
)$
|
||||||
args: [--fix=lf]
|
args: [--fix=lf]
|
||||||
# Remove trailing whitespace.
|
# Remove trailing whitespace
|
||||||
- id: trailing-whitespace
|
- id: trailing-whitespace
|
||||||
exclude_types: [markdown]
|
exclude_types: [markdown]
|
||||||
# Fix the end of file
|
# Fix the end of file
|
||||||
- id: end-of-file-fixer
|
- id: end-of-file-fixer
|
||||||
# Check if there is not completly merged conflict
|
# Check that there are no completely merged file conflicts
|
||||||
- id: check-merge-conflict
|
- id: check-merge-conflict
|
||||||
# Chech the shebangs of shell files
|
# Check that files with shebangs have the executable bit set (in git)
|
||||||
- id: check-executables-have-shebangs
|
- id: check-executables-have-shebangs
|
||||||
# Check that shell files are executables
|
# Check that shell files are executables
|
||||||
- id: check-shebang-scripts-are-executable
|
- id: check-shebang-scripts-are-executable
|
||||||
@@ -46,7 +54,7 @@ repos:
|
|||||||
|build/debian/dolibarr.config )$
|
|build/debian/dolibarr.config )$
|
||||||
# Fix the first UTF8 byte
|
# Fix the first UTF8 byte
|
||||||
- id: fix-byte-order-marker
|
- id: fix-byte-order-marker
|
||||||
# ???
|
# Check that there are no files that have are the same when uppercased (conflict on windows)
|
||||||
- id: check-case-conflict
|
- id: check-case-conflict
|
||||||
|
|
||||||
# Beautify shell scripts
|
# Beautify shell scripts
|
||||||
@@ -59,7 +67,7 @@ repos:
|
|||||||
|
|
||||||
# Run local script
|
# Run local script
|
||||||
#
|
#
|
||||||
# For instance to update the license in edited files, you could add to local.sh:
|
# For example, to update the license in edited files, you could add to local.sh:
|
||||||
#
|
#
|
||||||
# ```shell
|
# ```shell
|
||||||
# #!/bin/bash
|
# #!/bin/bash
|
||||||
@@ -183,8 +191,6 @@ repos:
|
|||||||
- dev/tools/codespell/codespell-ignore.txt
|
- dev/tools/codespell/codespell-ignore.txt
|
||||||
- -x
|
- -x
|
||||||
- dev/tools/codespell/codespell-lines-ignore.txt
|
- dev/tools/codespell/codespell-lines-ignore.txt
|
||||||
- --uri-ignore-words-list
|
|
||||||
- ned
|
|
||||||
exclude_types: [image]
|
exclude_types: [image]
|
||||||
exclude: (?x)^(.phan/stubs/.*)$
|
exclude: (?x)^(.phan/stubs/.*)$
|
||||||
additional_dependencies: [tomli]
|
additional_dependencies: [tomli]
|
||||||
|
|||||||
@@ -265,6 +265,9 @@
|
|||||||
public function getSumOfAmount($fuser = '', $dates = '', $datee = '')
|
public function getSumOfAmount($fuser = '', $dates = '', $datee = '')
|
||||||
return $TWeek;
|
return $TWeek;
|
||||||
unset($_SESSION["adresse"]);
|
unset($_SESSION["adresse"]);
|
||||||
|
- creat,unitl,alltime,datas,referers
|
||||||
|
- informations,medias,uptodate,reenable,crypted,developpers
|
||||||
|
- ned
|
||||||
* @param array $TWeek array of week numbers
|
* @param array $TWeek array of week numbers
|
||||||
* @param array $TWeek Array of week numbers
|
* @param array $TWeek Array of week numbers
|
||||||
* Copyright (C) 2019 Tim Otte <otte@meuser.it>
|
* Copyright (C) 2019 Tim Otte <otte@meuser.it>
|
||||||
|
|||||||
@@ -7,8 +7,9 @@ build-backend = "setuptools.build_meta"
|
|||||||
# `codespell` can be run as a standalone program from the CLI
|
# `codespell` can be run as a standalone program from the CLI
|
||||||
# with the appropriate default options.
|
# with the appropriate default options.
|
||||||
|
|
||||||
skip = "*/langs/*,*/build/exe/*,**.log,*.pdf,*dev/resources/*,*.phar,*.z,*.gz,*.sql,*.svg,*htdocs/includes/*,*/textiso.txt,*.js,*README-*,*build/rpm/*spec,*build/pad/*ml,*htdocs/includes/phpoffice/*,*htdocs/includes/tecnickcom/*,*dev/initdemo/removeconfdemo.sh,*dev/tools/codespell/*,*pyproject.toml,*build/exe/*,*fontawe*,*htdocs/theme/*/flags-sprite.inc.php,*dev/setup/codetemplates/codetemplates.xml,*/php.ini,*/html_cerfafr.*,*/lessc.class.php,*.asciidoc,*.xml,*opensurvey/css/style.css,*dev/tools/phan/stubs/*,*/documents"
|
skip = "*/.*/*,*/langs/*,*/build/exe/*,**.log,*.pdf,*dev/resources/*,*.phar,*.z,*.gz,*.sql,*.svg,*htdocs/includes/*,*/textiso.txt,*.js,*README-*,*build/rpm/*spec,*build/pad/*ml,*htdocs/includes/phpoffice/*,*htdocs/includes/tecnickcom/*,*dev/initdemo/removeconfdemo.sh,*dev/tools/codespell/*,*pyproject.toml,*build/exe/*,*fontawe*,*htdocs/theme/*/flags-sprite.inc.php,*dev/setup/codetemplates/codetemplates.xml,*/php.ini,*/html_cerfafr.*,*/lessc.class.php,*.asciidoc,*.xml,*opensurvey/css/style.css,*dev/tools/phan/stubs/*,*/documents"
|
||||||
|
|
||||||
|
check-hidden = true
|
||||||
quiet-level=2
|
quiet-level=2
|
||||||
ignore-regex = '\\[fnrstv]'
|
ignore-regex = '\\[fnrstv]'
|
||||||
builtin = "clear,rare,informal,usage,code,names"
|
builtin = "clear,rare,informal,usage,code,names"
|
||||||
|
|||||||
Reference in New Issue
Block a user