-
Notifications
You must be signed in to change notification settings - Fork 28
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add golangci-lint action with extra linters besides the default set [1]. Add hadolint and shellcheck. [1] https://golangci-lint.run/usage/linters Signed-off-by: Kennelly, Martin <[email protected]>
- Loading branch information
1 parent
b265857
commit d0fee21
Showing
1 changed file
with
35 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
name: Go-static-analysis | ||
on: [push, pull_request] | ||
jobs: | ||
golangci: | ||
name: Lint | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- name: golangci-lint | ||
uses: golangci/golangci-lint-action@v2 | ||
with: | ||
# Required: the version of golangci-lint is required and must be specified without patch version: we always use the latest patch version. | ||
version: v1.29 | ||
# Adding additional linters beside the default set - See https://golangci-lint.run/usage/linters | ||
args: --enable=golint,bodyclose,gosec,whitespace | ||
shellcheck: | ||
name: Shellcheck | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- name: Run ShellCheck | ||
uses: ludeeus/action-shellcheck@master | ||
hadolint: | ||
runs-on: ubuntu-latest | ||
name: Hadolint | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- uses: brpaz/[email protected] | ||
name: Run Hadolint | ||
with: | ||
dockerfile: Dockerfile | ||
- uses: brpaz/[email protected] | ||
with: | ||
dockerfile: Dockerfile.rhel7 | ||
|