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

Migration.

- Common pre-commit config from snippet.
- Migrate from Travis CI to GitLab CI.
- Convert README from reStructuredtext to markdown.
parent 2765b1d2
No related branches found
No related tags found
No related merge requests found
Pipeline #300 passed
---
include:
- project: shore/ci-templates
file: templates/pre-commit.yml
--- ---
repos: repos:
- repo: https://github.com/pre-commit/pre-commit-hooks - repo: https://github.com/pre-commit/pre-commit-hooks.git
rev: v1.3.0 rev: v3.4.0
hooks: hooks:
- id: check-added-large-files - id: check-added-large-files
- id: check-yaml - id: check-executables-have-shebangs
- id: check-merge-conflict - id: check-merge-conflict
- id: check-symlinks
- id: trailing-whitespace
- repo: https://github.com/Yelp/detect-secrets
rev: v0.14.3
hooks:
- id: detect-secrets
- repo: https://github.com/adrienverge/yamllint
rev: v1.25.0
hooks:
- id: yamllint
- repo: https://github.com/amperser/proselint/
rev: 0.10.2
hooks:
- id: proselint
types: [plain-text]
exclude: LICENSE
- repo: https://github.com/executablebooks/mdformat.git
rev: 0.5.3
hooks:
- id: mdformat
- repo: https://git.shore.co.il/nimrod/shell-pre-commit.git - repo: https://git.shore.co.il/nimrod/shell-pre-commit.git
rev: v0.6.0 rev: v0.6.0
hooks: hooks:
- id: shell-lint - id: shell-lint
- repo: https://github.com/shellcheck-py/shellcheck-py.git
rev: v0.7.1.1
hooks:
- id: shellcheck - id: shellcheck
- repo: https://github.com/pre-commit/pre-commit.git
rev: v2.9.3
hooks:
- id: validate_manifest
---
language: python
python: "3.6"
dist: trusty
sudo: false
group: beta
cache:
- pip
- directories:
- $HOME/.cache/
install:
- pip install pre_commit | cat
script:
- pre-commit run --all-files
notifications:
on_failure: never
email: false
# Shell pre-commit hooks
[![pipeline status](https://git.shore.co.il/nimrod/shell-pre-commit/badges/master/pipeline.svg)](https://git.shore.co.il/nimrod/shell-pre-commit/-/commits/master)
Shell [pre-commit](http://pre-commit.com/) hooks.
## Usage
Add the following to your `.pre-commit-config.yaml`:
```yaml
- repo: https://git.shore.co.il/nimrod/shell-pre-commit.git
sha: v0.6.0
hooks:
- id: shell-lint
- id: shellcheck
```
The minimal pre-commit version required is 0.15.0. The `shellcheck` hook
requires [shellcheck](https://www.shellcheck.net/) installed.
## License
This software is licensed under the MIT license (see `LICENSE.txt`).
## Author Information
Nimrod Adar, [contact me](mailto:nimrod@shore.co.il) or visit my
[website](https://www.shore.co.il/). Patches are welcome via
[`git send-email`](http://git-scm.com/book/en/v2/Git-Commands-Email). The repository
is located at: <https://git.shore.co.il/expore/>.
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 `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`
- :code: `shellcheck`
- Pre-commit 0.15.0 or later.
Installation
------------
Add the following to your :code:`.pre-commit-config.yaml`:
.. code:: yaml
- repo: https://git.shore.co.il/nimrod/shell-pre-commit.git
sha: v0.6.0
hooks:
- id: shell-lint
- id: shellcheck
And run :code:`pre-commit autoupdate` to update the hooks.
License
-------
This software is licensed under the MIT license (see the :code:`LICENSE.txt`
file).
Author Information
------------------
Nimrod Adar, `contact me <nimrod@shore.co.il>`_ or visit my `website
<https://www.shore.co.il/>`_. Patches are welcome via `git send-email
<http://git-scm.com/book/en/v2/Git-Commands-Email>`_. The repository is located
at: https://git.shore.co.il/.
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment