Skip to content

Commit 4ec50ab

Browse files
authored
Merge pull request #138 from cisagov/add-go-packages
Add go packages for pre-commit
2 parents bd762fe + 98d3d3f commit 4ec50ab

File tree

1 file changed

+15
-0
lines changed

1 file changed

+15
-0
lines changed

.github/workflows/build.yml

+15
Original file line numberDiff line numberDiff line change
@@ -80,11 +80,26 @@ jobs:
8080
- uses: hashicorp/setup-terraform@v2
8181
with:
8282
terraform_version: ${{ steps.setup-env.outputs.terraform-version }}
83+
- name: Install go-critic
84+
env:
85+
PACKAGE_URL: github.com/go-critic/go-critic/cmd/gocritic
86+
PACKAGE_VERSION: ${{ steps.setup-env.outputs.go-critic-version }}
87+
run: go install ${PACKAGE_URL}@${PACKAGE_VERSION}
88+
- name: Install gosec
89+
env:
90+
PACKAGE_URL: github.com/securego/gosec/v2/cmd/gosec
91+
PACKAGE_VERSION: ${{ steps.setup-env.outputs.gosec-version }}
92+
run: go install ${PACKAGE_URL}@${PACKAGE_VERSION}
8393
- name: Install shfmt
8494
env:
8595
PACKAGE_URL: mvdan.cc/sh/v3/cmd/shfmt
8696
PACKAGE_VERSION: ${{ steps.setup-env.outputs.shfmt-version }}
8797
run: go install ${PACKAGE_URL}@${PACKAGE_VERSION}
98+
- name: Install staticcheck
99+
env:
100+
PACKAGE_URL: honnef.co/go/tools/cmd/staticcheck
101+
PACKAGE_VERSION: ${{ steps.setup-env.outputs.staticcheck-version }}
102+
run: go install ${PACKAGE_URL}@${PACKAGE_VERSION}
88103
- name: Install Terraform-docs
89104
env:
90105
PACKAGE_URL: github.com/terraform-docs/terraform-docs

0 commit comments

Comments
 (0)