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

Fix errcheck linting errors #248

Merged
merged 1 commit into from
Jun 1, 2024

Conversation

atc0005
Copy link
Owner

@atc0005 atc0005 commented Jun 1, 2024

Resolve `return value of fmt.Fprintf is not checked`` errors by explicitly discarding return values (potential error, bytes written) since we do not need them and the potential for failure (in this particular use case) is highly unlikely.

The one exception is Plugin.emitOutput. There, we capture the potential error and emit a message to os.Stderr if an error occurs. If that attempt fails (however unlikely) we panic.

@atc0005 atc0005 added this to the Next Release milestone Jun 1, 2024
@atc0005 atc0005 added bug Something isn't working linting labels Jun 1, 2024
@atc0005 atc0005 self-assigned this Jun 1, 2024
Resolve `return value of fmt.Fprintf is not checked`` errors by
explicitly discarding return values (potential error, bytes written)
since we do not need them and the potential for failure (in this
particular use case) is *highly* unlikely.

The one exception is `Plugin.emitOutput`. There, we capture the
potential error and emit a message to os.Stderr if an error
occurs. If that attempt fails (however unlikely) we panic.
@atc0005 atc0005 force-pushed the fix-errcheck-linting-errors-stable-branch branch from 8247d02 to 96be84d Compare June 1, 2024 14:35
@atc0005 atc0005 added the output/plugin plugin output intended for monitoring system ingest label Jun 1, 2024
@atc0005 atc0005 merged commit 82bab11 into master Jun 1, 2024
30 of 31 checks passed
@atc0005 atc0005 deleted the fix-errcheck-linting-errors-stable-branch branch June 1, 2024 15:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working linting output/plugin plugin output intended for monitoring system ingest
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant