Skip to content

afadesigns/zshellcheck

Use this GitHub action with your project
Add this Action to an existing workflow or create a new one
View on Marketplace

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1,784 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
ZShellCheck

The quiet linter for a quiet shell.

Static analysis and auto-fix for the setopts, hooks, and globs Bash never learned.

CI Release Marketplace Auto-fix Go Report codecov Scorecard OpenSSF Best Practices SLSA

Install · User guide · Katas · Integrations · Roadmap · Changelog


See it in action

ZShellCheck demo

Install

# macOS, Linux, WSL
curl -fsSL https://raw.githubusercontent.com/afadesigns/zshellcheck/main/install.sh | bash
# Windows
irm https://raw.githubusercontent.com/afadesigns/zshellcheck/main/install.ps1 | iex
# Anywhere Go is installed
go install github.com/afadesigns/zshellcheck/cmd/zshellcheck@latest

--uninstall reverses any of them.

Native .deb, .rpm, .apk, and a multi-arch container at ghcr.io/afadesigns/zshellcheck ship on every release tag.

Pinning, cosign verification, and distro one-liners are in INSTALL.md.

Run

# Lint
zshellcheck path/to/script.zsh

# Write SARIF for GitHub Code Scanning
zshellcheck -severity warning -format sarif ./scripts > zshellcheck.sarif

# Preview every auto-fix as a unified diff
zshellcheck -diff path/to/script.zsh

# Apply the fixes
zshellcheck -fix path/to/script.zsh

Exits 0 on a clean run, 1 when anything was flagged. zshellcheck -h lists every flag, grouped by intent.

Silence inline with # noka: ZC1234. Bare # noka silences every kata on the line. Trailing, preceding, and file-wide forms are documented in USER_GUIDE.md.

CI/CD

# .github/workflows/lint.yml
- uses: afadesigns/zshellcheck@latest
  with:
    args: -format sarif -severity warning ./scripts
# .pre-commit-config.yaml
-   repo: https://github.com/afadesigns/zshellcheck
    rev: latest
    hooks:
      - id: zshellcheck

Pin to an exact tag for reproducible CI by replacing latest with the tag from Releases.

Integrations

ZShellCheck is verified against widely used Zsh frameworks, plugin managers, plugins, and prompts on every release. The full catalog with file counts lives in INTEGRATIONS.md.

Category Examples
Frameworks oh-my-zsh, prezto, zephyr, zimfw
Plugin managers antidote, zinit
Plugins zsh-syntax-highlighting, zsh-autosuggestions, zsh-autocomplete
Prompts powerlevel10k, spaceship-prompt, starship
Tooling fzf, fzf-tab, fast-syntax-highlighting

Documentation

Use it

  • INSTALL.md — install and uninstall paths for macOS, Windows, Linux, and Docker.
  • USER_GUIDE.md — CLI reference, configuration, inline directives, FAQ.
  • KATAS.md — every kata with description, severity, and auto-fix status.
  • INTEGRATIONS.md — verified Zsh frameworks, plugins, and prompts.

Develop with it

  • DEVELOPER.md — architecture, AST reference, kata authoring, auto-fix catalog.
  • REFERENCE.md — governance, glossary, ShellCheck comparison.
  • ROADMAP.md — LSP, distribution channels, plugin system.
  • CHANGELOG.md — per-release history.

Contribute

Contributing

Contributions of all kinds are welcome. Start with CONTRIBUTING.md.

License

ZShellCheck is licensed under the MIT License.

Credits

Authored and maintained by Andreas Fahl (@afadesigns). Inspired by ShellCheck.

Website GitHub LinkedIn Instagram Facebook

About

Static analysis and auto-fix for the setopts, hooks, and globs Bash never learned.

Topics

Resources

License

Code of conduct

Contributing

Security policy

Stars

Watchers

Forks

Sponsor this project

 

Packages

 
 
 

Contributors

Languages