Skip to content

Commit

Permalink
fix_: linter
Browse files Browse the repository at this point in the history
  • Loading branch information
igor-sirotin committed Oct 22, 2024
1 parent d982562 commit 67bfb7e
Show file tree
Hide file tree
Showing 9 changed files with 37 additions and 23 deletions.
1 change: 1 addition & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -407,6 +407,7 @@ canary-test: node-canary
# TODO: uncomment that!
#_assets/scripts/canary_test_mailservers.sh ./config/cli/fleet-eth.prod.json

lint-panics: BASE_REV ?=
lint-panics: generate
go run ./cmd/lint-panics --test=false ./...

Expand Down
1 change: 1 addition & 0 deletions cmd/lint-panics/gopls/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ package gopls

import (
"context"

"go.lsp.dev/protocol"

"go.uber.org/zap"
Expand Down
7 changes: 5 additions & 2 deletions cmd/lint-panics/gopls/gopls.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,18 @@ package gopls

import (
"os/exec"

"github.com/pkg/errors"

"context"

"go.lsp.dev/jsonrpc2"
"go.lsp.dev/protocol"
"context"

"time"
"go.uber.org/zap"

"go.lsp.dev/uri"
"go.uber.org/zap"
)

type Connection struct {
Expand Down
10 changes: 6 additions & 4 deletions cmd/lint-panics/main.go
Original file line number Diff line number Diff line change
@@ -1,14 +1,16 @@
package main

import (
"context"
"fmt"
"os"
"time"

"go.uber.org/zap"
"go.uber.org/zap/zapcore"
"github.com/status-im/status-go/cmd/lint-panics/processor"
"golang.org/x/tools/go/analysis/singlechecker"
"fmt"
"time"
"context"

"github.com/status-im/status-go/cmd/lint-panics/processor"
)

/*
Expand Down
14 changes: 8 additions & 6 deletions cmd/lint-panics/main_test.go
Original file line number Diff line number Diff line change
@@ -1,15 +1,17 @@
package main

import (
"testing"
gopls2 "github.com/status-im/status-go/cmd/lint-panics/gopls"
"github.com/status-im/status-go/cmd/lint-panics/processor"
"time"
"context"
"go.uber.org/zap"
"runtime"
"path"
"runtime"
"testing"
"time"

"github.com/stretchr/testify/require"
"go.uber.org/zap"

gopls2 "github.com/status-im/status-go/cmd/lint-panics/gopls"
"github.com/status-im/status-go/cmd/lint-panics/processor"
)

func Test(t *testing.T) {
Expand Down
2 changes: 1 addition & 1 deletion cmd/lint-panics/processor/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@ package processor

import (
"flag"
"io"
"os"
"strings"
"io"
)

type Config struct {
Expand Down
17 changes: 10 additions & 7 deletions cmd/lint-panics/processor/processor.go
Original file line number Diff line number Diff line change
@@ -1,21 +1,24 @@
package processor

import (
"os"
"go.uber.org/zap"
"context"
"fmt"
"go/ast"
"context"
"os"
"time"

gotoken "go/token"
"go.uber.org/zap"

goparser "go/parser"
gotoken "go/token"
"path"
"strings"

"github.com/pkg/errors"
"github.com/status-im/status-go/cmd/lint-panics/utils"
"golang.org/x/tools/go/analysis"

gopls2 "github.com/status-im/status-go/cmd/lint-panics/gopls"
"path"
"strings"
"github.com/status-im/status-go/cmd/lint-panics/utils"
)

const Pattern = "LogOnPanic"
Expand Down
3 changes: 2 additions & 1 deletion cmd/lint-panics/test/goroutine_test.go
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
package test

import (
gocommon "github.com/status-im/status-go/common"
"fmt"

gocommon "github.com/status-im/status-go/common"
)

type Test struct {
Expand Down
5 changes: 3 additions & 2 deletions cmd/lint-panics/utils/utils.go
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
package utils

import (
gotoken "go/token"
"strconv"
"go.uber.org/zap/zapcore"

"go.uber.org/zap"
gotoken "go/token"
"go.uber.org/zap/zapcore"
)

func PositionURI(pos gotoken.Position) string {
Expand Down

0 comments on commit 67bfb7e

Please sign in to comment.