Skip to content

Commit

Permalink
[dev-image] Add support for pre-commit
Browse files Browse the repository at this point in the history
  • Loading branch information
aledbf committed Jun 15, 2021
1 parent 9681a2b commit 7b003db
Show file tree
Hide file tree
Showing 2 changed files with 28 additions and 0 deletions.
24 changes: 24 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.0.0
hooks:
#- id: check-yaml
# args: [--allow-multiple-documents]
# - id: end-of-file-fixer
- id: trailing-whitespace
- id: check-symlinks
- id: mixed-line-ending

# keep fork in sync!
- repo: https://github.com/gitpod-io/pre-commit-hooks
rev: "2.1.5"
hooks:
- id: forbid-binary
exclude: |
(?x)^(
.*example-layer.tar.gz|
.*\.(png|svg|ico|gpg)
)$
- id: script-must-have-extension
- id: shellcheck
args: [-e, "SC1090,SC1091"]
4 changes: 4 additions & 0 deletions dev/image/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -190,3 +190,7 @@ ENV PATH=$PATH:$HOME/.aws-iam:$HOME/.terraform
# https://about.codecov.io/blog/introducing-codecovs-new-uploader
RUN sudo curl -fsSL https://uploader.codecov.io/latest/codecov-linux -o /usr/local/bin/codecov \
&& sudo chmod +x /usr/local/bin/codecov

# Install pre-commit https://pre-commit.com/#install
RUN sudo install-packages shellcheck \
&& sudo pip3 install pre-commit

0 comments on commit 7b003db

Please sign in to comment.