mirror of
https://github.com/helm/chart-testing.git
synced 2026-02-05 09:45:14 +01:00
Bump golangci/golangci-lint-action from 6.5.2 to 8.0.0 (#736)
* Bump golangci/golangci-lint-action from 6.5.2 to 8.0.0
Bumps [golangci/golangci-lint-action](https://github.com/golangci/golangci-lint-action) from 6.5.2 to 8.0.0.
- [Release notes](https://github.com/golangci/golangci-lint-action/releases)
- [Commits](55c2c1448f...4afd733a84)
---
updated-dependencies:
- dependency-name: golangci/golangci-lint-action
dependency-version: 8.0.0
dependency-type: direct:production
update-type: version-update:semver-major
...
Signed-off-by: dependabot[bot] <support@github.com>
* migrate config
Signed-off-by: Carlos Panato <ctadeu@gmail.com>
* fix lints
Signed-off-by: Carlos Panato <ctadeu@gmail.com>
---------
Signed-off-by: dependabot[bot] <support@github.com>
Signed-off-by: Carlos Panato <ctadeu@gmail.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Carlos Panato <ctadeu@gmail.com>
This commit is contained in:
4
.github/workflows/ci.yaml
vendored
4
.github/workflows/ci.yaml
vendored
@@ -107,6 +107,6 @@ jobs:
|
|||||||
go-version-file: './go.mod'
|
go-version-file: './go.mod'
|
||||||
check-latest: true
|
check-latest: true
|
||||||
- name: golangci-lint
|
- name: golangci-lint
|
||||||
uses: golangci/golangci-lint-action@55c2c1448f86e01eaae002a5a3a9624417608d84 # v6.5.2
|
uses: golangci/golangci-lint-action@4afd733a84b1f43292c63897423277bb7f4313a9 # v8.0.0
|
||||||
with:
|
with:
|
||||||
version: v1.61
|
version: v2.1
|
||||||
|
|||||||
@@ -1,32 +1,42 @@
|
|||||||
---
|
---
|
||||||
|
version: "2"
|
||||||
|
run:
|
||||||
|
issues-exit-code: 1
|
||||||
linters:
|
linters:
|
||||||
enable:
|
enable:
|
||||||
- asciicheck
|
- asciicheck
|
||||||
- errcheck
|
|
||||||
- errorlint
|
- errorlint
|
||||||
- gofmt
|
|
||||||
- goimports
|
|
||||||
- gosec
|
|
||||||
- gocritic
|
- gocritic
|
||||||
|
- gosec
|
||||||
- importas
|
- importas
|
||||||
|
- misspell
|
||||||
- prealloc
|
- prealloc
|
||||||
- revive
|
- revive
|
||||||
- misspell
|
- staticcheck
|
||||||
- stylecheck
|
|
||||||
- unconvert
|
- unconvert
|
||||||
- unused
|
|
||||||
- whitespace
|
- whitespace
|
||||||
output:
|
exclusions:
|
||||||
uniq-by-line: false
|
generated: lax
|
||||||
|
presets:
|
||||||
|
- comments
|
||||||
|
- common-false-positives
|
||||||
|
- legacy
|
||||||
|
- std-error-handling
|
||||||
|
paths:
|
||||||
|
- third_party$
|
||||||
|
- builtin$
|
||||||
|
- examples$
|
||||||
issues:
|
issues:
|
||||||
exclude-rules:
|
|
||||||
- path: _test\.go
|
|
||||||
linters:
|
|
||||||
- errcheck
|
|
||||||
- gosec
|
|
||||||
- revive
|
|
||||||
max-issues-per-linter: 0
|
max-issues-per-linter: 0
|
||||||
max-same-issues: 0
|
max-same-issues: 0
|
||||||
run:
|
uniq-by-line: false
|
||||||
issues-exit-code: 1
|
formatters:
|
||||||
timeout: 10m
|
enable:
|
||||||
|
- gofmt
|
||||||
|
- goimports
|
||||||
|
exclusions:
|
||||||
|
generated: lax
|
||||||
|
paths:
|
||||||
|
- third_party$
|
||||||
|
- builtin$
|
||||||
|
- examples$
|
||||||
|
|||||||
@@ -28,19 +28,19 @@ import (
|
|||||||
|
|
||||||
type fakeGit struct{}
|
type fakeGit struct{}
|
||||||
|
|
||||||
func (g fakeGit) FileExistsOnBranch(file string, remote string, branch string) bool {
|
func (g fakeGit) FileExistsOnBranch(_ string, _ string, _ string) bool {
|
||||||
return true
|
return true
|
||||||
}
|
}
|
||||||
|
|
||||||
func (g fakeGit) Show(file string, remote string, branch string) (string, error) {
|
func (g fakeGit) Show(_ string, _ string, _ string) (string, error) {
|
||||||
return "", nil
|
return "", nil
|
||||||
}
|
}
|
||||||
|
|
||||||
func (g fakeGit) MergeBase(commit1 string, commit2 string) (string, error) {
|
func (g fakeGit) MergeBase(_ string, _ string) (string, error) {
|
||||||
return "HEAD", nil
|
return "HEAD", nil
|
||||||
}
|
}
|
||||||
|
|
||||||
func (g fakeGit) ListChangedFilesInDirs(commit string, dirs ...string) ([]string, error) {
|
func (g fakeGit) ListChangedFilesInDirs(_ string, _ ...string) ([]string, error) {
|
||||||
return []string{
|
return []string{
|
||||||
"test_charts/foo/Chart.yaml",
|
"test_charts/foo/Chart.yaml",
|
||||||
"test_charts/bar/Chart.yaml",
|
"test_charts/bar/Chart.yaml",
|
||||||
@@ -55,15 +55,15 @@ func (g fakeGit) ListChangedFilesInDirs(commit string, dirs ...string) ([]string
|
|||||||
}, nil
|
}, nil
|
||||||
}
|
}
|
||||||
|
|
||||||
func (g fakeGit) AddWorktree(path string, ref string) error {
|
func (g fakeGit) AddWorktree(_ string, _ string) error {
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
||||||
func (g fakeGit) RemoveWorktree(path string) error {
|
func (g fakeGit) RemoveWorktree(_ string) error {
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
||||||
func (g fakeGit) GetURLForRemote(remote string) (string, error) {
|
func (g fakeGit) GetURLForRemote(_ string) (string, error) {
|
||||||
return "git@github.com/helm/chart-testing", nil
|
return "git@github.com/helm/chart-testing", nil
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -71,13 +71,13 @@ func (g fakeGit) ValidateRepository() error {
|
|||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
||||||
func (g fakeGit) BranchExists(branch string) bool {
|
func (g fakeGit) BranchExists(_ string) bool {
|
||||||
return true
|
return true
|
||||||
}
|
}
|
||||||
|
|
||||||
type fakeAccountValidator struct{}
|
type fakeAccountValidator struct{}
|
||||||
|
|
||||||
func (v fakeAccountValidator) Validate(repoDomain string, account string) error {
|
func (v fakeAccountValidator) Validate(_ string, account string) error {
|
||||||
if strings.HasPrefix(account, "valid") {
|
if strings.HasPrefix(account, "valid") {
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
@@ -101,23 +101,23 @@ type fakeHelm struct {
|
|||||||
mock.Mock
|
mock.Mock
|
||||||
}
|
}
|
||||||
|
|
||||||
func (h *fakeHelm) AddRepo(name, url string, extraArgs []string) error { return nil }
|
func (h *fakeHelm) AddRepo(_, _ string, _ []string) error { return nil }
|
||||||
func (h *fakeHelm) BuildDependencies(chart string) error { return nil }
|
func (h *fakeHelm) BuildDependencies(_ string) error { return nil }
|
||||||
func (h *fakeHelm) BuildDependenciesWithArgs(chart string, extraArgs []string) error {
|
func (h *fakeHelm) BuildDependenciesWithArgs(chart string, extraArgs []string) error {
|
||||||
h.Called(chart, extraArgs)
|
h.Called(chart, extraArgs)
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
func (h *fakeHelm) LintWithValues(chart string, valuesFile string) error { return nil }
|
func (h *fakeHelm) LintWithValues(_ string, _ string) error { return nil }
|
||||||
func (h *fakeHelm) InstallWithValues(chart string, valuesFile string, namespace string, release string) error {
|
func (h *fakeHelm) InstallWithValues(_ string, _ string, _ string, _ string) error {
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
func (h *fakeHelm) Upgrade(chart string, namespace string, release string) error {
|
func (h *fakeHelm) Upgrade(_ string, _ string, _ string) error {
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
func (h *fakeHelm) Test(namespace string, release string) error {
|
func (h *fakeHelm) Test(_ string, _ string) error {
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
func (h *fakeHelm) DeleteRelease(namespace string, release string) {}
|
func (h *fakeHelm) DeleteRelease(_ string, _ string) {}
|
||||||
|
|
||||||
func (h *fakeHelm) Version() (string, error) {
|
func (h *fakeHelm) Version() (string, error) {
|
||||||
return "v3.0.0", nil
|
return "v3.0.0", nil
|
||||||
|
|||||||
@@ -43,7 +43,7 @@ func (v AccountValidator) Validate(repoURL string, account string) error {
|
|||||||
func parseOutGitRepoDomain(repoURL string) (string, error) {
|
func parseOutGitRepoDomain(repoURL string) (string, error) {
|
||||||
// This works for GitHub, Bitbucket, and Gitlab
|
// This works for GitHub, Bitbucket, and Gitlab
|
||||||
submatch := repoDomainPattern.FindStringSubmatch(repoURL)
|
submatch := repoDomainPattern.FindStringSubmatch(repoURL)
|
||||||
if submatch == nil || len(submatch) < 2 {
|
if len(submatch) < 2 {
|
||||||
return "", fmt.Errorf("could not parse git repository domain for %q", repoURL)
|
return "", fmt.Errorf("could not parse git repository domain for %q", repoURL)
|
||||||
}
|
}
|
||||||
return submatch[1], nil
|
return submatch[1], nil
|
||||||
|
|||||||
Reference in New Issue
Block a user