Skip to content

Update linter to v2.0.2 #1405

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged

Conversation

nodivbyzero
Copy link
Contributor

Fixes Or Enhances

Recently, the Dependabot PR for the linter update failed.
This PR updates the linter to v2.0.2, adds a linter configuration file, and addresses some obvious errors:

  • Error return value of file.Close is not checked (errcheck)
  • Error return value of os.Remove is not checked (errcheck)
  • could use strings.ReplaceAll instead (staticcheck)
  • could omit type interface{} from declaration; it will be inferred from the right-hand side (staticcheck)

Make sure that you've checked the boxes below before you submit PR:

  • Tests exist or have been written that cover this particular change.

@go-playground/validator-maintainers

Sorry, something went wrong.

@nodivbyzero nodivbyzero requested a review from a team as a code owner March 27, 2025 21:27
@coveralls
Copy link

coveralls commented Mar 27, 2025

Coverage Status

coverage: 74.238% (-0.003%) from 74.241%
when pulling 78d179a on nodivbyzero:fix-linter-errors-2.0.2
into 8592022 on go-playground:master.

@nodivbyzero nodivbyzero force-pushed the fix-linter-errors-2.0.2 branch 2 times, most recently from 4da15a8 to c712a83 Compare March 27, 2025 21:32
zemzale
zemzale previously approved these changes Mar 27, 2025

Unverified

This user has not yet uploaded their public signing key.
@nodivbyzero nodivbyzero force-pushed the fix-linter-errors-2.0.2 branch from 3e90a81 to 78d179a Compare March 27, 2025 21:51
@nodivbyzero nodivbyzero requested a review from zemzale March 27, 2025 21:54
@nodivbyzero
Copy link
Contributor Author

@zemzale I needed to resolve the failure of TestImageValidation on Windows.
https://github.com/go-playground/validator/actions/runs/14117272442/job/39550373637

@nodivbyzero nodivbyzero merged commit 433b082 into go-playground:master Mar 28, 2025
11 of 12 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants