pull/1753/merge
Ron Green 2023-08-01 21:56:29 +08:00 committed by GitHub
commit b6eec2f3c7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 18 additions and 0 deletions

View File

@ -0,0 +1,6 @@
#!/bin/bash
CONTAINER_ENGINE=${CONTAINER_ENGINE:-docker}
${CONTAINER_ENGINE} build --file ./testing.Dockerfile --tag test .
${CONTAINER_ENGINE} run --rm --interactive --tty --volume $(pwd -P):$(pwd) --workdir $(pwd) test bash ./lint_clean_files.sh

12
testing.Dockerfile 100644
View File

@ -0,0 +1,12 @@
FROM fedora
RUN yum install --assumeyes \
ShellCheck \
python-devel \
python \
golang \
pip \
&& \
yum clean all
RUN pip3 install pre-commit
RUN GO111MODULE=on go get mvdan.cc/sh/v3/cmd/shfmt &&\
ln -s ~/go/bin/shfmt /usr/local/bin