File tree Expand file tree Collapse file tree 1 file changed +24
-0
lines changed
Expand file tree Collapse file tree 1 file changed +24
-0
lines changed Original file line number Diff line number Diff line change 1+ #! /usr/bin/env bash
2+ #
3+ # Running GitHub Super-Linter Locally
4+ # https://github.com/github/super-linter/blob/main/docs/run-linter-locally.md
5+
6+ export SUPERLINTER_IMAGE=" ${SUPERLINTER_IMAGE:- " github/super-linter" } "
7+ export SUPERLINTER_VERSION=" ${SUPERLINTER_VERSION:- " slim-latest" } "
8+
9+ main () {
10+ if [ " $( whoami) " == " runner" ]; then
11+ : # echo "Don't execute in GitHub Actions workflow runs."
12+ else
13+ local OPTS=()
14+ OPTS+=(--rm)
15+ [[ -z " $PS1 " ]] && OPTS+=(-it)
16+ OPTS+=(-e RUN_LOCAL=true)
17+ OPTS+=(-v " $( pwd) :/tmp/lint" )
18+ [[ -e " $( pwd) /.github/super-linter.env" ]] &&
19+ OPTS+=(--env-file " $( pwd) /.github/super-linter.env" )
20+ docker run " ${OPTS[@]} " " ${SUPERLINTER_IMAGE} :${SUPERLINTER_VERSION} " " $@ "
21+ fi
22+ }
23+
24+ main " $@ "
You can’t perform that action at this time.
0 commit comments