From a9b6a7e7fa51df6e93780b2e7dd15a0d5b943ba0 Mon Sep 17 00:00:00 2001 From: Anthony Sottile Date: Tue, 4 Oct 2022 15:56:38 -0400 Subject: [PATCH] add forbid-submodules hook --- .pre-commit-hooks.yaml | 6 ++++++ README.md | 6 ++++++ 2 files changed, 12 insertions(+) diff --git a/.pre-commit-hooks.yaml b/.pre-commit-hooks.yaml index 1a6056bd..f8523d4a 100644 --- a/.pre-commit-hooks.yaml +++ b/.pre-commit-hooks.yaml @@ -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. diff --git a/README.md b/README.md index 411529a0..1026d3fd 100644 --- a/README.md +++ b/README.md @@ -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}`