Skip to content

Commit

Permalink
Update README.md and flymake-bashate-setup
Browse files Browse the repository at this point in the history
  • Loading branch information
jamescherti committed Sep 2, 2024
1 parent 2339c28 commit 787f352
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 16 deletions.
21 changes: 8 additions & 13 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
# flymake-bashate.el
[![MELPA](https://melpa.org/packages/flymake-bashate-badge.svg)](https://melpa.org/#/flymake-bashate)
![Build Status](https://github.com/jamescherti/flymake-bashate.el/actions/workflows/ci.yml/badge.svg)
![License](https://img.shields.io/github/license/jamescherti/flymake-bashate.el)
![](https://raw.githubusercontent.com/jamescherti/flymake-bashate.el/main/.images/made-for-gnu-emacs.svg)
Expand All @@ -7,22 +8,15 @@ The `flymake-bashate` Emacs package provides a Flymake backend for the `bashate`

## Installation

### Install using straight

To install the `flymake-bashate` using straight.el`:

1. If you haven't already done so, [add the straight.el bootstrap code](https://github.com/radian-software/straight.el?tab=readme-ov-file#getting-started) to your init file.

2. Add the following code to your Emacs init file:
To install the `flymake-bashate` from MELPA by adding the following code to your Emacs init file:
```emacs-lisp
(use-package flymake-bashate
:ensure t
:straight (flymake-bashate
:type git
:host github
:repo "jamescherti/flymake-bashate.el")
:hook ((sh-mode . flymake-bashate-setup)
(bash-ts-mode . flymake-bashate-setup)))
:commands flymake-bashate-setup
:hook (((bash-ts-mode sh-mode) . flymake-bashate-setup)
((bash-ts-mode sh-mode) . flymake-mode))
:custom
(flymake-bashate-max-line-length 80))
```

## Customization
Expand Down Expand Up @@ -69,6 +63,7 @@ You should have received a copy of the GNU General Public License along with thi
## Links

- [flymake-bashate.el @GitHub](https://github.com/jamescherti/flymake-bashate.el)
- [Bashate @MELPA](https://melpa.org/#/flymake-bashate)
- [Bashate @GitHub](https://github.com/openstack/bashate)

Other Emacs packages by the same author:
Expand Down
5 changes: 2 additions & 3 deletions flymake-bashate.el
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
;; along with GNU Emacs. If not, see <https://www.gnu.org/licenses/>.

;;; Commentary:
;; `flymake-bashate' is a Flymake handler for Emacs that checks Bash code style
;; `flymake-bashate' is a Flymake backend that checks Bash code style
;; using Bashate.
;;
;; (Bashate is a Bash script syntax checker, enforcing a set of style and syntax
Expand Down Expand Up @@ -108,8 +108,7 @@ environment variable."
;;;###autoload
(defun flymake-bashate-setup ()
"Enable Flymake and flymake-bashate."
(add-hook 'flymake-diagnostic-functions 'flymake-bashate-backend nil t)
(flymake-mode t))
(add-hook 'flymake-diagnostic-functions #'flymake-bashate-backend nil t))

(provide 'flymake-bashate)
;;; flymake-bashate.el ends here

0 comments on commit 787f352

Please sign in to comment.