Coder Social home page Coder Social logo

flymake-shellcheck's Introduction

flymake-shellcheck

MELPA License

An Emacs (26+) Flymake handler for bash/sh scripts, using 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. After that, you can install flymake-shellcheck by using the package-install command (make sure MELPA 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:

(add-hook 'sh-mode-hook 'flymake-shellcheck-load)

If you're using use-package, try this instead:

(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, default: nil).

License

Distributed under the GNU General Public License, version 3.

flymake-shellcheck's People

Contributors

astoff avatar federicotdn avatar lafrenierejm avatar melkor333 avatar morganjamessmith avatar

Watchers

 avatar

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.