Skip to content

Commit 24ecab8

Browse files
authored
Exclude migrations, vendor, .min.js, .svg, and static/*.js from pre-commit (#211)
* Exclude vendor, .min.js, .svg, and static/*.js from pre-commit Those files are copied from other sources or edited by other tools and IMHO not subject for pre-commit handling. Refs: - readthedocs/readthedocs.org#11200 - readthedocs/readthedocs.org#11199 * Exclude migrations from isort, black, and pre-commit-hooks tuneups
1 parent f47b4b5 commit 24ecab8

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

pre-commit-config.yaml

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
exclude: '^$|settings|scripts'
1+
exclude: '^$|settings|scripts|vendor|\.(min\.js|svg)$|static/.*\.js$'
22
fail_fast: false
33
repos:
44

@@ -33,6 +33,7 @@ repos:
3333
.+\.svg|
3434
.+\.js|
3535
.+\.css|
36+
.*/migrations/.*|
3637
)$
3738
- id: mixed-line-ending
3839
args: ['--fix=lf']
@@ -68,6 +69,7 @@ repos:
6869
exclude: |
6970
(?x)^(
7071
readthedocs/rtd_tests/files/conf.py|
72+
.*/migrations/.*
7173
)$
7274
7375
# NOTE: run `isort` after `black` to keep the format of isort finally
@@ -76,6 +78,10 @@ repos:
7678
hooks:
7779
- id: isort
7880
name: isort (python)
81+
exclude: |
82+
(?x)^(
83+
.*/migrations/.*
84+
)
7985
8086
- repo: https://github.com/asottile/blacken-docs
8187
rev: 1.16.0

0 commit comments

Comments
 (0)