Skip to content

Commit

Permalink
ci: lock golangci-lint to v1.59 (#172)
Browse files Browse the repository at this point in the history
* ci: lock golangci-lint to v1.59

* ci: fix golangci-lint warnings
  • Loading branch information
rahmatrhd authored Aug 20, 2024
1 parent 521ab2d commit 284b971
Show file tree
Hide file tree
Showing 7 changed files with 13 additions and 10 deletions.
1 change: 1 addition & 0 deletions .github/workflows/test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ jobs:
- name: golangci-lint
uses: golangci/golangci-lint-action@v2
with:
version: v1.59
skip-go-installation: true
test:
strategy:
Expand Down
9 changes: 5 additions & 4 deletions .golangci.yaml
Original file line number Diff line number Diff line change
@@ -1,14 +1,13 @@
run:
timeout: 5m
skip-dirs:
- api/proto
output:
format: line-number
formats:
- format: line-number
linters:
enable-all: false
disable-all: true
enable:
- vet
- govet
- goimports
- thelper
- tparallel
Expand All @@ -25,5 +24,7 @@ linters-settings:
severity: warning
issues:
fix: true
exclude-dirs:
- api/proto
severity:
default-severity: error
1 change: 1 addition & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -80,4 +80,5 @@ setup:
go get github.com/grpc-ecosystem/grpc-gateway/v2/[email protected]
go get github.com/bufbuild/buf/cmd/[email protected]
go get github.com/vektra/mockery/[email protected]
go get github.com/golangci/golangci-lint/cmd/[email protected]

3 changes: 1 addition & 2 deletions core/appeal/service_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import (
"encoding/json"
"errors"
"fmt"
"io"
"net/http"
"net/http/httptest"
"testing"
Expand All @@ -25,7 +26,6 @@ import (
"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/mock"
"github.com/stretchr/testify/suite"
"io"
)

var (
Expand Down Expand Up @@ -4411,7 +4411,6 @@ func (s *ServiceTestSuite) TestPatch() {
})
}
})

}

func (s *ServiceTestSuite) TestUpdateApproval() {
Expand Down
1 change: 0 additions & 1 deletion internal/store/postgres/model/grant.go
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,6 @@ func (m *Grant) FromDomain(g domain.Grant) error {
Time: *g.RestoredAt,
Valid: true,
}

}

m.Status = string(g.Status)
Expand Down
3 changes: 2 additions & 1 deletion pkg/http/http.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,13 @@ import (
"context"
"encoding/base64"
"fmt"
"net/http"

validator "github.com/go-playground/validator/v10"
defaults "github.com/mcuadros/go-defaults"
"golang.org/x/oauth2"
"golang.org/x/oauth2/google"
"google.golang.org/api/idtoken"
"net/http"
)

type HTTPAuthConfig struct {
Expand Down
5 changes: 3 additions & 2 deletions pkg/http/http_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,13 @@ import (
"context"
"encoding/base64"
"fmt"
"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/mock"
"io/ioutil"
"net/http"
"net/http/httptest"
"testing"

"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/mock"
)

func TestMakeRequestForGet(t *testing.T) {
Expand Down

0 comments on commit 284b971

Please sign in to comment.