feat(lint): make testing lint easier

related to #1743
pull/1753/head
Ron Green 2020-12-27 18:18:24 +02:00
parent b119540ce7
commit 44b9941c3f
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