Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/federicotdn/flymake-shellcheck
A ShellCheck-powered backend for Flymake
https://github.com/federicotdn/flymake-shellcheck
bash emacs flymake sh shell shellcheck
Last synced: 2 months ago
JSON representation
A ShellCheck-powered backend for Flymake
- Host: GitHub
- URL: https://github.com/federicotdn/flymake-shellcheck
- Owner: federicotdn
- License: gpl-3.0
- Created: 2018-08-21T14:54:48.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2024-06-26T21:22:42.000Z (7 months ago)
- Last Synced: 2024-11-09T19:11:49.098Z (3 months ago)
- Topics: bash, emacs, flymake, sh, shell, shellcheck
- Language: Emacs Lisp
- Homepage:
- Size: 34.2 KB
- Stars: 53
- Watchers: 3
- Forks: 7
- Open Issues: 4
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# flymake-shellcheck (maintenance mode)
[![MELPA](https://melpa.org/packages/flymake-shellcheck-badge.svg)](https://melpa.org/#/flymake-shellcheck)
![License](https://img.shields.io/github/license/federicotdn/flymake-shellcheck.svg)> **Note:** If you're using Emacs version 29 or higher, installing this package is not necessary, as the Flymake-Shellcheck integration is now built-in into the editor. This project is now in maintenance mode; no new features or enhancements will be made for it, unless they are required for security reasons.
An Emacs (26+) Flymake handler for bash/sh scripts, using [ShellCheck](https://github.com/koalaman/shellcheck). Installing Flymake is not necessary as it is included with Emacs itself.
## Installation
First, make sure ShellCheck is installed by following [the installation guide](https://github.com/koalaman/shellcheck#installing). After that, you can install `flymake-shellcheck` by using the `package-install` command (make sure [MELPA](https://melpa.org/) is included in your package sources):M-x `package-install` RET `flymake-shellcheck` RET
Alternatively, you can just add `flymake-shellcheck.el` to your `load-path`.
## Usage
To enable the Flymake backend whenever a bash or sh script is visited, add the following to your `init.el` file:```elisp
(add-hook 'sh-mode-hook 'flymake-shellcheck-load)
```If you're using [`use-package`](https://github.com/jwiegley/use-package), try this instead:
```elisp
(use-package flymake-shellcheck
:commands flymake-shellcheck-load
:init
(add-hook 'sh-mode-hook 'flymake-shellcheck-load))
```After opening a shell/sh file, remember to enable Flymake:
M-x `flymake-mode` RET
## Customization
- You can set the `flymake-shellcheck-program` variable to the path of the ShellCheck executable in your system, in case `executable-find` wasn't able to find it automatically.
- You can set the `flymake-shellcheck-use-file` variable to `nil` if you wish to run the syntax checker on the contents of the buffer, rather than the contents of the file on disk (default: `t`).
- You can set the `flymake-shellcheck-allow-external-files` variable to `t` if you want to allow shellcheck to read external sources (it adds `-x` as argument, described in [the SC1091 docs](https://github.com/koalaman/shellcheck/wiki/SC1091), default: `nil`).## License
Distributed under the GNU General Public License, version 3.