Giter Site home page Giter Site logo

anadea / pre-commit-config-shellcheck Goto Github PK

View Code? Open in Web Editor NEW
8.0 5.0 0.0 184 KB

Tool for checking entry points in the pre-commit config with ShellCheck.

License: MIT License

Shell 0.39% Makefile 6.50% Python 93.11%
config pre-commit shellcheck pre-commit-config pre-commit-config-shellcheck

pre-commit-config-shellcheck's Introduction

pre-commit-config-shellcheck documentation

GitHub Coveralls License Version Supported Python version Package format Python wheel support Package status

pre-commit-config-shellcheck is a tool for checking entry points in the pre-commit config with ShellCheck.

In order to use the tool you should first clone it from the source:

$ git clone https://github.com/Anadea/pre-commit-config-shellcheck.git

Then you should install project dependencies with

$ python ./setup.py install

or

$ pip install pre-commit-config-shellcheck

The installation is done and as simple as that.

To run the program you should start it from the terminal and provide a config file to check:

$ pre_commit_config_shellcheck.py .pre-commit-config.yaml

You could change a default ShellCheck call with directory access with the -s or --shellcheck argument:

$ pre_commit_config_shellcheck.py .pre-commit-config.yaml -s /bin/shellcheck

The output from tool usage is sent to the stdout or stderr depending on the operation result.

Also, it can be used as a pre-commit hook out of the box. Just add it to yours .pre-commit-config.yaml:

- repo: "https://github.com/Anadea/pre-commit-config-shellcheck"
  rev: "0.3.4"
    hooks:
      - id: "pre-commit-config-shellcheck"

Also, it can be used as a GitHub action out of the box. Just add it to yours workflow:

- name: "pre-commit-config-shellcheck"
  uses: "actions/[email protected]"
  id: "pre-commit-config-shellcheck"
  with:
    config: ".pre-commit-config.yaml"
cp .env.example .env
  • Install development dependencies:
make install
  • Create your fix/feature branch:
git checkout -b my-new-fix-or-feature
  • Check code style and moreover:
make check
  • Run tests:
make test
  • Push to the branch:
git push origin my-new-fix-or-feature

pre-commit-config-shellcheck uses the MIT license. Please check the MIT-LICENSE file for more details.

Project Website: https://github.com/Anadea/pre-commit-config-shellcheck/

Author: Anadea

For contributors list see CONTRIBUTORS file.

pre-commit-config-shellcheck's People

Contributors

vint21h avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

pre-commit-config-shellcheck's Issues

Doesn't work as a pre-commit hook

Hi, when running it manually against the .pre-commit-config.yaml it works, but as a pre-commit hook it cannot find the file. Any suggestion? Is it because the file is git ignored? Many thanks

$ git commit -m 'test'
pre-commit-config-shellcheck.........................(no files to check)Skipped

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.