Skip to content

fix errors thrown by errcheck linter#755

Merged
abhijeetviswa merged 6 commits intomainfrom
lint-errcheck
Jun 3, 2025
Merged

fix errors thrown by errcheck linter#755
abhijeetviswa merged 6 commits intomainfrom
lint-errcheck

Conversation

@abhijeetviswa
Copy link
Copy Markdown

No description provided.

@abhijeetviswa abhijeetviswa requested review from a team as code owners May 23, 2025 06:36
@abhijeetviswa abhijeetviswa marked this pull request as draft May 23, 2025 06:36
@abhijeetviswa
Copy link
Copy Markdown
Author

An additional commit to enable all linters within golangci-lint needs to be made.

@abhijeetviswa
Copy link
Copy Markdown
Author

There were staticcheck lint errors on this PR because of a broken cache. Deleted the caches from GitHub Actions and all checks passed.

mukeshjc
mukeshjc previously approved these changes Jun 3, 2025
Comment thread cmd/hcldec/diags_json.go
Comment on lines -91 to +94
wr.w.Write([]byte{'\n'})
if err != nil {
return fmt.Errorf("failed to write diagnostics: %w", err)
}
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Thought : we are simply returning unwrapped errors in other parts of this function. Maybe we don't need to wrap this one then.

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

Makes sense. I'll make this change.

@abhijeetviswa abhijeetviswa marked this pull request as ready for review June 3, 2025 08:32
@abhijeetviswa abhijeetviswa enabled auto-merge (squash) June 3, 2025 09:04
@abhijeetviswa abhijeetviswa merged commit 6b5c4c2 into main Jun 3, 2025
15 checks passed
@abhijeetviswa abhijeetviswa deleted the lint-errcheck branch June 3, 2025 09:47
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.

3 participants