summaryrefslogtreecommitdiffstats
path: root/README.md
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2022-06-19 07:03:36 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2022-06-19 07:03:44 +0000
commit9262e31316a16180044e0e28a2740238f8aef5c4 (patch)
tree49b2bc070018965707ec237623da9932c880fae4 /README.md
parentAdding debian version 4.1.0-1. (diff)
downloadpre-commit-hooks-9262e31316a16180044e0e28a2740238f8aef5c4.tar.xz
pre-commit-hooks-9262e31316a16180044e0e28a2740238f8aef5c4.zip
Merging upstream version 4.3.0.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'README.md')
-rw-r--r--README.md23
1 files changed, 15 insertions, 8 deletions
diff --git a/README.md b/README.md
index c5a199e..411529a 100644
--- a/README.md
+++ b/README.md
@@ -1,6 +1,6 @@
-[![Build Status](https://asottile.visualstudio.com/asottile/_apis/build/status/pre-commit.pre-commit-hooks?branchName=master)](https://asottile.visualstudio.com/asottile/_build/latest?definitionId=17&branchName=master)
-[![Azure DevOps coverage](https://img.shields.io/azure-devops/coverage/asottile/asottile/17/master.svg)](https://dev.azure.com/asottile/asottile/_build/latest?definitionId=17&branchName=master)
-[![pre-commit.ci status](https://results.pre-commit.ci/badge/github/pre-commit/pre-commit-hooks/master.svg)](https://results.pre-commit.ci/latest/github/pre-commit/pre-commit-hooks/master)
+[![Build Status](https://asottile.visualstudio.com/asottile/_apis/build/status/pre-commit.pre-commit-hooks?branchName=main)](https://asottile.visualstudio.com/asottile/_build/latest?definitionId=17&branchName=main)
+[![Azure DevOps coverage](https://img.shields.io/azure-devops/coverage/asottile/asottile/17/main.svg)](https://dev.azure.com/asottile/asottile/_build/latest?definitionId=17&branchName=main)
+[![pre-commit.ci status](https://results.pre-commit.ci/badge/github/pre-commit/pre-commit-hooks/main.svg)](https://results.pre-commit.ci/latest/github/pre-commit/pre-commit-hooks/main)
pre-commit-hooks
================
@@ -16,7 +16,7 @@ Add this to your `.pre-commit-config.yaml`
```yaml
- repo: https://github.com/pre-commit/pre-commit-hooks
- rev: v4.1.0 # Use the ref you want to point at
+ rev: v4.3.0 # Use the ref you want to point at
hooks:
- id: trailing-whitespace
# - id: ...
@@ -57,6 +57,7 @@ Attempts to load all json files to verify syntax.
#### `check-merge-conflict`
Check for files that contain merge conflict strings.
+ - `--assume-in-merge` - Allows running the hook when there is no ongoing merge operation
#### `check-shebang-scripts-are-executable`
Checks that scripts with shebangs are executable.
@@ -125,6 +126,10 @@ Sort the lines in specified files (defaults to alphabetical).
You must provide list of target files as input to it.
Note that this hook WILL remove blank lines and does NOT respect any comments.
+The following arguments are available:
+- `--ignore-case` - fold lower case to upper case characters.
+- `--unique` - ensure each line is unique.
+
#### `forbid-new-submodules`
Prevent addition of new git submodules.
@@ -137,13 +142,15 @@ Replaces or checks mixed line ending.
- `no` - Checks if there is any mixed line ending without modifying any file.
#### `name-tests-test`
-Assert that files in tests/ end in `_test.py`.
- - Use `args: ['--django']` to match `test*.py` instead.
+verifies that test files are named correctly.
+- `--pytest` (the default): ensure tests match `.*_test\.py`
+- `--pytest-test-first`: ensure tests match `test_.*\.py`
+- `--django` / `--unittest`: ensure tests match `test.*\.py`
#### `no-commit-to-branch`
Protect specific branches from direct checkins.
- - Use `args: [--branch, staging, --branch, master]` to set the branch.
- Both `master` and `main` are protected by default if no branch argument is set.
+ - Use `args: [--branch, staging, --branch, main]` to set the branch.
+ Both `main` and `master` are protected by default if no branch argument is set.
- `-b` / `--branch` may be specified multiple times to protect multiple
branches.
- `-p` / `--pattern` can be used to protect branches that match a supplied regex