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

all(style) : fix linter issues for errcheck, ineffassign, unused and fix errors #950

Merged
merged 3 commits into from
Jun 12, 2023

Conversation

gen2thomas
Copy link
Collaborator

@gen2thomas gen2thomas commented Jun 11, 2023

Solved issues and/or description of the change

Activate linters "errcheck", "ineffassign" and "unused" and fix all linter issues. For "errcheck" many adjustments were needed. In unit tests all errors were dropped. For productive code fix was done in the following order:

  • try return error, if not possible
  • panic on error, if not possible or useful
  • log and drop error

In addition following errors were found:

Some format changes were done automatically by IDE.

Manual test

  • Linux, Tinkerboard (i2c and PWM)

Checklist

  • The PR's target branch is 'hybridgroup:dev'
  • New and existing unit tests pass locally with my changes (e.g. by run make test)
  • No linter errors exist locally (e.g. by run make fmt_check)
  • I have performed a self-review of my own code

@gen2thomas gen2thomas changed the title Fix/linter next all(style) : fix linter issues for errcheck, ineffassign, unused and fix some errors Jun 11, 2023
@gen2thomas gen2thomas changed the title all(style) : fix linter issues for errcheck, ineffassign, unused and fix some errors all(style) : fix linter issues for errcheck, ineffassign, unused and fix errors Jun 11, 2023
@gen2thomas gen2thomas force-pushed the fix/linter_next branch 6 times, most recently from 51ab737 to 8e8caf9 Compare June 12, 2023 17:39
@gen2thomas gen2thomas marked this pull request as ready for review June 12, 2023 17:49
@gen2thomas gen2thomas merged commit f5d8d5c into hybridgroup:dev Jun 12, 2023
@gen2thomas gen2thomas deleted the fix/linter_next branch June 12, 2023 17:51
gen2thomas added a commit to gen2thomas/gobot that referenced this pull request Jul 6, 2023
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.

1 participant