Skip to content

Commit

Permalink
make golangci-lint stricter
Browse files Browse the repository at this point in the history
  • Loading branch information
orsinium committed Dec 19, 2022
1 parent 1e33072 commit 8456279
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 0 deletions.
24 changes: 24 additions & 0 deletions .golangci.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
linters:
disable:
- gosec
- noctx
- errorlint
- exhaustive
- scopelint
- rowserrcheck
- sqlclosecheck
- maligned
presets:
- bugs
# - comment
# - complexity
# - error
- format
- import
# - metalinter
# - module
- performance
# - sql
# - style
# - test
# - unused
2 changes: 2 additions & 0 deletions cmd/providers.go
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,7 @@ func (p ProviderGitlab) Download(q string) ([]byte, error) {
if err != nil {
return nil, fmt.Errorf("send HTTP request: %v", err)
}
defer resp.Body.Close()
var keys []struct {
Key string `json:"key"`
}
Expand All @@ -103,6 +104,7 @@ func (p ProviderGitlab) getUserID(q string) (int, error) {
if err != nil {
return 0, fmt.Errorf("send HTTP request: %v", err)
}
defer resp.Body.Close()
err = json.NewDecoder(resp.Body).Decode(&users)
if err != nil {
return 0, fmt.Errorf("parse response: %v", err)
Expand Down

0 comments on commit 8456279

Please sign in to comment.