-
Notifications
You must be signed in to change notification settings - Fork 2.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat(lint): make testing lint easier #1753
base: master
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
#!/bin/bash | ||
|
||
CONTAINER_ENGINE=${CONTAINER_ENGINE:-docker} | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. We should probably note that this variable exists and how to use it in the same doc |
||
|
||
${CONTAINER_ENGINE} build --file ./testing.Dockerfile --tag test . | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. no need to build the docker each time- lets just use one we will publish ourselves |
||
${CONTAINER_ENGINE} run --rm --interactive --tty --volume $(pwd -P):$(pwd) --workdir $(pwd) test bash ./lint_clean_files.sh |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
FROM fedora | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. so should we use this dockerfile or the one in the other repo? this one is more minimal... I vote that we will use this one, just put this in here There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The reason I have 2 is this one is based on fedora and is a little heavier, and the other is an alpine with only the requirements. But I am glad to move to this as it's my go-to container as of late |
||
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 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would place this script somewhere in the docs, so ppl will know that they can use it