mirror of
https://github.com/jupyter/docker-stacks.git
synced 2025-10-13 13:02:56 +00:00
pre-commit: refactor config and add inline comment
This commit is contained in:

committed by
Erik Sundell

parent
b7087c5053
commit
bb756586b8
@@ -9,47 +9,65 @@ repos:
|
|||||||
hooks:
|
hooks:
|
||||||
- id: black
|
- id: black
|
||||||
args: [--target-version=py36]
|
args: [--target-version=py36]
|
||||||
|
|
||||||
|
# Autoformat: Python code
|
||||||
|
- repo: https://github.com/pre-commit/mirrors-autopep8
|
||||||
|
rev: v1.5.7
|
||||||
|
hooks:
|
||||||
|
- id: autopep8
|
||||||
|
|
||||||
|
# Autoformat: YAML, JSON, Markdown, etc.
|
||||||
|
- repo: https://github.com/pre-commit/mirrors-prettier
|
||||||
|
rev: v2.3.2
|
||||||
|
hooks:
|
||||||
|
- id: prettier
|
||||||
|
|
||||||
|
# Check: YAML
|
||||||
- repo: https://github.com/pre-commit/pre-commit-hooks
|
- repo: https://github.com/pre-commit/pre-commit-hooks
|
||||||
rev: v4.0.1
|
rev: v4.0.1
|
||||||
hooks:
|
hooks:
|
||||||
- id: check-yaml
|
- id: check-yaml
|
||||||
files: .*\.(yaml|yml)$
|
files: .*\.(yaml|yml)$
|
||||||
|
|
||||||
|
# Lint: Dockerfile
|
||||||
- repo: https://github.com/hadolint/hadolint.git
|
- repo: https://github.com/hadolint/hadolint.git
|
||||||
rev: v2.5.0
|
rev: v2.5.0
|
||||||
hooks:
|
hooks:
|
||||||
- id: hadolint-docker
|
- id: hadolint-docker
|
||||||
# FIXME: remove after https://github.com/hadolint/hadolint/issues/628 is resolved
|
# FIXME: remove after https://github.com/hadolint/hadolint/issues/628 is resolved
|
||||||
entry: hadolint/hadolint:v2.5.0 hadolint
|
entry: hadolint/hadolint:v2.5.0 hadolint
|
||||||
|
|
||||||
|
# Lint: YAML
|
||||||
- repo: https://github.com/adrienverge/yamllint.git
|
- repo: https://github.com/adrienverge/yamllint.git
|
||||||
rev: v1.26.1
|
rev: v1.26.1
|
||||||
hooks:
|
hooks:
|
||||||
- id: yamllint
|
- id: yamllint
|
||||||
args: ["-d {extends: relaxed, rules: {line-length: disable}}", "-s"]
|
args: ["-d {extends: relaxed, rules: {line-length: disable}}", "-s"]
|
||||||
files: \.(yaml|yml)$
|
files: \.(yaml|yml)$
|
||||||
|
|
||||||
|
# Lint: Bash scripts
|
||||||
- repo: https://github.com/openstack-dev/bashate.git
|
- repo: https://github.com/openstack-dev/bashate.git
|
||||||
rev: 2.0.0
|
rev: 2.0.0
|
||||||
hooks:
|
hooks:
|
||||||
- id: bashate
|
- id: bashate
|
||||||
args: ["--ignore=E006"]
|
args: ["--ignore=E006"]
|
||||||
|
|
||||||
|
# Lint: Shell scripts
|
||||||
- repo: https://github.com/shellcheck-py/shellcheck-py
|
- repo: https://github.com/shellcheck-py/shellcheck-py
|
||||||
rev: v0.7.2.1
|
rev: v0.7.2.1
|
||||||
hooks:
|
hooks:
|
||||||
- id: shellcheck
|
- id: shellcheck
|
||||||
args: ["-x"]
|
args: ["-x"]
|
||||||
|
|
||||||
|
# Lint: Python
|
||||||
- repo: https://github.com/PyCQA/flake8
|
- repo: https://github.com/PyCQA/flake8
|
||||||
rev: 3.9.2
|
rev: 3.9.2
|
||||||
hooks:
|
hooks:
|
||||||
- id: flake8
|
- id: flake8
|
||||||
- repo: https://github.com/pre-commit/mirrors-autopep8
|
|
||||||
rev: v1.5.7
|
# Lint: Markdown
|
||||||
hooks:
|
|
||||||
- id: autopep8
|
|
||||||
- repo: https://github.com/igorshubovych/markdownlint-cli
|
- repo: https://github.com/igorshubovych/markdownlint-cli
|
||||||
rev: v0.27.1
|
rev: v0.27.1
|
||||||
hooks:
|
hooks:
|
||||||
- id: markdownlint
|
- id: markdownlint
|
||||||
args: ["--fix"]
|
args: ["--fix"]
|
||||||
- repo: https://github.com/pre-commit/mirrors-prettier
|
|
||||||
rev: v2.3.2
|
|
||||||
hooks:
|
|
||||||
- id: prettier
|
|
||||||
|
Reference in New Issue
Block a user