Skip to content

Commit

Permalink
Removed test Python file
Browse files Browse the repository at this point in the history
Added script to run Super-Linter locally
Updated .gitignore

Signed-off-by: Jacob Woffenden <jacob.woffenden@digital.justice.gov.uk>
  • Loading branch information
Jacob Woffenden committed Nov 6, 2023
1 parent f9707d0 commit c0bfea0
Show file tree
Hide file tree
Showing 3 changed files with 32 additions and 2 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -8,3 +8,4 @@ env/
*.code-workspace
*.sha256
terraform.tfstate
super-linter.log
2 changes: 0 additions & 2 deletions main.py

This file was deleted.

31 changes: 31 additions & 0 deletions scripts/super-linter/run-local.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
#!/usr/bin/env bash

MODE="${1:-local}"

case "${MODE}" in
local)
echo "Running Super-Linter in RUN_LOCAL mode"
docker run --rm \
--env RUN_LOCAL="true" \
--env CREATE_LOG_FILE="true" \
--env LOG_FILE_NAME="/tmp/log/super-linter.log" \
--env-file ".github/super-linter.env" \
--volume "${PWD}":/tmp/log \
--volume "${PWD}":/tmp/lint \
ghcr.io/super-linter/super-linter:slim-v5
;;
interactive)
echo "Running Super-Linter in INTERACTIVE mode"
docker run --rm -it \
--env-file ".github/super-linter.env" \
--entrypoint /bin/bash \
--volume "${PWD}":/tmp/lint \
--workdir /tmp/lint \
ghcr.io/super-linter/super-linter:slim-v5
;;
*)
echo "Invalid mode: ${MODE}"
echo "Usage: ${0} [local|interactive]"
exit 1
;;
esac

0 comments on commit c0bfea0

Please sign in to comment.