Skip to content

[chore] : Bump golangci/golangci-lint-action from 3.6.0 to 8.0.0#133

Merged
abhijeetviswa merged 2 commits intomainfrom
dependabot/github_actions/golangci/golangci-lint-action-8.0.0
Jun 10, 2025
Merged

[chore] : Bump golangci/golangci-lint-action from 3.6.0 to 8.0.0#133
abhijeetviswa merged 2 commits intomainfrom
dependabot/github_actions/golangci/golangci-lint-action-8.0.0

Conversation

@dependabot
Copy link
Contributor

@dependabot dependabot bot commented on behalf of github Jun 5, 2025

Bumps golangci/golangci-lint-action from 3.6.0 to 8.0.0.

Release notes

Sourced from golangci/golangci-lint-action's releases.

v8.0.0

Requires golangci-lint version >= v2.1.0

What's Changed

Changes

Full Changelog: golangci/golangci-lint-action@v7...v8.0.0

v7.0.1

What's Changed

Documentation

Dependencies

New Contributors

Full Changelog: golangci/golangci-lint-action@v7.0.0...v7.0.1

v7.0.0

⚠️ The GitHub Action v7 supports golangci-lint v2 only. ⚠️

What's Changed

Changes

Documentation

Dependencies

New Contributors

... (truncated)

Commits
  • 4afd733 8.0.0
  • 7774f98 feat: use absolute paths by default when using working-directory option (#1231)
  • 9fae48a 7.0.1
  • 16ece5e docs: clarify that ’args: --path-mode=abs’ is needed for working-directory (...
  • a3942e2 build(deps-dev): bump the dev-dependencies group with 2 updates (#1227)
  • 7ecb048 build(deps): bump @​types/node from 22.14.0 to 22.14.1 in the dependencies gro...
  • 63a0d0e build(deps-dev): bump the dev-dependencies group with 3 updates (#1224)
  • c2427fe docs: update problem matchers section
  • 642f8ee build(deps): bump @​types/node from 22.13.14 to 22.14.0 in the dependencies gr...
  • d84be92 build(deps-dev): bump the dev-dependencies group with 4 updates (#1220)
  • Additional commits viewable in compare view

Dependabot compatibility score

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 rebase will rebase this PR
  • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
  • @dependabot merge will merge this PR after your CI passes on it
  • @dependabot squash and merge will squash and merge this PR after your CI passes on it
  • @dependabot cancel merge will cancel a previously requested merge and block automerging
  • @dependabot reopen will reopen this PR if it is closed
  • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
  • @dependabot show <dependency name> ignore conditions will show all of the ignore conditions of the specified dependency
  • @dependabot ignore this major version will 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 version will 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 dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)

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>
@dependabot dependabot bot added dependencies Pull requests that update a dependency file github_actions Pull requests that update GitHub Actions code labels Jun 5, 2025
@dependabot dependabot bot requested a review from a team as a code owner June 5, 2025 06:00
@dependabot dependabot bot added dependencies Pull requests that update a dependency file github_actions Pull requests that update GitHub Actions code labels Jun 5, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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()) }()

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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")

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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")

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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)

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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)

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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() }()

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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)

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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)

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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)

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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)

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 abhijeetviswa enabled auto-merge (squash) June 6, 2025 18:56
@abhijeetviswa abhijeetviswa merged commit 5796954 into main Jun 10, 2025
4 checks passed
@abhijeetviswa abhijeetviswa deleted the dependabot/github_actions/golangci/golangci-lint-action-8.0.0 branch June 10, 2025 08:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

dependencies Pull requests that update a dependency file github_actions Pull requests that update GitHub Actions code

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants