diff --git a/.pre-commit-hooks.yaml b/.pre-commit-hooks.yaml index 7e490d6..37776b8 100644 --- a/.pre-commit-hooks.yaml +++ b/.pre-commit-hooks.yaml @@ -215,7 +215,7 @@ always_run: true - id: check-line name: Check Line - description: Checks desired lines are formatted as desired in python an xml files. + description: Checks desired lines are formatted as desired in python and xml files. entry: check-line language: python - id: check-model-name @@ -226,16 +226,19 @@ types: [python] - id: check-class-docstring name: Check Class Docstring + description: Checks that each python class has a docstring. entry: check-class-docstring language: python types: [python] - id: check-view-name name: Check View Name + description: Checks that odoo views name follow odoo guidelines. entry: check-view-name language: python types: [xml] - id: check-view-fields-order name: Check View Fields Order + description: Checks view fields order follow odoo guidelines. entry: check-view-fields-order language: python types: [xml] \ No newline at end of file diff --git a/README.md b/README.md index 430d6b0..e2136b0 100644 --- a/README.md +++ b/README.md @@ -155,6 +155,31 @@ Add this to your `.pre-commit-config.yaml` ]` Receives a regular expression +- `check-branch-name` - Checks current branch name. + - To specify correct branch name use `args: [--regex]`. Example: + `args: [ + --regex, 'develop\..+?\.(DEFECTO|INVES|MEJORA)\.\d+(_\d+)*' + ]` +- `check-line` - Checks desired lines are formatted as desired in python and xml files. + - To specify correct branch name use `args: [--line-to-check, --regexp-to-match]`. Example: + `args: [ + --line-to-check, '^(\t| )*