[chore] : Bump golangci/golangci-lint-action from 3.6.0 to 8.0.0#133
Merged
abhijeetviswa merged 2 commits intomainfrom Jun 10, 2025
Merged
Conversation
Bumps [golangci/golangci-lint-action](https://github.com/golangci/golangci-lint-action) from 3.6.0 to 8.0.0. - [Release notes](https://github.com/golangci/golangci-lint-action/releases) - [Commits](golangci/golangci-lint-action@639cd34...4afd733) --- 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>
There was a problem hiding this comment.
The config file is not required with golangci-lint v2. Disabled linters have been "reneabled" by this change and their errors have been fixed.
| f, err := os.Create(".copywrite.hcl") | ||
| cobra.CheckErr(err) | ||
| defer f.Close() | ||
| defer func() { cobra.CheckErr(f.Close()) }() |
There was a problem hiding this comment.
Fixes:
copywrite/cmd/init.go:104:16: Error return value of `f.Close` is not checked (errcheck)
defer f.Close()
^
| // Input Validation | ||
| if conf.Project.CopyrightYear == 0 { | ||
| errYearNotFound := errors.New("Unable to automatically determine copyright year. Please specify it manually in the config or via the --year flag") | ||
| errYearNotFound := errors.New("unable to automatically determine copyright year: Please specify it manually in the config or via the --year flag") |
There was a problem hiding this comment.
Fixes:
copywrite/cmd/license.go:48:23: ST1005: error strings should not be capitalized (staticcheck)
errYearNotFound := errors.New("Unable to automatically determine copyright year. Please specify it manually in the config or via the --year flag")
| // Input Validation | ||
| if conf.Project.CopyrightYear == 0 { | ||
| errYearNotFound := errors.New("Unable to automatically determine copyright year. Please specify it manually in the config or via the --year flag") | ||
| errYearNotFound := errors.New("unable to automatically determine copyright year: Please specify it manually in the config or via the --year flag") |
There was a problem hiding this comment.
Fixes:
copywrite/cmd/license.go:48:23: ST1005: error strings should not be capitalized (staticcheck)
errYearNotFound := errors.New("Unable to automatically determine copyright year. Please specify it manually in the config or via the --year flag")
|
|
||
| if len(licenseFiles) > 1 { | ||
| err = fmt.Errorf("More than one license file exists. Please review the following files and manually ensure only one is present: %s", licenseFiles) | ||
| err = fmt.Errorf("more than one license file exists: Please review the following files and manually ensure only one is present: %s", licenseFiles) |
There was a problem hiding this comment.
Fixes:
copywrite/cmd/license.go:81:10: ST1005: error strings should not be capitalized (staticcheck)
err = fmt.Errorf("More than one license file exists. Please review the following files and manually ensure only one is present: %s", licenseFiles)
| abs, err := filepath.Abs(cfgPath) | ||
| if err != nil { | ||
| return fmt.Errorf("Unable to determine config path: %w", err) | ||
| return fmt.Errorf("unable to determine config path: %w", err) |
There was a problem hiding this comment.
Fixes:
copywrite/config/config.go:205:10: ST1005: error strings should not be capitalized (staticcheck)
return fmt.Errorf("Unable to determine config path: %w", err)
| } | ||
|
|
||
| defer f.Close() | ||
| defer func() { _ = f.Close() }() |
There was a problem hiding this comment.
Fixes:
github/actions/core.go:144:15: Error return value of `f.Close` is not checked (errcheck)
defer f.Close()
| path, exists := os.LookupEnv(fileEnvVar) | ||
| if !gha.IsGHA() || !exists { | ||
| return fmt.Errorf("Unable to set modify GitHub Actions environment file %s: %w", fileEnvVar, ErrorNotInGHA) | ||
| return fmt.Errorf("unable to set modify GitHub Actions environment file %s: %w", fileEnvVar, ErrorNotInGHA) |
There was a problem hiding this comment.
Fixes:
github/actions/core.go:125:10: ST1005: error strings should not be capitalized (staticcheck)
return fmt.Errorf("Unable to set modify GitHub Actions environment file %s: %w", fileEnvVar, ErrorNotInGHA)
Comment on lines
-61
to
+69
| os.Setenv(k, v) | ||
| _ = os.Setenv(k, v) | ||
| fmt.Println("Setting env var " + k + " equal to " + v) | ||
| } | ||
|
|
||
| gha := New(&b) | ||
| assert.Equal(t, tt.expectedOutput.isGHA, gha.isGHA) | ||
|
|
||
| for k := range tt.env { | ||
| os.Unsetenv(k) | ||
| _ = os.Unsetenv(k) |
There was a problem hiding this comment.
Fixes:
github/actions/core_test.go:61:14: Error return value of `os.Setenv` is not checked (errcheck)
os.Setenv(k, v)
^
github/actions/core_test.go:69:16: Error return value of `os.Unsetenv` is not checked (errcheck)
os.Unsetenv(k)
| err := os.Rename(filePath, filepath.Join(dir, "LICENSE")) | ||
| if err != nil { | ||
| return "", fmt.Errorf("Unable to rename file \"%s\". Full error context: %s", filePath, err) | ||
| return "", fmt.Errorf("unable to rename file \"%s\". Full error context: %s", filePath, err) |
There was a problem hiding this comment.
Fixes:
licensecheck/licensecheck.go:26:15: ST1005: error strings should not be capitalized (staticcheck)
return "", fmt.Errorf("Unable to rename file \"%s\". Full error context: %s", filePath, err)
| if !exists { | ||
| validOptions := strings.Join(lo.Keys(licenseTemplate), ", ") | ||
| return "", fmt.Errorf("Failed to add license file, unknown SPDX license ID: %s. The following options are supported at this time: %s", spdxID, validOptions) | ||
| return "", fmt.Errorf("failed to add license file, unknown SPDX license ID: %s. The following options are supported at this time: %s", spdxID, validOptions) |
There was a problem hiding this comment.
Fixes:
licensecheck/licensecheck.go:56:14: ST1005: error strings should not be capitalized (staticcheck)
return "", fmt.Errorf("Failed to add license file, unknown SPDX license ID: %s. The following options are supported at this time: %s", spdxID, validOptions)
abhijeetviswa
approved these changes
Jun 6, 2025
sonamtenzin2
approved these changes
Jun 10, 2025
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Bumps golangci/golangci-lint-action from 3.6.0 to 8.0.0.
Release notes
Sourced from golangci/golangci-lint-action's releases.
... (truncated)
Commits
4afd7338.0.07774f98feat: use absolute paths by default when using working-directory option (#1231)9fae48a7.0.116ece5edocs: clarify that ’args: --path-mode=abs’ is needed for working-directory (...a3942e2build(deps-dev): bump the dev-dependencies group with 2 updates (#1227)7ecb048build(deps): bump@types/nodefrom 22.14.0 to 22.14.1 in the dependencies gro...63a0d0ebuild(deps-dev): bump the dev-dependencies group with 3 updates (#1224)c2427fedocs: update problem matchers section642f8eebuild(deps): bump@types/nodefrom 22.13.14 to 22.14.0 in the dependencies gr...d84be92build(deps-dev): bump the dev-dependencies group with 4 updates (#1220)Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting
@dependabot rebase.Dependabot commands and options
You can trigger Dependabot actions by commenting on this PR:
@dependabot rebasewill rebase this PR@dependabot recreatewill recreate this PR, overwriting any edits that have been made to it@dependabot mergewill merge this PR after your CI passes on it@dependabot squash and mergewill squash and merge this PR after your CI passes on it@dependabot cancel mergewill cancel a previously requested merge and block automerging@dependabot reopenwill reopen this PR if it is closed@dependabot closewill close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually@dependabot show <dependency name> ignore conditionswill show all of the ignore conditions of the specified dependency@dependabot ignore this major versionwill close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)@dependabot ignore this minor versionwill close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)@dependabot ignore this dependencywill close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)