mirror of
https://github.com/koalaman/shellcheck.git
synced 2025-10-03 11:19:45 +08:00
Fix caps and improve Elisp highlighting
12
Contrib.md
12
Contrib.md
@@ -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):
|
||||
|
||||
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
|
||||
#!/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}")"
|
||||
```
|
||||
|
||||
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`
|
||||
@@ -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):
|
||||
|
||||
>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
|
||||
#!/bin/bash
|
||||
@@ -40,9 +40,9 @@ exec docker run --rm -v "$(cygpath -aw .):/mnt" koalaman/shellcheck:stable "$@"
|
||||
|
||||
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
|
||||
(defun shellcheck-disable-error-at-point (&optional pos)
|
||||
"Insert a shellcheck disable directive at the current error in the code."
|
||||
@@ -86,4 +86,4 @@ This function and keymap add the ability to auto-insert the appropriate shellche
|
||||
|
||||
### JetBrains Webstorm Integration
|
||||
|
||||
Scroll to the bottom of [Issue #360](https://github.com/koalaman/shellcheck/issues/360) for both a plugin and a native external command solution.
|
||||
Scroll to the bottom of [Issue #360](https://github.com/koalaman/shellcheck/issues/360) for both a plugin and a native external command solution.
|
||||
|
Reference in New Issue
Block a user