Skip to content

Commit

Permalink
ci: use shellcheck-py in order to run it on pre-commit.ci (#451)
Browse files Browse the repository at this point in the history
  • Loading branch information
andreoliwa committed Jan 29, 2022
1 parent 53701b9 commit 19ad1fb
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 7 deletions.
7 changes: 3 additions & 4 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,7 @@ default_language_version:

# https://pre-commit.ci/#configuration
ci:
# TODO: ci: use shellcheck-py to run shellcheck on pre-commit.ci
skip: [local-nitpick, autofix-docs, pylint, shellcheck]
skip: [local-nitpick, autofix-docs, pylint]

repos:
- repo: local
Expand Down Expand Up @@ -144,8 +143,8 @@ repos:
- id: bandit
args: [--ini, setup.cfg]
exclude: tests/
- repo: https://github.com/jumanjihouse/pre-commit-hooks
rev: 2.1.5
- repo: https://github.com/shellcheck-py/shellcheck-py
rev: v0.8.0.3
hooks:
- id: shellcheck
- repo: https://github.com/openstack/bashate
Expand Down
6 changes: 4 additions & 2 deletions src/nitpick/resources/shell/shellcheck.toml
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,10 @@ url = "https://github.com/koalaman/shellcheck"
enabled = true

[[".pre-commit-config.yaml".repos]]
repo = "https://github.com/jumanjihouse/pre-commit-hooks"
# This repo installs the "shellcheck" executable, and this is needed in order to run it on https://pre-commit.ci.
# The previous hook I used (https://github.com/jumanjihouse/pre-commit-hooks) didn't do that, and fails with the error
# "This check needs shellcheck from https://github.com/koalaman/shellcheck"
repo = "https://github.com/shellcheck-py/shellcheck-py"

[[".pre-commit-config.yaml".repos.hooks]]
# https://github.com/jumanjihouse/pre-commit-hooks#shellcheck
id = "shellcheck"
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
repos:
- repo: https://github.com/jumanjihouse/pre-commit-hooks
- repo: https://github.com/shellcheck-py/shellcheck-py
hooks:
- id: shellcheck

0 comments on commit 19ad1fb

Please sign in to comment.