Skip to content
This repository has been archived by the owner on Jan 7, 2023. It is now read-only.

Address staticcheck issues #14

Merged
merged 1 commit into from
Jul 20, 2021
Merged

Address staticcheck issues #14

merged 1 commit into from
Jul 20, 2021

Conversation

masih
Copy link
Member

@masih masih commented Jul 19, 2021

Fix staticcheck issues:

  • S1028 use fmt.Errorf to construct formatted errors
  • ST1017 yoda conditions
  • ST1005 error message capitalization
  • ST1006 avoid self as receiver name
  • S1030 use buf.String
  • S1011 avoid redundant loop when append suffices
  • SA4006 unused value
  • S1019 remove redundant capacity on make call
  • SA2002 t.Fatal called outside of test

Exported error violates ST1012, which is ignored by this PR since rename may cause breaking changes.

Remove redundant parentheses wrapping, and use CamelCase naming while at it.

Relates to:

Fix `staticcheck` issues:
- S1028 use `fmt.Errorf` to construct formatted errors
- ST1017 yoda conditions
- ST1005 error message capitalization
- ST1006 avoid `self` as receiver name
- S1030 use `buf.String`
- S1011 avoid redundant loop when `append` suffices
- SA4006 unused value
- S1019 remove redundant capacity on `make` call
- SA2002 `t.Fatal` called outside of test

Exported error violates ST1012, which is ignored by this PR since rename may cause breaking changes.

Remove redundant parentheses wrapping, and use CamelCase naming while at it.
@Stebalien Stebalien merged commit 219d074 into master Jul 20, 2021
@Stebalien Stebalien deleted the fix-lint-issues-pre-ci branch July 20, 2021 04:35
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants