forked from hashicorp/terraform-provider-kubernetes
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
0d9471d
commit a56c3be
Showing
49 changed files
with
382 additions
and
357 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,26 @@ | ||
name: Golang Linter | ||
|
||
on: | ||
workflow_dispatch: | ||
pull_request: | ||
branches: | ||
- main | ||
paths: | ||
- '**/*.go' | ||
- '**/go.mod' | ||
|
||
jobs: | ||
golang_linter: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout repository | ||
uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 # v3.5.3 | ||
- name: Set up Go | ||
uses: actions/setup-go@fac708d6674e30b6ba41289acaab6d4b75aa0753 # v4.0.1 | ||
with: | ||
go-version-file: 'go.mod' | ||
- name: golangci-lint | ||
uses: golangci/golangci-lint-action@3a919529898de77ec3da873e3063ca4b10e7f5cc # v3.7.0 | ||
with: | ||
version: 'v1.55.2' | ||
skip-pkg-cache: true |
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,33 @@ | ||
run: | ||
timeout: 5m | ||
|
||
issues: | ||
max-per-linter: 0 | ||
max-same-issues: 0 | ||
exclude-rules: | ||
- path: manifest/provider/resource.go | ||
linters: | ||
- staticcheck | ||
# We need to use ValueFromMsgPack due to some missing abstraction in plugin-go. | ||
text: "SA1019: tftypes.ValueFromMsgPack is deprecated: this function is exported for internal use in terraform-plugin-go." | ||
- path: manifest/provider/import.go | ||
linters: | ||
- staticcheck | ||
# We need to use MarshalMsgPack due to some missing abstraction in plugin-go. | ||
text: "SA1019: impf.MarshalMsgPack is deprecated: this is not meant to be called by third parties." | ||
|
||
linters: | ||
disable-all: true | ||
enable: | ||
- gosimple | ||
- gofmt | ||
- staticcheck | ||
|
||
linters-settings: | ||
staticcheck: | ||
checks: | ||
- all | ||
gosimple: | ||
checks: | ||
- all | ||
- '-S1040' # Type assertion to current type: https://staticcheck.dev/docs/checks/#S1040 |
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 |
---|---|---|
|
@@ -101,10 +101,14 @@ tools: | |
go install github.com/bflad/tfproviderlint/cmd/[email protected] | ||
go install github.com/bflad/[email protected] | ||
go install github.com/katbyte/[email protected] | ||
go install github.com/golangci/golangci-lint/cmd/golangci-lint@v1.50.0 | ||
go install github.com/golangci/golangci-lint/cmd/golangci-lint@v1.55.2 | ||
go install github.com/hashicorp/go-changelog/cmd/changelog-build@latest | ||
go install github.com/hashicorp/go-changelog/cmd/changelog-entry@latest | ||
|
||
go-lint: tools | ||
@echo "==> Run Golang CLI linter..." | ||
@golangci-lint run | ||
|
||
vet: | ||
@echo "go vet ./..." | ||
@go vet $$(go list ./...) ; if [ $$? -eq 1 ]; then \ | ||
|
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
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
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
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
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
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
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
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
Oops, something went wrong.