Skip to content

Commit

Permalink
Merge pull request #815 from pre-commit/forbid-submodules
Browse files Browse the repository at this point in the history
add forbid-submodules hook
  • Loading branch information
asottile authored Oct 5, 2022
2 parents 927380b + a9b6a7e commit 6b03546
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 0 deletions.
6 changes: 6 additions & 0 deletions .pre-commit-hooks.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -156,6 +156,12 @@
language: python
entry: forbid-new-submodules
types: [directory]
- id: forbid-submodules
name: forbid submodules
description: forbids any submodules in the repository
language: fail
entry: 'submodules are not allowed in this repository:'
types: [directory]
- id: mixed-line-ending
name: mixed line ending
description: replaces or checks mixed line ending.
Expand Down
6 changes: 6 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -133,6 +133,12 @@ The following arguments are available:
#### `forbid-new-submodules`
Prevent addition of new git submodules.

This is intended as a helper to migrate away from submodules. If you want to
ban them entirely use `forbid-submodules`

#### `forbid-submodules`
forbids any submodules in the repository.

#### `mixed-line-ending`
Replaces or checks mixed line ending.
- `--fix={auto,crlf,lf,no}`
Expand Down

0 comments on commit 6b03546

Please sign in to comment.