-
Notifications
You must be signed in to change notification settings - Fork 158
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #162 from hypnoglow/add-github-actions-and-linter
Go 1.16 + GitHub Actions = golangci-lint
- Loading branch information
Showing
14 changed files
with
151 additions
and
43 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
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,41 @@ | ||
name: main | ||
|
||
on: | ||
push: | ||
branches: | ||
- $default-branch | ||
pull_request: | ||
branches: | ||
- '*' | ||
|
||
jobs: | ||
build: | ||
name: Build | ||
runs-on: ubuntu-latest | ||
steps: | ||
|
||
- name: Checkout | ||
uses: actions/checkout@v3 | ||
|
||
- name: Setup Go | ||
uses: actions/setup-go@v3 | ||
with: | ||
go-version-file: 'go.mod' | ||
|
||
- name: Download dependencies | ||
run: | | ||
go mod download | ||
- name: Run tests | ||
run: | | ||
go test -v $(go list ./... | grep -v e2e) | ||
- name: Run linters | ||
uses: golangci/golangci-lint-action@v3 | ||
with: | ||
version: v1.31 | ||
args: --verbose | ||
|
||
- name: Build | ||
run: | | ||
go build -v -o ./bin/helm-s3 ./cmd/helms3 |
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 |
---|---|---|
@@ -1,12 +1,67 @@ | ||
run: | ||
concurrency: 4 | ||
timeout: 5m | ||
|
||
linters: | ||
enable-all: true | ||
disable: | ||
- dupl | ||
- funlen | ||
- gochecknoglobals | ||
- godox | ||
- lll | ||
- wsl | ||
disable-all: true | ||
enable: | ||
- asciicheck | ||
- bodyclose | ||
- deadcode | ||
- depguard | ||
- dogsled | ||
- errcheck | ||
- exhaustive | ||
- exportloopref | ||
- gci | ||
- gochecknoinits | ||
# - gocognit | ||
- goconst | ||
- gocritic | ||
- gocyclo | ||
# - godot | ||
- gofmt | ||
- goheader | ||
- goimports | ||
- golint | ||
- gomnd | ||
- gomodguard | ||
- goprintffuncname | ||
- gosec | ||
- gosimple | ||
- govet | ||
- ineffassign | ||
- maligned | ||
- misspell | ||
- nakedret | ||
# - nestif | ||
- noctx | ||
- nolintlint | ||
- prealloc | ||
- rowserrcheck | ||
- scopelint | ||
- sqlclosecheck | ||
- staticcheck | ||
- structcheck | ||
- stylecheck | ||
- typecheck | ||
- unconvert | ||
- unparam | ||
- unused | ||
- varcheck | ||
- whitespace | ||
|
||
linters-settings: | ||
# TODO: enable dodot and uncomment this. | ||
# godot: | ||
# exclude: | ||
# - "^ ?-" | ||
goimports: | ||
local-prefixes: github.com/hypnoglow/helm-s3 | ||
|
||
issues: | ||
new-from-rev: master | ||
exclude-rules: | ||
- linters: | ||
- golint | ||
- stylecheck | ||
text: "error strings should not be capitalized" |
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
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.