Skip to content
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

chore: enable nilerr linter #385

Merged
merged 1 commit into from
Jan 15, 2025

Conversation

G-Rath
Copy link
Collaborator

@G-Rath G-Rath commented Jan 13, 2025

This linter aims to catch mix ups in returns for errors on branches that have asserted an error wasn't nil, as usually you want to be returning an error even if it's not the original one or otherwise you'd not have the function return an error in the first place.

Of course, our one violation of this linter happens to be an exception to the rule: fs.WalkDir takes nil to mean "thanks for letting us know, now continue with the rest of the walk" for cases where it can't walk a particular path.

Relates to #274

@G-Rath G-Rath mentioned this pull request Jan 13, 2025
46 tasks
@copybara-service copybara-service bot merged commit 3103516 into google:main Jan 15, 2025
8 checks passed
@G-Rath G-Rath deleted the linting/enable-nilerr branch January 15, 2025 23:54
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.

2 participants