Skip to content

Commit

Permalink
Update to golangci-lint v1.59.1
Browse files Browse the repository at this point in the history
  • Loading branch information
alexandear committed Jul 2, 2024
1 parent a9dc202 commit a62024b
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 13 deletions.
17 changes: 5 additions & 12 deletions .golangci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,10 @@ linters-settings:
disable-dec-order-check: false
disable-init-func-first-check: false
gci:
local-prefixes: github.com/alexandear/import-gitlab-commits
sections:
- standard
- default
- prefix(github.com/alexandear/import-gitlab-commits)
goconst:
min-len: 2
min-occurrences: 2
Expand Down Expand Up @@ -48,21 +51,11 @@ linters:
enable-all: true
disable:
- depguard
- maligned
- exhaustivestruct
- exhaustruct
- err113
- nonamedreturns
- gomnd
- nosnakecase
- interfacer
- varcheck
- ifshort
- structcheck
- deadcode
- scopelint
- golint
- rowserrcheck
- wastedassign
- goerr113
- paralleltest
- testpackage
4 changes: 3 additions & 1 deletion internal/gitlab.go
Original file line number Diff line number Diff line change
Expand Up @@ -130,9 +130,11 @@ func (s *GitLab) FetchCommits(ctx context.Context, user *User, projectID int, si
) ([]*Commit, error) {
commits := make([]*Commit, 0, maxCommits)

const commitsPerPage = 100

page := 1
for page > 0 {
cms, nextPage, err := s.fetchCommitPage(ctx, user, page, 100, since, projectID)
cms, nextPage, err := s.fetchCommitPage(ctx, user, page, commitsPerPage, since, projectID)
if err != nil {
return nil, fmt.Errorf("fetch one commit page: %w", err)
}
Expand Down

0 comments on commit a62024b

Please sign in to comment.