Skip to content

Commit 6b03546

Browse files
authored
Merge pull request #815 from pre-commit/forbid-submodules
add forbid-submodules hook
2 parents 927380b + a9b6a7e commit 6b03546

File tree

2 files changed

+12
-0
lines changed

2 files changed

+12
-0
lines changed

.pre-commit-hooks.yaml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -156,6 +156,12 @@
156156
language: python
157157
entry: forbid-new-submodules
158158
types: [directory]
159+
- id: forbid-submodules
160+
name: forbid submodules
161+
description: forbids any submodules in the repository
162+
language: fail
163+
entry: 'submodules are not allowed in this repository:'
164+
types: [directory]
159165
- id: mixed-line-ending
160166
name: mixed line ending
161167
description: replaces or checks mixed line ending.

README.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -133,6 +133,12 @@ The following arguments are available:
133133
#### `forbid-new-submodules`
134134
Prevent addition of new git submodules.
135135

136+
This is intended as a helper to migrate away from submodules. If you want to
137+
ban them entirely use `forbid-submodules`
138+
139+
#### `forbid-submodules`
140+
forbids any submodules in the repository.
141+
136142
#### `mixed-line-ending`
137143
Replaces or checks mixed line ending.
138144
- `--fix={auto,crlf,lf,no}`

0 commit comments

Comments
 (0)