Fix caps and improve Elisp highlighting

John Gardner
2021-12-22 15:31:06 +11:00
parent bd2b470afb
commit 2414bf1a29

@@ -8,7 +8,7 @@ This page lists various tips, tricks and user contributions. Feel free to add to
[@jrupp says](https://github.com/koalaman/shellcheck/issues/1126): [@jrupp says](https://github.com/koalaman/shellcheck/issues/1126):
I wrote a script to add shellcheck to any system running docker, without actually installing anything. I put this into `/usr/local/bin/shellcheck`: I wrote a script to add ShellCheck to any system running Docker, without actually installing anything. I put this into `/usr/local/bin/shellcheck`:
```sh ```sh
#!/bin/bash - #!/bin/bash -
@@ -16,7 +16,7 @@ for last; do true; done
docker run --rm -iv "$( cd "$( dirname -- "${last}" )" && pwd )":/mnt koalaman/shellcheck "${@:1:$(($#-1))}" "$(basename -- "${last}")" docker run --rm -iv "$( cd "$( dirname -- "${last}" )" && pwd )":/mnt koalaman/shellcheck "${@:1:$(($#-1))}" "$(basename -- "${last}")"
``` ```
This works on Docker for Mac as well as a linux system running docker. I have tested it when calling shellcheck in any of these forms: This works on Docker for Mac as well as a Linux system running Docker. I have tested it when calling `shellcheck` in any of these forms:
- `shellcheck filename.sh` - `shellcheck filename.sh`
- `shellcheck ../../filename.sh` - `shellcheck ../../filename.sh`
@@ -29,7 +29,7 @@ No modification of my editor settings was needed for this to integrate (I checke
[@pletnes says](https://github.com/koalaman/shellcheck/issues/1978): [@pletnes says](https://github.com/koalaman/shellcheck/issues/1978):
>I'd like to have a documented how-to for beginners on windows. Personally, I use docker in git-bash. I don't know if this is a "common setup". I came up with this first attempt, which could go into the wiki > I'd like to have a documented how-to for beginners on Windows. Personally, I use Docker in git-bash. I don't know if this is a "common setup". I came up with this first attempt, which could go into the wiki:
```sh ```sh
#!/bin/bash #!/bin/bash
@@ -40,9 +40,9 @@ exec docker run --rm -v "$(cygpath -aw .):/mnt" koalaman/shellcheck:stable "$@"
By [@matthewpersico](https://github.com/matthewpersico) By [@matthewpersico](https://github.com/matthewpersico)
This function and keymap add the ability to auto-insert the appropriate shellcheck disable directive in your script. With thanks to https://github.com/flycheck/flycheck/issues/1436 This function and keymap add the ability to auto-insert the appropriate `shellcheck disable=` directive in your script. With thanks to https://github.com/flycheck/flycheck/issues/1436
```lisp ```elisp
;; The following is thanks to https://github.com/flycheck/flycheck/issues/1436 ;; The following is thanks to https://github.com/flycheck/flycheck/issues/1436
(defun shellcheck-disable-error-at-point (&optional pos) (defun shellcheck-disable-error-at-point (&optional pos)
"Insert a shellcheck disable directive at the current error in the code." "Insert a shellcheck disable directive at the current error in the code."