1
0
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:
dependabot[bot]
2025-05-06 10:27:43 +02:00
committed by GitHub
parent d50e4db349
commit a3f2df35e1
4 changed files with 47 additions and 37 deletions

View File

@@ -107,6 +107,6 @@ jobs:
go-version-file: './go.mod'
check-latest: true
- name: golangci-lint
uses: golangci/golangci-lint-action@55c2c1448f86e01eaae002a5a3a9624417608d84 # v6.5.2
uses: golangci/golangci-lint-action@4afd733a84b1f43292c63897423277bb7f4313a9 # v8.0.0
with:
version: v1.61
version: v2.1

View File

@@ -1,32 +1,42 @@
---
version: "2"
run:
issues-exit-code: 1
linters:
enable:
- asciicheck
- errcheck
- errorlint
- gofmt
- goimports
- gosec
- gocritic
- gosec
- importas
- misspell
- prealloc
- revive
- misspell
- stylecheck
- staticcheck
- unconvert
- unused
- whitespace
output:
uniq-by-line: false
exclusions:
generated: lax
presets:
- comments
- common-false-positives
- legacy
- std-error-handling
paths:
- third_party$
- builtin$
- examples$
issues:
exclude-rules:
- path: _test\.go
linters:
- errcheck
- gosec
- revive
max-issues-per-linter: 0
max-same-issues: 0
run:
issues-exit-code: 1
timeout: 10m
uniq-by-line: false
formatters:
enable:
- gofmt
- goimports
exclusions:
generated: lax
paths:
- third_party$
- builtin$
- examples$

View File

@@ -28,19 +28,19 @@ import (
type fakeGit struct{}
func (g fakeGit) FileExistsOnBranch(file string, remote string, branch string) bool {
func (g fakeGit) FileExistsOnBranch(_ string, _ string, _ string) bool {
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
}
func (g fakeGit) MergeBase(commit1 string, commit2 string) (string, error) {
func (g fakeGit) MergeBase(_ string, _ string) (string, error) {
return "HEAD", nil
}
func (g fakeGit) ListChangedFilesInDirs(commit string, dirs ...string) ([]string, error) {
func (g fakeGit) ListChangedFilesInDirs(_ string, _ ...string) ([]string, error) {
return []string{
"test_charts/foo/Chart.yaml",
"test_charts/bar/Chart.yaml",
@@ -55,15 +55,15 @@ func (g fakeGit) ListChangedFilesInDirs(commit string, dirs ...string) ([]string
}, nil
}
func (g fakeGit) AddWorktree(path string, ref string) error {
func (g fakeGit) AddWorktree(_ string, _ string) error {
return nil
}
func (g fakeGit) RemoveWorktree(path string) error {
func (g fakeGit) RemoveWorktree(_ string) error {
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
}
@@ -71,13 +71,13 @@ func (g fakeGit) ValidateRepository() error {
return nil
}
func (g fakeGit) BranchExists(branch string) bool {
func (g fakeGit) BranchExists(_ string) bool {
return true
}
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") {
return nil
}
@@ -101,23 +101,23 @@ type fakeHelm struct {
mock.Mock
}
func (h *fakeHelm) AddRepo(name, url string, extraArgs []string) error { return nil }
func (h *fakeHelm) BuildDependencies(chart string) error { return nil }
func (h *fakeHelm) AddRepo(_, _ string, _ []string) error { return nil }
func (h *fakeHelm) BuildDependencies(_ string) error { return nil }
func (h *fakeHelm) BuildDependenciesWithArgs(chart string, extraArgs []string) error {
h.Called(chart, extraArgs)
return nil
}
func (h *fakeHelm) LintWithValues(chart string, valuesFile string) error { return nil }
func (h *fakeHelm) InstallWithValues(chart string, valuesFile string, namespace string, release string) error {
func (h *fakeHelm) LintWithValues(_ string, _ string) error { return nil }
func (h *fakeHelm) InstallWithValues(_ string, _ string, _ string, _ string) error {
return nil
}
func (h *fakeHelm) Upgrade(chart string, namespace string, release string) error {
func (h *fakeHelm) Upgrade(_ string, _ string, _ string) error {
return nil
}
func (h *fakeHelm) Test(namespace string, release string) error {
func (h *fakeHelm) Test(_ string, _ string) error {
return nil
}
func (h *fakeHelm) DeleteRelease(namespace string, release string) {}
func (h *fakeHelm) DeleteRelease(_ string, _ string) {}
func (h *fakeHelm) Version() (string, error) {
return "v3.0.0", nil

View File

@@ -43,7 +43,7 @@ func (v AccountValidator) Validate(repoURL string, account string) error {
func parseOutGitRepoDomain(repoURL string) (string, error) {
// This works for GitHub, Bitbucket, and Gitlab
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 submatch[1], nil