GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — GitHub - fauust/pre-commit-shell: shell pre-commit hooks

BranchesTags
Open more actions menu

Latest commit

 

History

7 Commits
7 Commits

Folders and files

NameName
Last commit message
Last commit date
.github/workflows
.github/workflows
 
 
.pre-commit-config.yaml
.pre-commit-config.yaml
 
 
.pre-commit-hooks.yaml
.pre-commit-hooks.yaml
 
 
LICENSE
LICENSE
 
 
README.md
README.md
 
 
shellcheck.sh
shellcheck.sh
 
 
shfmt.sh
shfmt.sh
 
 

Repository files navigation

pre-commit-shell hooks

pre-commit pre-commit

pre-commit hooks which runs the following programs on shell script files:

  • shellcheck;
  • shfmt.

Usage

.pre-commit-config.yaml example:

- repo: https://github.com/fauust/pre-commit-shell
  rev: v1.0
  hooks:
    - id: shellcheck
      args: ["-x"]
    - id: shfmt
      args: ["-d", "-i", "2", "-ci"]

shfmt and shellcheck tools must be installed separately.

Alternative using docker (for CI systems)

For CI systems or if you don't want to install the tools locally, you can use the docker official images:

  • shellcheck;
  • shfmt.
- repo: local
  hooks:
    - id: docker-shell-shellcheck
      name: Run shellcheck with docker
      language: docker_image
      entry: koalaman/shellcheck:stable
      types: [shell]
    - id: docker-shell-shfmt
      name: Run shfmt with docker
      entry: mvdan/shfmt:latest -d -i 2 -ci
      language: docker_image
      types: [shell]

About

shell pre-commit hooks

Resources

Readme
GPL-3.0 license
Activity

Stars

0 stars

Watchers

1 watching

Forks

0 forks
Report repository

Releases

Packages

Contributors

Languages

You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.