speckle-server/.pre-commit-config.yaml

56 строки
1.6 KiB
YAML
Исходник Обычный вид История

gergo/pre commit (#906) * Adds hadolint as pre-commit * Addresses all hadolint comments * Hadolint docker works when entrypoint explicitly provided * Use noninteractive apt-get frontend and clean after install * build(circleci): filters for pre-commit should be same as for test-server * remove cache prefix as not currently necessary due to pre-commit-config.yaml changing * build(circleci): enable remote docker for pre-commit * build(circleci): use speckle pre-commit runner with built-in hadolint * build(server): dockerfile RUN statements are consolidated Each RUN statement in a Dockerfile creates a new layer. Hadolint rule DL3059 suggests they should be consolidated. * build(server): dockerfile RUN statements are consolidated Each RUN statement in a Dockerfile creates a new layer. Hadolint rule DL3059 suggests they should be consolidated. * Improve husky bash script to catch errors * Integrates pre-commit with husky * pre-commit should now be run by husky on every commit * pre-commit which requires additional installed dependencies is moved to separate file * Update README for revised developer instructions * Updates pre-commit yarn script * refactor(pre-commit): make everyone happy with loosly integrating husky and pre-commit scripts * chore(clean up pre-commit configs): clean some more pre-commit mess * chore(pre-commit): run pre-commit in ci too * fix(husky pre-commit): fix ci build husky invocation, the script is not commited to git * fix(circleci config): install yarn packages for linting in pre-commit * fix(pre-commit): fix shellcheck disable comment placement * fix(pre-commit): add shellcheck ignore * fix(pre-commit husyk): fix shellcheck ignore version Co-authored-by: Iain Sproat <68657+iainsproat@users.noreply.github.com>
2022-08-11 14:49:47 +03:00
# pre-commit for deployment related resources
# e.g. shell files, dockerfiles, helm chart etc..
repos:
gergo/pre commit (#906) * Adds hadolint as pre-commit * Addresses all hadolint comments * Hadolint docker works when entrypoint explicitly provided * Use noninteractive apt-get frontend and clean after install * build(circleci): filters for pre-commit should be same as for test-server * remove cache prefix as not currently necessary due to pre-commit-config.yaml changing * build(circleci): enable remote docker for pre-commit * build(circleci): use speckle pre-commit runner with built-in hadolint * build(server): dockerfile RUN statements are consolidated Each RUN statement in a Dockerfile creates a new layer. Hadolint rule DL3059 suggests they should be consolidated. * build(server): dockerfile RUN statements are consolidated Each RUN statement in a Dockerfile creates a new layer. Hadolint rule DL3059 suggests they should be consolidated. * Improve husky bash script to catch errors * Integrates pre-commit with husky * pre-commit should now be run by husky on every commit * pre-commit which requires additional installed dependencies is moved to separate file * Update README for revised developer instructions * Updates pre-commit yarn script * refactor(pre-commit): make everyone happy with loosly integrating husky and pre-commit scripts * chore(clean up pre-commit configs): clean some more pre-commit mess * chore(pre-commit): run pre-commit in ci too * fix(husky pre-commit): fix ci build husky invocation, the script is not commited to git * fix(circleci config): install yarn packages for linting in pre-commit * fix(pre-commit): fix shellcheck disable comment placement * fix(pre-commit): add shellcheck ignore * fix(pre-commit husyk): fix shellcheck ignore version Co-authored-by: Iain Sproat <68657+iainsproat@users.noreply.github.com>
2022-08-11 14:49:47 +03:00
- repo: https://github.com/hadolint/hadolint
rev: 'v2.10.0'
hooks:
gergo/pre commit (#906) * Adds hadolint as pre-commit * Addresses all hadolint comments * Hadolint docker works when entrypoint explicitly provided * Use noninteractive apt-get frontend and clean after install * build(circleci): filters for pre-commit should be same as for test-server * remove cache prefix as not currently necessary due to pre-commit-config.yaml changing * build(circleci): enable remote docker for pre-commit * build(circleci): use speckle pre-commit runner with built-in hadolint * build(server): dockerfile RUN statements are consolidated Each RUN statement in a Dockerfile creates a new layer. Hadolint rule DL3059 suggests they should be consolidated. * build(server): dockerfile RUN statements are consolidated Each RUN statement in a Dockerfile creates a new layer. Hadolint rule DL3059 suggests they should be consolidated. * Improve husky bash script to catch errors * Integrates pre-commit with husky * pre-commit should now be run by husky on every commit * pre-commit which requires additional installed dependencies is moved to separate file * Update README for revised developer instructions * Updates pre-commit yarn script * refactor(pre-commit): make everyone happy with loosly integrating husky and pre-commit scripts * chore(clean up pre-commit configs): clean some more pre-commit mess * chore(pre-commit): run pre-commit in ci too * fix(husky pre-commit): fix ci build husky invocation, the script is not commited to git * fix(circleci config): install yarn packages for linting in pre-commit * fix(pre-commit): fix shellcheck disable comment placement * fix(pre-commit): add shellcheck ignore * fix(pre-commit husyk): fix shellcheck ignore version Co-authored-by: Iain Sproat <68657+iainsproat@users.noreply.github.com>
2022-08-11 14:49:47 +03:00
- id: hadolint
# Cannot use official repo as it relies on Docker, which cannot be supported by either pre-commit.ci or CircleCI
- repo: https://github.com/Jarmos-san/shellcheck-precommit
rev: 'v0.2.0'
hooks:
- id: shellcheck-system
name: shellcheck
- repo: https://github.com/syntaqx/git-hooks
rev: 'v0.0.17'
hooks:
- id: circleci-config-validate
- repo: https://github.com/specklesystems/pre-commit
rev: '0.2.0'
hooks:
- id: ggshield-not-ci
- repo: https://github.com/psf/black
rev: '22.10.0'
hooks:
- id: black # python formatter
name: black (python formatter)
- repo: https://github.com/charliermarsh/ruff-pre-commit
rev: v0.0.170
hooks:
- id: ruff
name: ruff (python linter)
args:
- --ignore=E501 # ignoring error about lines that are too long
- repo: local
hooks:
- id: helm-documentation
name: Helm Json Schema
language: system
files: utils\/helm\/speckle\-server\/values\.yaml
entry: utils/helm/update-schema-json.sh
description: If this fails it is because the values.yaml file was updated. Or has missing or incorrect documentation.
# helmlint should occur after the json schema is updated
- repo: https://github.com/gruntwork-io/pre-commit
rev: 'v0.1.17'
hooks:
- id: helmlint
ci:
autoupdate_schedule: quarterly