Skip to content
Snippets Groups Projects
Commit 8687e0d9 authored by nimrod's avatar nimrod
Browse files

- Updated pre-commit hooks versions.

- Use types instead of files regex, set minimal version of pre-commit to
0.15.0 accordingly.
- Now that the minimum version of pre-commit is 0.15.0, remove legacy
hooks.yaml file.
- Updated README.
- Bumped minore version.
parent 7f5cc24a
No related branches found
No related tags found
No related merge requests found
---
- repo: git://github.com/pre-commit/pre-commit-hooks
sha: v0.7.1
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
sha: v1.1.1
hooks:
- id: check-added-large-files
- id: check-yaml
......
hooks.yaml
\ No newline at end of file
---
- id: shell-lint
name: Lint shell scripts
description: Run /bin/sh -en against shell scripts.
language: script
entry: ./shell-lint
types: [shell]
minimum_pre_commit_version: 0.15.0 # Because of types.
- id: shellcheck
name: shellcheck
description: A shell script static analysis tool
language: system
entry: shellcheck
args: ['--external-sources']
types: [shell]
minimum_pre_commit_version: 0.15.0 # Because of types.
Shell lint pre-commit hook
##########################
Shell pre-commit hooks
######################
.. image:: https://travis-ci.org/adarnimrod/shell-pre-commit.svg?branch=master
:target: https://travis-ci.org/adarnimrod/shell-pre-commit
Shell lint `pre-commit <http://pre-commit.com/>`_ hook. The hook runs
:code:`/bin/sh -en` against found shell scripts.
Shell `pre-commit <http://pre-commit.com/>`_ hooks.
Hooks
-----
- :code: `shell-lint` - Runs :code:`/bin/sh -en` against identified shell
scripts.
- :code: `shellcheck` - Runs `shellcheck
<https://github.com/koalaman/shellcheck/>`_ agains identified shell scripts.
Dependencies
------------
- :code: `/bin/sh`
- Pre-commit
- :code: `shellcheck`
- Pre-commit 0.15.0 or later.
Installation
------------
......@@ -21,7 +29,7 @@ Add the following to your :code:`.pre-commit-config.yaml`:
.. code:: yaml
- repo: https://www.shore.co.il/git/shell-pre-commit/
sha: v0.4.0
sha: v0.6.0
hooks:
- id: shell-lint
- id: shellcheck
......
0.5.4
\ No newline at end of file
0.6.0
\ No newline at end of file
---
- id: shell-lint
name: Lint shell scripts
description: Run /bin/sh -en against shell scripts.
language: script
entry: ./shell-lint
files: &shell_scripts \.(sh|bash|ksh|zsh)$
- id: shellcheck
name: shellcheck
description: A shell script static analysis tool
language: system
entry: shellcheck
args: ['--external-sources']
files: *shell_scripts
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment