Skip to content

Commit

Permalink
Fix linting issues
Browse files Browse the repository at this point in the history
Signed-off-by: Matej Pavlovic <[email protected]>
  • Loading branch information
matejpavlovic committed Dec 17, 2023
1 parent f104cc4 commit 76ac2f3
Show file tree
Hide file tree
Showing 114 changed files with 327 additions and 195 deletions.
3 changes: 2 additions & 1 deletion cmd/bench/cmd/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,12 @@ import (
"strconv"
"time"

t "github.com/filecoin-project/mir/stdtypes"
es "github.com/go-errors/errors"
"github.com/spf13/cobra"
rateLimiter "golang.org/x/time/rate"

t "github.com/filecoin-project/mir/stdtypes"

"github.com/filecoin-project/mir/pkg/dummyclient"
"github.com/filecoin-project/mir/pkg/logging"
"github.com/filecoin-project/mir/pkg/membership"
Expand Down
3 changes: 2 additions & 1 deletion cmd/bench/cmd/node.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,13 @@ import (
"strconv"
"time"

"github.com/filecoin-project/mir/stdtypes"
es "github.com/go-errors/errors"
"github.com/multiformats/go-multiaddr"
manet "github.com/multiformats/go-multiaddr/net"
"github.com/spf13/cobra"

"github.com/filecoin-project/mir/stdtypes"

"github.com/filecoin-project/mir"
"github.com/filecoin-project/mir/cmd/bench/localtxgenerator"
"github.com/filecoin-project/mir/cmd/bench/stats"
Expand Down
3 changes: 2 additions & 1 deletion cmd/bench/localtxgenerator/localtxgenerator.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,10 @@ import (
"sync/atomic"
"time"

"github.com/filecoin-project/mir/stdtypes"
es "github.com/go-errors/errors"

"github.com/filecoin-project/mir/stdtypes"

"github.com/filecoin-project/mir/cmd/bench/stats"
"github.com/filecoin-project/mir/pkg/checkpoint"
"github.com/filecoin-project/mir/pkg/logging"
Expand Down
3 changes: 2 additions & 1 deletion cmd/mircat/display.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,12 @@ import (
"strconv"
"strings"

"github.com/filecoin-project/mir/stdtypes"
"github.com/ttacon/chalk"
"google.golang.org/protobuf/encoding/protojson"
"gopkg.in/alecthomas/kingpin.v2"

"github.com/filecoin-project/mir/stdtypes"

"github.com/filecoin-project/mir/pkg/eventlog"
"github.com/filecoin-project/mir/pkg/modules"
"github.com/filecoin-project/mir/pkg/pb/eventpb"
Expand Down
3 changes: 2 additions & 1 deletion cmd/mircat/eventloader.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,10 @@ import (
"sort"
"strings"

t "github.com/filecoin-project/mir/stdtypes"
"gopkg.in/alecthomas/kingpin.v2"

t "github.com/filecoin-project/mir/stdtypes"

"github.com/filecoin-project/mir/pkg/eventlog"
"github.com/filecoin-project/mir/pkg/pb/eventpb"
"github.com/filecoin-project/mir/pkg/pb/isspb"
Expand Down
3 changes: 2 additions & 1 deletion cmd/mircat/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,10 @@ import (
"strings"

"github.com/AlecAivazis/survey/v2"
t "github.com/filecoin-project/mir/stdtypes"
"github.com/pkg/errors"
"gopkg.in/alecthomas/kingpin.v2"

t "github.com/filecoin-project/mir/stdtypes"
)

// mircat is a tool for reviewing Mir state machine recordings.
Expand Down
5 changes: 2 additions & 3 deletions codegen/generators/dsl-gen/generator/messages.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,14 @@ package generator

import (
"github.com/dave/jennifer/jen"
t "github.com/filecoin-project/mir/stdtypes"

"github.com/filecoin-project/mir/codegen/model/messages"

"github.com/filecoin-project/mir/codegen"
"github.com/filecoin-project/mir/codegen/model/messages"
"github.com/filecoin-project/mir/codegen/model/types"
"github.com/filecoin-project/mir/codegen/util/jenutil"
"github.com/filecoin-project/mir/codegen/util/params"
"github.com/filecoin-project/mir/pkg/util/reflectutil"
t "github.com/filecoin-project/mir/stdtypes"
)

var tNodeIDCode jen.Code = jenutil.QualFromType(reflectutil.TypeOf[t.NodeID]())
Expand Down
3 changes: 2 additions & 1 deletion node.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,10 @@ import (
"reflect"
"sync"

"github.com/filecoin-project/mir/stdtypes"
es "github.com/go-errors/errors"

"github.com/filecoin-project/mir/stdtypes"

"github.com/filecoin-project/mir/pkg/eventlog"
"github.com/filecoin-project/mir/pkg/logging"
"github.com/filecoin-project/mir/pkg/modules"
Expand Down
5 changes: 3 additions & 2 deletions node_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,14 @@ import (
"testing"
"time"

"github.com/filecoin-project/mir/stdevents"
"github.com/filecoin-project/mir/stdtypes"
"github.com/golang/mock/gomock"
"github.com/pkg/errors"
"github.com/stretchr/testify/assert"
"go.uber.org/goleak"

"github.com/filecoin-project/mir/stdevents"
"github.com/filecoin-project/mir/stdtypes"

"github.com/filecoin-project/mir/pkg/logging"
"github.com/filecoin-project/mir/pkg/modules"
"github.com/filecoin-project/mir/pkg/modules/mockmodules"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
package batchreconstruction

import (
t "github.com/filecoin-project/mir/stdtypes"
es "github.com/go-errors/errors"

t "github.com/filecoin-project/mir/stdtypes"

"github.com/filecoin-project/mir/pkg/availability/multisigcollector/common"
msctypes "github.com/filecoin-project/mir/pkg/availability/multisigcollector/types"
"github.com/filecoin-project/mir/pkg/dsl"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,10 @@ package certverification
import (
"errors"

t "github.com/filecoin-project/mir/stdtypes"
es "github.com/go-errors/errors"

t "github.com/filecoin-project/mir/stdtypes"

"github.com/filecoin-project/mir/pkg/availability/multisigcollector/common"
msctypes "github.com/filecoin-project/mir/pkg/availability/multisigcollector/types"
"github.com/filecoin-project/mir/pkg/dsl"
Expand Down
3 changes: 2 additions & 1 deletion pkg/bcb/bcbmodule.go
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
package bcb

import (
"github.com/filecoin-project/mir/stdtypes"
es "github.com/go-errors/errors"

"github.com/filecoin-project/mir/stdtypes"

"github.com/filecoin-project/mir/pkg/dsl"
"github.com/filecoin-project/mir/pkg/modules"
bcbpbdsl "github.com/filecoin-project/mir/pkg/pb/bcbpb/dsl"
Expand Down
3 changes: 2 additions & 1 deletion pkg/checkpoint/certificate.go
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
package checkpoint

import (
t "github.com/filecoin-project/mir/stdtypes"
"github.com/fxamacker/cbor/v2"
es "github.com/go-errors/errors"

t "github.com/filecoin-project/mir/stdtypes"

"github.com/filecoin-project/mir/pkg/util/maputil"
)

Expand Down
3 changes: 2 additions & 1 deletion pkg/checkpoint/checkpoint.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,12 @@ package checkpoint
import (
"reflect"

t "github.com/filecoin-project/mir/stdtypes"
"github.com/fxamacker/cbor/v2"
es "github.com/go-errors/errors"
"google.golang.org/protobuf/proto"

t "github.com/filecoin-project/mir/stdtypes"

"github.com/filecoin-project/mir/pkg/clientprogress"
"github.com/filecoin-project/mir/pkg/crypto"
"github.com/filecoin-project/mir/pkg/logging"
Expand Down
3 changes: 2 additions & 1 deletion pkg/checkpoint/chkpvalidator/conservativecv.go
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
package chkpvalidator

import (
t "github.com/filecoin-project/mir/stdtypes"
es "github.com/go-errors/errors"

t "github.com/filecoin-project/mir/stdtypes"

"github.com/filecoin-project/mir/pkg/checkpoint"
"github.com/filecoin-project/mir/pkg/crypto"
checkpointpbtypes "github.com/filecoin-project/mir/pkg/pb/checkpointpb/types"
Expand Down
3 changes: 2 additions & 1 deletion pkg/checkpoint/chkpvalidator/permissivecv.go
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
package chkpvalidator

import (
t "github.com/filecoin-project/mir/stdtypes"
es "github.com/go-errors/errors"

t "github.com/filecoin-project/mir/stdtypes"

"github.com/filecoin-project/mir/pkg/logging"

"github.com/filecoin-project/mir/pkg/checkpoint"
Expand Down
3 changes: 2 additions & 1 deletion pkg/checkpoint/protocol.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,10 @@ import (
"bytes"
"time"

t "github.com/filecoin-project/mir/stdtypes"
es "github.com/go-errors/errors"

t "github.com/filecoin-project/mir/stdtypes"

"github.com/filecoin-project/mir/pkg/dsl"
"github.com/filecoin-project/mir/pkg/logging"
"github.com/filecoin-project/mir/pkg/modules"
Expand Down
2 changes: 1 addition & 1 deletion pkg/crypto/crypto.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,14 @@
package crypto

import (
"github.com/filecoin-project/mir/stdtypes"
es "github.com/go-errors/errors"

"github.com/filecoin-project/mir/pkg/modules"
"github.com/filecoin-project/mir/pkg/pb/cryptopb"
cryptopbevents "github.com/filecoin-project/mir/pkg/pb/cryptopb/events"
cryptopbtypes "github.com/filecoin-project/mir/pkg/pb/cryptopb/types"
"github.com/filecoin-project/mir/pkg/pb/eventpb"
"github.com/filecoin-project/mir/stdtypes"
)

type MirModule struct {
Expand Down
3 changes: 2 additions & 1 deletion pkg/crypto/defaultimpl.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,9 @@ import (
"os"
"strings"

t "github.com/filecoin-project/mir/stdtypes"
es "github.com/go-errors/errors"

t "github.com/filecoin-project/mir/stdtypes"
)

// DefaultImpl represents a generic implementation of the MirModule module that can be used at Node instantiation
Expand Down
3 changes: 2 additions & 1 deletion pkg/crypto/dummy.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,9 @@ package crypto
import (
"bytes"

t "github.com/filecoin-project/mir/stdtypes"
es "github.com/go-errors/errors"

t "github.com/filecoin-project/mir/stdtypes"
)

// TODO: Write comments.
Expand Down
3 changes: 2 additions & 1 deletion pkg/crypto/hasher.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,10 @@ package crypto
import (
"hash"

"github.com/filecoin-project/mir/stdtypes"
es "github.com/go-errors/errors"

"github.com/filecoin-project/mir/stdtypes"

"github.com/filecoin-project/mir/pkg/modules"
"github.com/filecoin-project/mir/pkg/pb/eventpb"
"github.com/filecoin-project/mir/pkg/pb/hasherpb"
Expand Down
3 changes: 2 additions & 1 deletion pkg/crypto/pseudo.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,9 @@ package crypto
import (
insecureRNG "math/rand"

t "github.com/filecoin-project/mir/stdtypes"
es "github.com/go-errors/errors"

t "github.com/filecoin-project/mir/stdtypes"
)

var (
Expand Down
3 changes: 2 additions & 1 deletion pkg/deploytest/deployment.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,10 @@ import (
"sync"
"time"

"github.com/filecoin-project/mir/stdtypes"
es "github.com/go-errors/errors"

"github.com/filecoin-project/mir/stdtypes"

"github.com/filecoin-project/mir"
"github.com/filecoin-project/mir/pkg/dummyclient"
"github.com/filecoin-project/mir/pkg/logging"
Expand Down
3 changes: 2 additions & 1 deletion pkg/deploytest/locallibp2ptransport.go
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
package deploytest

import (
t "github.com/filecoin-project/mir/stdtypes"
es "github.com/go-errors/errors"
"github.com/libp2p/go-libp2p/core/host"

t "github.com/filecoin-project/mir/stdtypes"

"github.com/filecoin-project/mir/pkg/trantor/types"

"github.com/filecoin-project/mir/pkg/logging"
Expand Down
3 changes: 2 additions & 1 deletion pkg/deploytest/simtimer.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,10 @@ import (
"context"
"time"

"github.com/filecoin-project/mir/stdtypes"
es "github.com/go-errors/errors"

"github.com/filecoin-project/mir/stdtypes"

"github.com/filecoin-project/mir/pkg/modules"
"github.com/filecoin-project/mir/pkg/pb/eventpb"
"github.com/filecoin-project/mir/pkg/testsim"
Expand Down
3 changes: 2 additions & 1 deletion pkg/deploytest/testreplica.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,10 @@ import (
"strconv"
"sync"

"github.com/filecoin-project/mir/stdtypes"
es "github.com/go-errors/errors"

"github.com/filecoin-project/mir/stdtypes"

"github.com/filecoin-project/mir"
"github.com/filecoin-project/mir/pkg/eventlog"
"github.com/filecoin-project/mir/pkg/logging"
Expand Down
2 changes: 1 addition & 1 deletion pkg/dsl/dslmodule.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,14 @@ package dsl
import (
"reflect"

"github.com/filecoin-project/mir/stdtypes"
es "github.com/go-errors/errors"

cs "github.com/filecoin-project/mir/pkg/contextstore"
"github.com/filecoin-project/mir/pkg/modules"
"github.com/filecoin-project/mir/pkg/pb/eventpb"
eventpbtypes "github.com/filecoin-project/mir/pkg/pb/eventpb/types"
"github.com/filecoin-project/mir/pkg/util/reflectutil"
"github.com/filecoin-project/mir/stdtypes"
)

type dslModuleImpl struct {
Expand Down
5 changes: 3 additions & 2 deletions pkg/dsl/test/dslmodule_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,12 @@ import (
"strconv"
"testing"

"github.com/filecoin-project/mir/stdevents"
"github.com/filecoin-project/mir/stdtypes"
es "github.com/go-errors/errors"
"github.com/stretchr/testify/assert"

"github.com/filecoin-project/mir/stdevents"
"github.com/filecoin-project/mir/stdtypes"

"github.com/filecoin-project/mir/pkg/dsl"
"github.com/filecoin-project/mir/pkg/modules"
"github.com/filecoin-project/mir/pkg/pb/cryptopb"
Expand Down
3 changes: 2 additions & 1 deletion pkg/dummyclient/dummyclient.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,12 @@ import (
"fmt"
"sync"

t "github.com/filecoin-project/mir/stdtypes"
es "github.com/go-errors/errors"
"google.golang.org/grpc"
"google.golang.org/grpc/credentials/insecure"

t "github.com/filecoin-project/mir/stdtypes"

"github.com/filecoin-project/mir/pkg/logging"
trantorpbtypes "github.com/filecoin-project/mir/pkg/pb/trantorpb/types"
"github.com/filecoin-project/mir/pkg/transactionreceiver"
Expand Down
2 changes: 1 addition & 1 deletion pkg/eventlog/eventwritergzip.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,14 @@ import (
"io"
"os"

"github.com/filecoin-project/mir/stdtypes"
es "github.com/go-errors/errors"
"github.com/pkg/errors"
"google.golang.org/protobuf/proto"

"github.com/filecoin-project/mir/pkg/logging"
"github.com/filecoin-project/mir/pkg/pb/eventpb"
"github.com/filecoin-project/mir/pkg/pb/recordingpb"
"github.com/filecoin-project/mir/stdtypes"
)

type gzipWriter struct {
Expand Down
Loading

0 comments on commit 76ac2f3

Please sign in to comment.