-
-
Notifications
You must be signed in to change notification settings - Fork 1.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ERRO [runner] Panic: gocritic: package "model" (isInitialPkg: true, needAnalyzeSource: true): unreachable #3253
Comments
Hey, thank you for opening your first Issue ! 🙂 If you would like to contribute we have a guide for contributors. |
Hello,
As you have checked this, can you give me the output of the go-critic command line? |
Hey, maybe I misunderstood that mark. I ran I've now run $ gocritic check -enableAll ./...
./contracts/native/micropay/payment.go:27:2: commentedOutCode: may want to remove commented-out code
./core/database/versioning.go:26:37: whyNoLint: include an explanation for nolint directive
./packages/apilib/deploychain.go:42:25: hugeParam: par is heavy (152 bytes); consider passing it by pointer
./packages/apilib/deploychain.go:62:18: hugeParam: par is heavy (152 bytes); consider passing it by pointer
./packages/authentication/jwt_auth.go:177:1: unnamedResult: consider giving a name to these results
./packages/chain/chainimpl/eventproc.go:27:1: whyNoLint: include an explanation for nolint directive
./packages/chain/consensus/action.go:103:39: whyNoLint: include an explanation for nolint directive
./packages/chain/consensus/action.go:458:1: whyNoLint: include an explanation for nolint directive
./packages/chain/consensus/batch_proposal.go:138:3: commentedOutCode: may want to remove commented-out code
./packages/chain/consensus/batch_proposal.go:142:2: commentedOutCode: may want to remove commented-out code
./packages/chain/consensus/batch_proposal.go:204:1: unnamedResult: consider giving a name to these results
./packages/chain/consensus/consensus.go:178:1: whyNoLint: include an explanation for nolint directive
./packages/chain/consensus/mocked_env_test.go:139:1: paramTypeCombine: func(numRequests int, quorum int, timeout ...time.Duration) error could be replaced with func(numRequests, quorum int, timeout ...time.Duration) error
./packages/chain/consensus/mocked_env_test.go:139:98: whyNoLint: include an explanation for nolint directive
./packages/chain/consensus/mocked_node_test.go:78:2: commentedOutCode: may want to remove commented-out code
./packages/chain/consensus/mocked_node_test.go:47:86: whyNoLint: include an explanation for nolint directive
./packages/chain/consensus/commoncoin/commoncoin.go:55:1: unnamedResult: consider giving a name to these results
./packages/chain/consensus/commoncoin/commoncoin.go:59:1: unnamedResult: consider giving a name to these results
./packages/chain/consensus/commoncoin/commoncoin.go:95:1: unnamedResult: consider giving a name to these results
./packages/chain/consensus/commoncoin/commoncoin.go:128:1: unnamedResult: consider giving a name to these results
./packages/chain/consensus/commonsubset/commonsubset.go:421:1: whyNoLint: include an explanation for nolint directive
./packages/chain/consensus/commonsubset/commonsubset.go:562:1: whyNoLint: include an explanation for nolint directive
./packages/chain/consensus/journal/journal.go:106:32: whyNoLint: include an explanation for nolint directive
./packages/chain/dss/dss.go:156:1: whyNoLint: include an explanation for nolint directive
./packages/chain/dss/node/dss_series.go:43:1: unnamedResult: consider giving a name to these results
./packages/chain/dss/node/msg.go:26:1: unnamedResult: consider giving a name to these results
./packages/chain/statemgr/statemgr.go:205:1: whyNoLint: include an explanation for nolint directive
./packages/chain/statemgr/mocked_node_test.go:82:2: commentedOutCode: may want to remove commented-out code
./packages/cryptolib/byteutils/byteutils.go:8:1: paramTypeCombine: func(target []byte, targetOffset int, source []byte, sourceOffset int, sourceLength int) int could be replaced with func(target []byte, targetOffset int, source []byte, sourceOffset, sourceLength int) int
./packages/cryptolib/byteutils/byteutils.go:8:123: whyNoLint: include an explanation for nolint directive
./packages/database/dbmanager/db.go:68:2: commentedOutCode: may want to remove commented-out code
./packages/dkg/messages.go:259:5: sloppyReassign: re-assignment to `err` can be replaced with `err := util.WriteByte(w, m.step)`
./packages/dkg/messages.go:262:5: sloppyReassign: re-assignment to `err` can be replaced with `err := util.WriteString16(w, m.dkgRef)`
./packages/dkg/messages.go:268:5: sloppyReassign: re-assignment to `err` can be replaced with `err := util.WriteUint16(w, uint16(len(m.peerPubs)))`
./packages/dkg/messages.go:272:6: sloppyReassign: re-assignment to `err` can be replaced with `err := util.WriteBytes16(w, m.peerPubs[i].AsBytes())`
./packages/dkg/messages.go:276:5: sloppyReassign: re-assignment to `err` can be replaced with `err := util.WriteBytes16(w, m.initiatorPub.AsBytes())`
./packages/dkg/messages.go:279:5: sloppyReassign: re-assignment to `err` can be replaced with `err := util.WriteUint16(w, m.threshold)`
./packages/dkg/messages.go:282:5: sloppyReassign: re-assignment to `err` can be replaced with `err := util.WriteInt64(w, m.timeout.Milliseconds())`
./packages/dkg/messages.go:306:5: sloppyReassign: re-assignment to `err` can be replaced with `err := util.ReadUint16(r, &arrLen)`
./packages/dkg/messages.go:330:5: sloppyReassign: re-assignment to `err` can be replaced with `err := util.ReadUint16(r, &m.threshold)`
./packages/dkg/messages.go:334:5: sloppyReassign: re-assignment to `err` can be replaced with `err := util.ReadInt64(r, &timeoutMS)`
./packages/dkg/messages.go:339:5: sloppyReassign: re-assignment to `err` can be replaced with `err := util.ReadInt64(r, &roundRetryMS)`
./packages/dkg/messages.go:429:5: sloppyReassign: re-assignment to `err` can be replaced with `err := util.WriteByte(w, m.step)`
./packages/dkg/messages.go:432:5: sloppyReassign: re-assignment to `err` can be replaced with `err := util.WriteUint16(w, uint16(len(m.edPubShares)))`
./packages/dkg/messages.go:436:6: sloppyReassign: re-assignment to `err` can be replaced with `err := util.WriteMarshaled(w, m.edPubShares[i])`
./packages/dkg/messages.go:440:5: sloppyReassign: re-assignment to `err` can be replaced with `err := util.WriteUint16(w, uint16(len(m.blsPubShares)))`
./packages/dkg/messages.go:444:6: sloppyReassign: re-assignment to `err` can be replaced with `err := util.WriteMarshaled(w, m.blsPubShares[i])`
./packages/dkg/messages.go:460:5: sloppyReassign: re-assignment to `err` can be replaced with `err := util.ReadUint16(r, &arrLen)`
./packages/dkg/messages.go:472:5: sloppyReassign: re-assignment to `err` can be replaced with `err := util.ReadUint16(r, &arrLen)`
./packages/dkg/messages.go:533:5: sloppyReassign: re-assignment to `err` can be replaced with `err := util.WriteByte(w, m.step)`
./packages/dkg/messages.go:536:5: sloppyReassign: re-assignment to `err` can be replaced with `err := util.WriteBytes16(w, isc.BytesFromAddress(m.sharedAddress))`
./packages/dkg/messages.go:540:6: sloppyReassign: re-assignment to `err` can be replaced with `err := util.WriteMarshaled(w, m.edSharedPublic)`
./packages/dkg/messages.go:543:6: sloppyReassign: re-assignment to `err` can be replaced with `err := util.WriteMarshaled(w, m.edPublicShare)`
./packages/dkg/messages.go:546:6: sloppyReassign: re-assignment to `err` can be replaced with `err := util.WriteBytes16(w, m.edSignature)`
./packages/dkg/messages.go:551:6: sloppyReassign: re-assignment to `err` can be replaced with `err := util.WriteMarshaled(w, m.blsSharedPublic)`
./packages/dkg/messages.go:554:6: sloppyReassign: re-assignment to `err` can be replaced with `err := util.WriteMarshaled(w, m.blsPublicShare)`
./packages/dkg/messages.go:557:6: sloppyReassign: re-assignment to `err` can be replaced with `err := util.WriteBytes16(w, m.blsSignature)`
./packages/dkg/messages.go:704:5: sloppyReassign: re-assignment to `err` can be replaced with `err := util.WriteByte(w, m.step)`
./packages/dkg/messages.go:707:5: sloppyReassign: re-assignment to `err` can be replaced with `err := util.WriteUint32(w, m.deal.Index)`
./packages/dkg/messages.go:710:5: sloppyReassign: re-assignment to `err` can be replaced with `err := util.WriteMarshaled(w, m.deal.Deal.DHKey)`
./packages/dkg/messages.go:713:5: sloppyReassign: re-assignment to `err` can be replaced with `err := util.WriteBytes16(w, m.deal.Deal.Signature)`
./packages/dkg/messages.go:716:5: sloppyReassign: re-assignment to `err` can be replaced with `err := util.WriteBytes16(w, m.deal.Deal.Nonce)`
./packages/dkg/messages.go:728:5: sloppyReassign: re-assignment to `err` can be replaced with `err := util.ReadUint32(r, &m.deal.Index)`
./packages/dkg/messages.go:731:5: sloppyReassign: re-assignment to `err` can be replaced with `err := util.ReadMarshaled(r, m.deal.Deal.DHKey)`
./packages/dkg/messages.go:777:5: sloppyReassign: re-assignment to `err` can be replaced with `err := util.WriteByte(w, m.step)`
./packages/dkg/messages.go:781:5: sloppyReassign: re-assignment to `err` can be replaced with `err := util.WriteUint32(w, listLen)`
./packages/dkg/messages.go:785:6: sloppyReassign: re-assignment to `err` can be replaced with `err := util.WriteUint32(w, r.Index)`
./packages/dkg/messages.go:788:6: sloppyReassign: re-assignment to `err` can be replaced with `err := util.WriteBytes16(w, r.Response.SessionID)`
./packages/dkg/messages.go:791:6: sloppyReassign: re-assignment to `err` can be replaced with `err := util.WriteUint32(w, r.Response.Index)`
./packages/dkg/messages.go:794:6: sloppyReassign: re-assignment to `err` can be replaced with `err := util.WriteBoolByte(w, r.Response.Approved)`
./packages/dkg/messages.go:797:6: sloppyReassign: re-assignment to `err` can be replaced with `err := util.WriteBytes16(w, r.Response.Signature)`
./packages/dkg/messages.go:811:5: sloppyReassign: re-assignment to `err` can be replaced with `err := util.ReadUint32(r, &listLen)`
./packages/dkg/messages.go:820:6: sloppyReassign: re-assignment to `err` can be replaced with `err := util.ReadUint32(r, &response.Index)`
./packages/dkg/messages.go:826:6: sloppyReassign: re-assignment to `err` can be replaced with `err := util.ReadUint32(r, &response.Response.Index)`
./packages/dkg/messages.go:829:6: sloppyReassign: re-assignment to `err` can be replaced with `err := util.ReadBoolByte(r, &response.Response.Approved)`
./packages/dkg/messages.go:866:5: sloppyReassign: re-assignment to `err` can be replaced with `err := util.WriteByte(w, m.step)`
./packages/dkg/messages.go:870:5: sloppyReassign: re-assignment to `err` can be replaced with `err := util.WriteUint32(w, jLen)`
./packages/dkg/messages.go:874:6: sloppyReassign: re-assignment to `err` can be replaced with `err := util.WriteUint32(w, j.Index)`
./packages/dkg/messages.go:877:6: sloppyReassign: re-assignment to `err` can be replaced with `err := util.WriteBytes16(w, j.Justification.SessionID)`
./packages/dkg/messages.go:880:6: sloppyReassign: re-assignment to `err` can be replaced with `err := util.WriteUint32(w, j.Justification.Index)`
./packages/dkg/messages.go:883:6: sloppyReassign: re-assignment to `err` can be replaced with `err := writeVssDeal(w, j.Justification.Deal)`
./packages/dkg/messages.go:886:6: sloppyReassign: re-assignment to `err` can be replaced with `err := util.WriteBytes16(w, j.Justification.Signature)`
./packages/dkg/messages.go:900:5: sloppyReassign: re-assignment to `err` can be replaced with `err := util.ReadUint32(r, &jLen)`
./packages/dkg/messages.go:909:6: sloppyReassign: re-assignment to `err` can be replaced with `err := util.ReadUint32(r, &j.Index)`
./packages/dkg/messages.go:915:6: sloppyReassign: re-assignment to `err` can be replaced with `err := util.ReadUint32(r, &j.Justification.Index)`
./packages/dkg/messages.go:918:6: sloppyReassign: re-assignment to `err` can be replaced with `err := readVssDeal(r, &j.Justification.Deal, m.blsSuite)`
./packages/dkg/messages.go:956:5: sloppyReassign: re-assignment to `err` can be replaced with `err := util.WriteByte(w, m.step)`
./packages/dkg/messages.go:959:5: sloppyReassign: re-assignment to `err` can be replaced with `err := util.WriteBoolByte(w, m.secretCommits == nil)`
./packages/dkg/messages.go:965:5: sloppyReassign: re-assignment to `err` can be replaced with `err := util.WriteUint32(w, m.secretCommits.Index)`
./packages/dkg/messages.go:968:5: sloppyReassign: re-assignment to `err` can be replaced with `err := util.WriteUint32(w, uint32(len(m.secretCommits.Commitments)))`
./packages/dkg/messages.go:972:6: sloppyReassign: re-assignment to `err` can be replaced with `err := util.WriteMarshaled(w, m.secretCommits.Commitments[i])`
./packages/dkg/messages.go:976:5: sloppyReassign: re-assignment to `err` can be replaced with `err := util.WriteBytes16(w, m.secretCommits.SessionID)`
./packages/dkg/messages.go:989:5: sloppyReassign: re-assignment to `err` can be replaced with `err := util.ReadBoolByte(r, &isNil)`
./packages/dkg/messages.go:997:5: sloppyReassign: re-assignment to `err` can be replaced with `err := util.ReadUint32(r, &m.secretCommits.Index)`
./packages/dkg/messages.go:1001:5: sloppyReassign: re-assignment to `err` can be replaced with `err := util.ReadUint32(r, &cLen)`
./packages/dkg/messages.go:1007:6: sloppyReassign: re-assignment to `err` can be replaced with `err := util.ReadMarshaled(r, m.secretCommits.Commitments[i])`
./packages/dkg/messages.go:1048:5: sloppyReassign: re-assignment to `err` can be replaced with `err := util.WriteByte(w, m.step)`
./packages/dkg/messages.go:1051:5: sloppyReassign: re-assignment to `err` can be replaced with `err := util.WriteUint32(w, uint32(len(m.complaintCommits)))`
./packages/dkg/messages.go:1055:6: sloppyReassign: re-assignment to `err` can be replaced with `err := util.WriteUint32(w, m.complaintCommits[i].Index)`
./packages/dkg/messages.go:1058:6: sloppyReassign: re-assignment to `err` can be replaced with `err := util.WriteUint32(w, m.complaintCommits[i].DealerIndex)`
./packages/dkg/messages.go:1061:6: sloppyReassign: re-assignment to `err` can be replaced with `err := writeVssDeal(w, m.complaintCommits[i].Deal)`
./packages/dkg/messages.go:1064:6: sloppyReassign: re-assignment to `err` can be replaced with `err := util.WriteBytes16(w, m.complaintCommits[i].Signature)`
./packages/dkg/messages.go:1078:5: sloppyReassign: re-assignment to `err` can be replaced with `err := util.ReadUint32(r, &ccLen)`
./packages/dkg/messages.go:1084:6: sloppyReassign: re-assignment to `err` can be replaced with `err := util.ReadUint32(r, &m.complaintCommits[i].Index)`
./packages/dkg/messages.go:1087:6: sloppyReassign: re-assignment to `err` can be replaced with `err := util.ReadUint32(r, &m.complaintCommits[i].DealerIndex)`
./packages/dkg/messages.go:1090:6: sloppyReassign: re-assignment to `err` can be replaced with `err := readVssDeal(r, &m.complaintCommits[i].Deal, m.blsSuite)`
./packages/dkg/messages.go:1127:5: sloppyReassign: re-assignment to `err` can be replaced with `err := util.WriteByte(w, m.step)`
./packages/dkg/messages.go:1130:5: sloppyReassign: re-assignment to `err` can be replaced with `err := util.WriteUint32(w, uint32(len(m.reconstructCommits)))`
./packages/dkg/messages.go:1134:6: sloppyReassign: re-assignment to `err` can be replaced with `err := util.WriteBytes16(w, m.reconstructCommits[i].SessionID)`
./packages/dkg/messages.go:1137:6: sloppyReassign: re-assignment to `err` can be replaced with `err := util.WriteUint32(w, m.reconstructCommits[i].Index)`
./packages/dkg/messages.go:1140:6: sloppyReassign: re-assignment to `err` can be replaced with `err := util.WriteUint32(w, m.reconstructCommits[i].DealerIndex)`
./packages/dkg/messages.go:1143:6: sloppyReassign: re-assignment to `err` can be replaced with `err := writePriShare(w, m.reconstructCommits[i].Share)`
./packages/dkg/messages.go:1146:6: sloppyReassign: re-assignment to `err` can be replaced with `err := util.WriteBytes16(w, m.reconstructCommits[i].Signature)`
./packages/dkg/messages.go:1160:5: sloppyReassign: re-assignment to `err` can be replaced with `err := util.ReadUint32(r, &ccLen)`
./packages/dkg/messages.go:1169:6: sloppyReassign: re-assignment to `err` can be replaced with `err := util.ReadUint32(r, &m.reconstructCommits[i].Index)`
./packages/dkg/messages.go:1172:6: sloppyReassign: re-assignment to `err` can be replaced with `err := util.ReadUint32(r, &m.reconstructCommits[i].DealerIndex)`
./packages/dkg/messages.go:1175:6: sloppyReassign: re-assignment to `err` can be replaced with `err := readPriShare(r, &m.reconstructCommits[i].Share)`
./packages/dkg/messages.go:1326:5: sloppyReassign: re-assignment to `err` can be replaced with `err := util.WriteBoolByte(w, val == nil)`
./packages/dkg/messages.go:1332:5: sloppyReassign: re-assignment to `err` can be replaced with `err := util.WriteUint32(w, uint32(val.I))`
./packages/dkg/messages.go:1342:5: sloppyReassign: re-assignment to `err` can be replaced with `err := util.ReadBoolByte(r, &valNil)`
./packages/dkg/messages.go:1349:5: sloppyReassign: re-assignment to `err` can be replaced with `err := util.ReadUint32(r, &i)`
./packages/dkg/messages.go:1367:5: sloppyReassign: re-assignment to `err` can be replaced with `err := util.WriteBytes16(w, d.SessionID)`
./packages/dkg/messages.go:1370:5: sloppyReassign: re-assignment to `err` can be replaced with `err := writePriShare(w, d.SecShare)`
./packages/dkg/messages.go:1373:5: sloppyReassign: re-assignment to `err` can be replaced with `err := writePriShare(w, d.RndShare)`
./packages/dkg/messages.go:1376:5: sloppyReassign: re-assignment to `err` can be replaced with `err := util.WriteUint32(w, d.T)`
./packages/dkg/messages.go:1379:5: sloppyReassign: re-assignment to `err` can be replaced with `err := util.WriteUint32(w, uint32(len(d.Commitments)))`
./packages/dkg/messages.go:1383:6: sloppyReassign: re-assignment to `err` can be replaced with `err := util.WriteMarshaled(w, d.Commitments[i])`
./packages/dkg/messages.go:97:1: unnamedResult: consider giving a name to these results
./packages/dkg/messages.go:539:2: unnecessaryBlock: block doesn't have definitions, can be simply deleted
./packages/dkg/messages.go:550:2: unnecessaryBlock: block doesn't have definitions, can be simply deleted
./packages/dkg/messages.go:82:44: whyNoLint: include an explanation for nolint directive
./packages/dkg/messages.go:87:44: whyNoLint: include an explanation for nolint directive
./packages/dkg/messages.go:256:1: whyNoLint: include an explanation for nolint directive
./packages/dkg/messages.go:288:1: whyNoLint: include an explanation for nolint directive
./packages/dkg/messages.go:426:1: whyNoLint: include an explanation for nolint directive
./packages/dkg/messages.go:451:1: whyNoLint: include an explanation for nolint directive
./packages/dkg/messages.go:530:1: whyNoLint: include an explanation for nolint directive
./packages/dkg/messages.go:701:1: whyNoLint: include an explanation for nolint directive
./packages/dkg/messages.go:722:1: whyNoLint: include an explanation for nolint directive
./packages/dkg/messages.go:774:1: whyNoLint: include an explanation for nolint directive
./packages/dkg/messages.go:804:1: whyNoLint: include an explanation for nolint directive
./packages/dkg/messages.go:863:1: whyNoLint: include an explanation for nolint directive
./packages/dkg/messages.go:893:1: whyNoLint: include an explanation for nolint directive
./packages/dkg/messages.go:953:1: whyNoLint: include an explanation for nolint directive
./packages/dkg/messages.go:982:1: whyNoLint: include an explanation for nolint directive
./packages/dkg/messages.go:1045:1: whyNoLint: include an explanation for nolint directive
./packages/dkg/messages.go:1071:1: whyNoLint: include an explanation for nolint directive
./packages/dkg/messages.go:1124:1: whyNoLint: include an explanation for nolint directive
./packages/dkg/messages.go:1153:1: whyNoLint: include an explanation for nolint directive
./packages/dkg/messages.go:1318:1: whyNoLint: include an explanation for nolint directive
./packages/dkg/messages.go:1338:1: whyNoLint: include an explanation for nolint directive
./packages/dkg/messages.go:1356:1: whyNoLint: include an explanation for nolint directive
./packages/dkg/node.go:142:7: sloppyReassign: re-assignment to `err` can be replaced with `err := n.Await(timeout)`
./packages/dkg/node.go:154:5: sloppyReassign: re-assignment to `err` can be replaced with `err := n.exchangeInitiatorAcks(netGroup, netGroup.AllNodes(), recvCh, rTimeout, gTimeout, rabinStep0Initialize,
func(peerIdx uint16, peer peering.PeerSender) {
n.log.Debugf("Initiator sends step=%v command to %v", rabinStep0Initialize, peer.NetID())
peer.SendMsg(makePeerMessage(initPeeringID, peering.PeerMessageReceiverDkgInit, rabinStep0Initialize, &initiatorInitMsg{
dkgRef: dkgID.String(),
peeringID: dkgID,
peerPubs: peerPubs,
initiatorPub: n.identity.GetPublicKey(),
threshold: threshold,
timeout: timeout,
roundRetry: roundRetry,
}))
},
)`
./packages/dkg/node.go:174:6: sloppyReassign: re-assignment to `err` can be replaced with `err := n.exchangeInitiatorStep(netGroup, netGroup.AllNodes(), recvCh, rTimeout, gTimeout, dkgID, rabinStep1R21SendDeals)`
./packages/dkg/node.go:177:6: sloppyReassign: re-assignment to `err` can be replaced with `err := n.exchangeInitiatorStep(netGroup, netGroup.AllNodes(), recvCh, rTimeout, gTimeout, dkgID, rabinStep2R22SendResponses)`
./packages/dkg/node.go:180:6: sloppyReassign: re-assignment to `err` can be replaced with `err := n.exchangeInitiatorStep(netGroup, netGroup.AllNodes(), recvCh, rTimeout, gTimeout, dkgID, rabinStep3R23SendJustifications)`
./packages/dkg/node.go:183:6: sloppyReassign: re-assignment to `err` can be replaced with `err := n.exchangeInitiatorStep(netGroup, netGroup.AllNodes(), recvCh, rTimeout, gTimeout, dkgID, rabinStep4R4SendSecretCommits)`
./packages/dkg/node.go:186:6: sloppyReassign: re-assignment to `err` can be replaced with `err := n.exchangeInitiatorStep(netGroup, netGroup.AllNodes(), recvCh, rTimeout, gTimeout, dkgID, rabinStep5R5SendComplaintCommits)`
./packages/dkg/node.go:194:5: sloppyReassign: re-assignment to `err` can be replaced with `err := n.exchangeInitiatorMsgs(netGroup, netGroup.AllNodes(), recvCh, rTimeout, gTimeout, rabinStep6R6SendReconstructCommits,
func(peerIdx uint16, peer peering.PeerSender) {
n.log.Debugf("Initiator sends step=%v command to %v", rabinStep6R6SendReconstructCommits, peer.NetID())
peer.SendMsg(makePeerMessage(dkgID, peering.PeerMessageReceiverDkg, rabinStep6R6SendReconstructCommits, &initiatorStepMsg{}))
},
func(recv *peering.PeerMessageGroupIn, initMsg initiatorMsg) (bool, error) {
switch msg := initMsg.(type) {
case *initiatorPubShareMsg:
pubShareResponses[int(recv.SenderIndex)] = msg
return true, nil
default:
n.log.Errorf("unexpected message type instead of initiatorPubShareMsg: %v", msg)
return false, errors.New("unexpected message type instead of initiatorPubShareMsg")
}
},
)`
./packages/dkg/node.go:233:5: sloppyReassign: re-assignment to `err` can be replaced with `err := n.exchangeInitiatorAcks(netGroup, netGroup.AllNodes(), recvCh, rTimeout, gTimeout, rabinStep7CommitAndTerminate,
func(peerIdx uint16, peer peering.PeerSender) {
n.log.Debugf("Initiator sends step=%v command to %v", rabinStep7CommitAndTerminate, peer.NetID())
peer.SendMsg(makePeerMessage(dkgID, peering.PeerMessageReceiverDkg, rabinStep7CommitAndTerminate, &initiatorDoneMsg{
edPubShares: edPublicShares,
blsPubShares: blsPublicShares,
}))
},
)`
./packages/dkg/node.go:99:1: whyNoLint: include an explanation for nolint directive
./packages/dkg/proc.go:663:2: commentedOutCode: may want to remove commented-out code
./packages/dkg/proc.go:504:1: whyNoLint: include an explanation for nolint directive
./packages/dkg/proc.go:505:60: whyNoLint: include an explanation for nolint directive
./packages/dkg/proc.go:769:28: whyNoLint: include an explanation for nolint directive
./packages/dkg/utils.go:27:1: whyNoLint: include an explanation for nolint directive
./packages/dkg/utils.go:32:1: whyNoLint: include an explanation for nolint directive
./packages/dkg/utils.go:45:1: whyNoLint: include an explanation for nolint directive
./packages/dkg/utils.go:54:1: whyNoLint: include an explanation for nolint directive
./packages/dkg/utils.go:67:1: whyNoLint: include an explanation for nolint directive
./packages/dkg/node_test.go:70:2: commentedOutCode: may want to remove commented-out code
./packages/evm/evmtest/contracts.go:33:2: commentFormatting: put a space between `//` and comment text
./packages/evm/evmtypes/callargs.go:15:20: hugeParam: c is heavy (120 bytes); consider passing it by pointer
./packages/evm/jsonrpc/evmchain.go:279:33: hugeParam: args is heavy (120 bytes); consider passing it by pointer
./packages/evm/jsonrpc/evmchain.go:289:32: hugeParam: callMsg is heavy (120 bytes); consider passing it by pointer
./packages/evm/jsonrpc/service.go:162:59: whyNoLint: include an explanation for nolint directive
./packages/evm/jsonrpc/service.go:310:47: whyNoLint: include an explanation for nolint directive
./packages/evm/jsonrpc/types.go:235:1: whyNoLint: include an explanation for nolint directive
./packages/evm/jsonrpc/types.go:310:1: whyNoLint: include an explanation for nolint directive
./packages/evm/jsonrpc/jsonrpctest/env.go:45:60: hugeParam: contractABI is heavy (528 bytes); consider passing it by pointer
./packages/evm/jsonrpc/jsonrpctest/env.go:115:27: hugeParam: msg is heavy (120 bytes); consider passing it by pointer
./packages/evm/jsonrpc/jsonrpctest/env.go:100:1: whyNoLint: include an explanation for nolint directive
./packages/gpa/acss/crypto/implicate.go:71:36: captLocal: `G' should not be capitalized
./packages/gpa/acss/crypto/implicate.go:71:51: captLocal: `H' should not be capitalized
./packages/gpa/acss/crypto/implicate.go:104:32: captLocal: `G' should not be capitalized
./packages/gpa/acss/crypto/implicate.go:104:47: captLocal: `H' should not be capitalized
./packages/gpa/acss/crypto/implicate.go:104:62: captLocal: `P1' should not be capitalized
./packages/gpa/acss/crypto/implicate.go:104:78: captLocal: `P2' should not be capitalized
./packages/gpa/acss/crypto/implicate.go:104:110: captLocal: `R1' should not be capitalized
./packages/gpa/acss/crypto/implicate.go:104:126: captLocal: `R2' should not be capitalized
./packages/gpa/acss/crypto/implicate.go:71:1: paramTypeCombine: func(suite suites.Suite, G kyber.Point, H kyber.Point, secret kyber.Scalar) (kyber.Scalar, kyber.Point, kyber.Point) could be replaced with func(suite suites.Suite, G, H kyber.Point, secret kyber.Scalar) (kyber.Scalar, kyber.Point, kyber.Point)
./packages/gpa/acss/crypto/implicate.go:104:1: paramTypeCombine: func(g kyber.Group, G kyber.Point, H kyber.Point, P1 kyber.Point, P2 kyber.Point, s kyber.Scalar, R1 kyber.Point, R2 kyber.Point) bool could be replaced with func(g kyber.Group, G, H, P1, P2 kyber.Point, s kyber.Scalar, R1, R2 kyber.Point) bool
./packages/gpa/acss/crypto/implicate.go:71:1: unnamedResult: consider giving a name to these results
./packages/gpa/acss/crypto/implicate.go:71:130: whyNoLint: include an explanation for nolint directive
./packages/gpa/acss/crypto/implicate.go:104:149: whyNoLint: include an explanation for nolint directive
./packages/gpa/acss/crypto/marshal.go:12:25: captLocal: `P' should not be capitalized
./packages/gpa/acss/crypto/marshal.go:12:68: whyNoLint: include an explanation for nolint directive
./packages/gpa/adkg/test_util.go:21:1: unnamedResult: consider giving a name to these results
./packages/isc/receipt.go:22:7: hugeParam: r is heavy (88 bytes); consider passing it by pointer
./packages/isc/receipt.go:30:7: hugeParam: r is heavy (88 bytes); consider passing it by pointer
./packages/isc/request_evm.go:154:58: hugeParam: callMsg is heavy (120 bytes); consider passing it by pointer
./packages/kv/kvstream.go:52:1: unnamedResult: consider giving a name to these results
./packages/kv/buffered/mutation.go:71:5: sloppyReassign: re-assignment to `err` can be replaced with `err := util.ReadUint32(r, &n)`
./packages/kv/buffered/mutation.go:85:5: sloppyReassign: re-assignment to `err` can be replaced with `err := util.ReadUint32(r, &n)`
./packages/kv/buffered/mutation.go:67:1: whyNoLint: include an explanation for nolint directive
./packages/kv/codec/encodego.go:14:1: whyNoLint: include an explanation for nolint directive
./packages/kv/codec/encodego.go:15:37: whyNoLint: include an explanation for nolint directive
./packages/kv/collections/tlog.go:354:1: unnamedResult: consider giving a name to these results
./packages/kv/collections/tlog.go:411:1: unnamedResult: consider giving a name to these results
./packages/kv/collections/tlog.go:473:1: unnamedResult: consider giving a name to these results
./packages/kv/collections/tlog.go:480:1: unnamedResult: consider giving a name to these results
./packages/kv/collections/tlog.go:353:1: whyNoLint: include an explanation for nolint directive
./packages/kv/collections/tlog.go:410:1: whyNoLint: include an explanation for nolint directive
./packages/kv/kvdecoder/kvdecoder.go:25:75: whyNoLint: include an explanation for nolint directive
./packages/kv/kvtest/testutil.go:80:1: unnamedResult: consider giving a name to these results
./packages/kv/kvtest/testutil.go:105:73: whyNoLint: include an explanation for nolint directive
./packages/kv/optimism/optimism_test.go:50:1: unnamedResult: consider giving a name to these results
./packages/l1connection/l1connection.go:157:1: whyNoLint: include an explanation for nolint directive
./packages/l1connection/pow.go:67:1: whyNoLint: include an explanation for nolint directive
./packages/peering/peer_message.go:58:5: sloppyReassign: re-assignment to `err` can be replaced with `err := m.PeeringID.Read(r)`
./packages/peering/peer_message.go:47:1: whyNoLint: include an explanation for nolint directive
./packages/peering/peering.go:147:1: unnamedResult: consider giving a name to these results
./packages/peering/group/group.go:106:1: whyNoLint: include an explanation for nolint directive
./packages/registry/registry_impl.go:313:1: unnamedResult: consider giving a name to these results
./packages/solo/evm.go:36:45: hugeParam: callMsg is heavy (120 bytes); consider passing it by pointer
./packages/solo/evm.go:72:38: hugeParam: callMsg is heavy (120 bytes); consider passing it by pointer
./packages/solo/ledgerl1l2.go:179:75: whyNoLint: include an explanation for nolint directive
./packages/solo/solo.go:219:1: unnamedResult: consider giving a name to these results
./packages/solo/solo.go:203:1: whyNoLint: include an explanation for nolint directive
./packages/state/mostate.go:100:2: commentedOutCode: may want to remove commented-out code
./packages/state/oreader.go:22:109: whyNoLint: include an explanation for nolint directive
./packages/state/state.go:36:64: whyNoLint: include an explanation for nolint directive
./packages/state/stateupdate.go:73:1: unnamedResult: consider giving a name to these results
./packages/state/stateupdate.go:23:64: whyNoLint: include an explanation for nolint directive
./packages/state/state_determinism_test.go:92:2: commentFormatting: put a space between `//` and comment text
./packages/state/state_determinism_test.go:92:2: commentedOutCode: may want to remove commented-out code
./packages/state/state_determinism_test.go:97:2: commentedOutCode: may want to remove commented-out code
./packages/state/state_determinism_test.go:110:2: commentedOutCode: may want to remove commented-out code
./packages/state/state_determinism_test.go:130:5: commentedOutCode: may want to remove commented-out code
./packages/state/state_determinism_test.go:180:3: commentedOutCode: may want to remove commented-out code
./packages/state/state_test.go:104:3: commentedOutCode: may want to remove commented-out code
./packages/subscribe/subscribe.go:40:4: commentedOutCode: may want to remove commented-out code
./packages/subscribe/subscribe.go:45:4: commentedOutCode: may want to remove commented-out code
./packages/subscribe/subscribe.go:78:1: whyNoLint: include an explanation for nolint directive
./packages/tcrypto/dkshare.go:172:1: whyNoLint: include an explanation for nolint directive
./packages/testutil/peeringNetBehaviourDynamic_test.go:27:2: commentedOutCode: may want to remove commented-out code
./packages/testutil/peeringNetBehaviourDynamic_test.go:66:2: unnecessaryBlock: block doesn't have definitions, can be simply deleted
./packages/testutil/peeringNetBehaviourDynamic_test.go:146:57: whyNoLint: include an explanation for nolint directive
./packages/testutil/peeringNetBehaviourDynamic_test.go:171:60: whyNoLint: include an explanation for nolint directive
./packages/testutil/peeringNetBehaviour_test.go:72:2: unnecessaryBlock: block doesn't have definitions, can be simply deleted
./packages/testutil/peeringNetBehaviour_test.go:122:2: unnecessaryBlock: block doesn't have definitions, can be simply deleted
./packages/testutil/peeringNetBehaviour_test.go:77:29: whyNoLint: include an explanation for nolint directive
./packages/testutil/peeringNetBehaviour_test.go:126:29: whyNoLint: include an explanation for nolint directive
./packages/testutil/testchain/mock_chain_core.go:43:71: whyNoLint: include an explanation for nolint directive
./packages/testutil/testlogger/logger.go:38:2: commentedOutCode: may want to remove commented-out code
./packages/transaction/nfttransaction.go:17:28: hugeParam: par is heavy (80 bytes); consider passing it by pointer
./packages/transaction/requesttx.go:36:29: hugeParam: params is heavy (120 bytes); consider passing it by pointer
./packages/transaction/requesttx.go:175:1: unnamedResult: consider giving a name to these results
./packages/transaction/util.go:296:3: nestingReduce: invert if cond, replace body with `continue`, move old body after the statement
./packages/transaction/util.go:159:1: whyNoLint: include an explanation for nolint directive
./packages/util/bitvector.go:61:1: unnamedResult: consider giving a name to these results
./packages/util/pipe/queue.go:118:1: whyNoLint: include an explanation for nolint directive
./packages/util/pipe/queue_test.go:162:3: ifElseChain: rewrite if-else to switch statement
./packages/util/pipe/queue_test.go:252:3: ifElseChain: rewrite if-else to switch statement
./packages/util/pipe/queue_test.go:343:3: ifElseChain: rewrite if-else to switch statement
./packages/vm/core/accounts/internal.go:129:1: unnamedResult: consider giving a name to these results
./packages/vm/core/accounts/internal.go:589:1: unnamedResult: consider giving a name to these results
./packages/vm/core/accounts/internal.go:723:1: unnamedResult: consider giving a name to these results
./packages/vm/core/accounts/internal.go:820:1: unnamedResult: consider giving a name to these results
./packages/vm/core/accounts/accounts_intern_test.go:37:2: commentedOutCode: may want to remove commented-out code
./packages/vm/core/accounts/accounts_intern_test.go:371:18: dupArg: suspicious method call with the same argument and receiver
./packages/vm/core/accounts/accounts_intern_test.go:373:18: dupArg: suspicious method call with the same argument and receiver
./packages/vm/core/accounts/accounts_intern_test.go:370:2: whyNoLint: include an explanation for nolint directive
./packages/vm/core/accounts/accounts_intern_test.go:372:2: whyNoLint: include an explanation for nolint directive
./packages/vm/core/blob/internal.go:74:1: unnamedResult: consider giving a name to these results
./packages/vm/core/blocklog/internal.go:286:1: unnamedResult: consider giving a name to these results
./packages/vm/core/blocklog/internal.go:302:1: unnamedResult: consider giving a name to these results
./packages/vm/core/corecontracts/debug.go:11:2: commentedOutCode: may want to remove commented-out code
./packages/vm/core/evm/emulator/emulator.go:147:35: hugeParam: callMsg is heavy (120 bytes); consider passing it by pointer
./packages/vm/core/evm/emulator/emulator.go:176:36: hugeParam: call is heavy (120 bytes); consider passing it by pointer
./packages/vm/core/evm/emulator/emulator.go:343:18: hugeParam: bloom is heavy (256 bytes); consider passing it by pointer
./packages/vm/core/evm/emulator/emulator.go:413:7: hugeParam: m is heavy (120 bytes); consider passing it by pointer
./packages/vm/core/evm/emulator/emulator.go:414:7: hugeParam: m is heavy (120 bytes); consider passing it by pointer
./packages/vm/core/evm/emulator/emulator.go:415:7: hugeParam: m is heavy (120 bytes); consider passing it by pointer
./packages/vm/core/evm/emulator/emulator.go:416:7: hugeParam: m is heavy (120 bytes); consider passing it by pointer
./packages/vm/core/evm/emulator/emulator.go:417:7: hugeParam: m is heavy (120 bytes); consider passing it by pointer
./packages/vm/core/evm/emulator/emulator.go:418:7: hugeParam: m is heavy (120 bytes); consider passing it by pointer
./packages/vm/core/evm/emulator/emulator.go:419:7: hugeParam: m is heavy (120 bytes); consider passing it by pointer
./packages/vm/core/evm/emulator/emulator.go:420:7: hugeParam: m is heavy (120 bytes); consider passing it by pointer
./packages/vm/core/evm/emulator/emulator.go:421:7: hugeParam: m is heavy (120 bytes); consider passing it by pointer
./packages/vm/core/evm/emulator/emulator.go:422:7: hugeParam: m is heavy (120 bytes); consider passing it by pointer
./packages/vm/core/evm/emulator/emulator.go:423:7: hugeParam: m is heavy (120 bytes); consider passing it by pointer
./packages/vm/core/evm/emulator/emulator_test.go:180:83: hugeParam: contractABI is heavy (528 bytes); consider passing it by pointer
./packages/vm/core/evm/emulator/emulator_test.go:221:2: unnecessaryBlock: block doesn't have definitions, can be simply deleted
./packages/vm/core/evm/emulator/emulator_test.go:225:3: unnecessaryBlock: block doesn't have definitions, can be simply deleted
./packages/vm/core/evm/emulator/emulator_test.go:302:2: unnecessaryBlock: block doesn't have definitions, can be simply deleted
./packages/vm/core/evm/evmimpl/iscmagic.go:115:1: unnamedResult: consider giving a name to these results
./packages/vm/core/evm/evmimpl/iscmagic.go:221:1: whyNoLint: include an explanation for nolint directive
./packages/vm/core/evm/evmimpl/iscmagic.go:365:1: whyNoLint: include an explanation for nolint directive
./packages/vm/core/evm/evmtest/evm_test.go:468:2: commentedOutCode: may want to remove commented-out code
./packages/vm/core/evm/evmtest/utils_test.go:310:39: hugeParam: callMsg is heavy (120 bytes); consider passing it by pointer
./packages/vm/core/evm/iscmagic/types.go:156:7: hugeParam: n is heavy (80 bytes); consider passing it by pointer
./packages/vm/core/evm/iscmagic/types.go:168:7: hugeParam: n is heavy (80 bytes); consider passing it by pointer
./packages/vm/core/evm/iscmagic/types.go:298:7: hugeParam: i is heavy (96 bytes); consider passing it by pointer
./packages/vm/core/testcore/base_test.go:483:2: commentFormatting: put a space between `//` and comment text
./packages/vm/core/testcore/base_test.go:462:2: commentedOutCode: may want to remove commented-out code
./packages/vm/core/testcore/base_test.go:482:2: commentedOutCode: may want to remove commented-out code
./packages/vm/core/testcore/errors_test.go:219:89: whyNoLint: include an explanation for nolint directive
./packages/vm/core/testcore/errors_test.go:252:86: whyNoLint: include an explanation for nolint directive
./packages/vm/core/testcore/governance_test.go:26:3: commentedOutCode: may want to remove commented-out code
./packages/vm/core/testcore/governance_test.go:34:3: commentedOutCode: may want to remove commented-out code
./packages/vm/core/testcore/governance_test.go:76:3: commentedOutCode: may want to remove commented-out code
./packages/vm/core/testcore/governance_test.go:86:3: commentedOutCode: may want to remove commented-out code
./packages/vm/core/testcore/governance_test.go:96:3: commentedOutCode: may want to remove commented-out code
./packages/vm/core/testcore/governance_test.go:124:2: commentedOutCode: may want to remove commented-out code
./packages/vm/core/testcore/sbtests/call_test.go:96:56: whyNoLint: include an explanation for nolint directive
./packages/vm/core/testcore/sbtests/call_test.go:120:64: whyNoLint: include an explanation for nolint directive
./packages/vm/core/testcore/sbtests/sandbox_panic_test.go:16:44: whyNoLint: include an explanation for nolint directive
./packages/vm/core/testcore/sbtests/sandbox_panic_test.go:109:56: whyNoLint: include an explanation for nolint directive
./packages/vm/core/testcore/sbtests/setup_test.go:81:2: commentFormatting: put a space between `//` and comment text
./packages/vm/sandbox/utils.go:112:2: commentedOutCode: may want to remove commented-out code
./packages/vm/sandbox/utils.go:120:1: unnamedResult: consider giving a name to these results
./packages/vm/vmcontext/privileged.go:37:1: unnamedResult: consider giving a name to these results
./packages/vm/vmcontext/sandbox.go:138:1: unnamedResult: consider giving a name to these results
./packages/vm/vmcontext/stateaccess.go:155:1: commentFormatting: put a space between `//` and comment text
./packages/vm/vmcontext/txbuilder.go:14:1: unnamedResult: consider giving a name to these results
./packages/vm/vmcontext/stateaccess_test.go:110:2: commentedOutCode: may want to remove commented-out code
./packages/vm/vmcontext/vmtxbuilder/foundries.go:17:1: unnamedResult: consider giving a name to these results
./packages/vm/vmcontext/vmtxbuilder/foundries.go:170:1: unnamedResult: consider giving a name to these results
./packages/vm/vmcontext/vmtxbuilder/tokens.go:135:1: unnamedResult: consider giving a name to these results
./packages/vm/vmcontext/vmtxbuilder/totals.go:142:1: unnamedResult: consider giving a name to these results
./packages/vm/vmcontext/vmtxbuilder/totals.go:150:1: unnamedResult: consider giving a name to these results
./packages/vm/vmcontext/vmtxbuilder/totals.go:156:1: unnamedResult: consider giving a name to these results
./packages/vm/vmcontext/vmtxbuilder/txbuilder.go:415:2: commentFormatting: put a space between `//` and comment text
./packages/vm/vmcontext/vmtxbuilder/txbuilder.go:415:2: commentedOutCode: may want to remove commented-out code
./packages/vm/vmcontext/vmtxbuilder/txbuilder.go:194:1: unnamedResult: consider giving a name to these results
./packages/wasmvm/wasmhost/wasmcontextsandbox.go:313:2: commentedOutCode: may want to remove commented-out code
./packages/wasmvm/wasmhost/wasmcontextsandbox.go:332:2: commentedOutCode: may want to remove commented-out code
./packages/wasmvm/wasmhost/wasmconvertor.go:118:30: whyNoLint: include an explanation for nolint directive
./packages/wasmvm/wasmhost/wasmprocessor.go:66:2: commentFormatting: put a space between `//` and comment text
./packages/wasmvm/wasmhost/wasmprocessor.go:66:2: commentedOutCode: may want to remove commented-out code
./packages/wasmvm/wasmhost/wasmtimevm.go:26:2: commentedOutCode: may want to remove commented-out code
./packages/wasmvm/wasmhost/wasmtimevm.go:72:2: commentedOutCode: may want to remove commented-out code
./packages/wasmvm/wasmhost/wasmvm.go:117:2: commentedOutCode: may want to remove commented-out code
./packages/wasmvm/wasmhost/wasmvm.go:178:4: commentedOutCode: may want to remove commented-out code
./packages/wasmvm/wasmlib/go/wasmlib/contract.go:100:3: appendCombine: can combine chain of 2 appends into one
./packages/wasmvm/wasmlib/go/wasmlib/sandbox.go:179:1: commentFormatting: put a space between `//` and comment text
./packages/wasmvm/wasmlib/go/wasmlib/sandbox.go:276:1: commentFormatting: put a space between `//` and comment text
./packages/wasmvm/wasmlib/go/wasmlib/sandbox.go:304:1: commentFormatting: put a space between `//` and comment text
./packages/wasmvm/wasmlib/go/wasmlib/sandboxutils.go:26:1: unnamedResult: consider giving a name to these results
./packages/wasmvm/wasmlib/go/wasmlib/wasmtypes/scbigint.go:86:1: unnamedResult: consider giving a name to these results
./packages/wasmvm/wasmlib/go/wasmlib/wasmtypes/scbigint.go:117:1: unnamedResult: consider giving a name to these results
./packages/wasmvm/wasmlib/go/wasmlib/wasmtypes/scbigint.go:187:1: unnamedResult: consider giving a name to these results
./packages/wasmvm/wasmlib/go/wasmlib/wasmtypes/scbigint.go:211:1: unnamedResult: consider giving a name to these results
./packages/wasmvm/wasmlib/go/wasmlib/wasmtypes/scint16.go:4:1: whyNoLint: include an explanation for nolint directive
./packages/wasmvm/wasmlib/go/wasmlib/wasmtypes/scnftid.go:4:1: whyNoLint: include an explanation for nolint directive
./packages/wasmvm/wasmlib/go/wasmlib/wasmtypes/sctokenid.go:4:1: whyNoLint: include an explanation for nolint directive
./packages/wasmvm/wasmlib/go/wasmlib/wasmtypes/scuint16.go:4:1: whyNoLint: include an explanation for nolint directive
./packages/wasmvm/wasmsolo/solocontext.go:145:2: commentFormatting: put a space between `//` and comment text
./packages/wasmvm/wasmsolo/solocontext.go:145:2: commentedOutCode: may want to remove commented-out code
./packages/wasmvm/wasmsolo/solocontext.go:440:2: ifElseChain: rewrite if-else to switch statement
./packages/wasmvm/wasmsolo/solosandbox.go:137:2: ifElseChain: rewrite if-else to switch statement
./packages/wasmvm/wasmsolo/solosandboxutils.go:28:1: commentFormatting: put a space between `//` and comment text
./packages/wasmvm/wasmsolo/solosandboxutils.go:84:1: commentFormatting: put a space between `//` and comment text
./packages/webapi/evm/waspbackend.go:99:45: hugeParam: callMsg is heavy (120 bytes); consider passing it by pointer
./packages/webapi/model/valuetxid.go:22:2: commentedOutCode: may want to remove commented-out code
./packages/webapi/model/valuetxid.go:33:2: commentedOutCode: may want to remove commented-out code
./tools/cluster/cluster.go:569:42: whyNoLint: include an explanation for nolint directive
./tools/cluster/listen.go:94:1: unnamedResult: consider giving a name to these results
./tools/cluster/tests/cluster_testutils.go:23:63: whyNoLint: include an explanation for nolint directive
./tools/cluster/tests/wasp-cli.go:168:26: regexpSimplify: can re-write `(?m)Address:[[:space:]]+([[:alnum:]]+)$` as `(?m)Address:\s+([[:alnum:]]+)$`
./tools/cluster/tests/wasp-cli.go:152:1: unnamedResult: consider giving a name to these results
./tools/cluster/tests/wasp-cli.go:77:76: whyNoLint: include an explanation for nolint directive
./tools/cluster/tests/wasp-cli.go:168:99: whyNoLint: include an explanation for nolint directive
./tools/cluster/tests/wasp-cli.go:103:11: wrapperFunc: use strings.ReplaceAll method in `strings.Replace(outStr, "\r", "", -1)`
./tools/cluster/tests/inccounter_test.go:46:3: commentFormatting: put a space between `//` and comment text
./tools/cluster/tests/maintenance_test.go:158:2: unnecessaryBlock: block doesn't have definitions, can be simply deleted
./tools/cluster/tests/missing_requests_test.go:59:2: commentedOutCode: may want to remove commented-out code
./tools/cluster/tests/spam_test.go:28:2: commentedOutCode: may want to remove commented-out code
./tools/cluster/tests/transfer_test.go:32:2: commentedOutCode: may want to remove commented-out code
./tools/cluster/tests/transfer_test.go:34:2: commentedOutCode: may want to remove commented-out code
./tools/cluster/tests/transfer_test.go:50:2: commentedOutCode: may want to remove commented-out code
./tools/cluster/tests/wasp-cli_test.go:105:1: unnamedResult: consider giving a name to these results
./tools/cluster/wasp-cluster/main.go:113:4: exitAfterDefer: os.Exit will exit, and `defer l1.Stop()` will not run
./tools/cluster/wasp-cluster/main.go:34:1: whyNoLint: include an explanation for nolint directive
./tools/cluster/wasp-cluster/main.go:113:15: whyNoLint: include an explanation for nolint directive
./tools/misc/bls_bench_test.go:38:23: whyNoLint: include an explanation for nolint directive
./tools/misc/ed25519_bench_test.go:17:2: commentFormatting: put a space between `//` and comment text
./tools/misc/ed25519_bench_test.go:16:2: commentedOutCode: may want to remove commented-out code
./tools/schema/generator/emitter.go:116:1: whyNoLint: include an explanation for nolint directive
./tools/schema/generator/emitter.go:273:1: whyNoLint: include an explanation for nolint directive
./tools/schema/generator/emitter.go:395:34: wrapperFunc: use strings.ReplaceAll method in `strings.Replace(moduleCwd[len(modulePath):], "\\", "/", -1)`
./tools/schema/model/field.go:54:1: whyNoLint: include an explanation for nolint directive
./tools/schema/model/schema.go:162:51: whyNoLint: include an explanation for nolint directive
./tools/schema/model/schema.go:205:52: whyNoLint: include an explanation for nolint directive
./tools/schema/model/schema.go:249:51: whyNoLint: include an explanation for nolint directive
./tools/schema/model/schema.go:288:52: whyNoLint: include an explanation for nolint directive
./tools/schema/model/yaml/parser.go:62:6: ifElseChain: rewrite if-else to switch statement
./tools/schema/model/yaml/parser.go:86:3: ifElseChain: rewrite if-else to switch statement
./tools/schema/model/yaml/parser.go:115:1: unnamedResult: consider giving a name to these results
./tools/schema/model/yaml/parser.go:11:1: whyNoLint: include an explanation for nolint directive
./tools/schema/model/yaml/convert_test.go:4:1: whyNoLint: include an explanation for nolint directive
./tools/schema/model/yaml/parser_test.go:4:1: whyNoLint: include an explanation for nolint directive
./tools/snap-cli/main.go:265:3: exitAfterDefer: os.Exit will exit, and `defer func(){...}(...)` will not run
./tools/snap-cli/main.go:265:14: whyNoLint: include an explanation for nolint directive
./tools/wasp-cli/main.go:31:14: whyNoLint: include an explanation for nolint directive
./tools/wasp-cli/metrics/nodeconn.go:76:11: wrapperFunc: use strings.ReplaceAll method in `strings.Replace(res[4], "\n", " ", -1)`
./tools/wasp-cli/util/sd_adjustment_prompt.go:32:6: equalFold: consider replacing with !strings.EqualFold(text, "y")
./tools/wasp-cli/util/token_parsing.go:30:6: equalFold: consider replacing with strings.EqualFold(parts[0], BaseTokenStr)
./tools/wasp-cli/util/types.go:22:1: whyNoLint: include an explanation for nolint directive
./tools/wasp-cli/util/types.go:113:1: whyNoLint: include an explanation for nolint directive golangci-lint just with gocritic enabled: $ golangci-lint run --verbose --disable-all --enable=gocritic
INFO [config_reader] Config search paths: [./ /mnt/Dev/Coding/iota/test/wasp /mnt/Dev/Coding/iota/test /mnt/Dev/Coding/iota /mnt/Dev/Coding /mnt/Dev /mnt / /home/luke]
INFO [config_reader] Used config file .golangci.yml
INFO [lintersdb] Active 46 linters: [asasalint asciicheck bidichk bodyclose contextcheck decorder depguard dogsled dupl errcheck execinquery exportloopref funlen goconst gocritic gocyclo goerr113 gofmt gofumpt goheader goimports gomodguard goprintffuncname gosec gosimple govet grouper importas ineffassign misspell nakedret noctx nolintlint predeclared revive rowserrcheck sqlclosecheck staticcheck tenv tparallel unconvert unparam unused usestdlibvars wastedassign whitespace]
INFO [loader] Go packages loading at mode 575 (exports_file|files|types_sizes|compiled_files|imports|name|deps) took 2.572855325s
INFO [runner/filename_unadjuster] Pre-built 0 adjustments in 98.545596ms
INFO [linters context] importas settings found, but no aliases listed. List aliases under alias: key.
INFO [linters context/goanalysis] analyzers took 10m2.794350378s with top 10 stages: gocritic: 5m35.253439356s, the_only_name: 32.795371194s, bidichk: 25.434130403s, buildir: 20.384535516s, buildssa: 18.490219037s, dupl: 10.718502335s, goimports: 8.591271395s, gofumpt: 8.501918591s, gofmt: 5.929320953s, misspell: 5.580730818s
ERRO [runner] Panic: gocritic: package "model" (isInitialPkg: true, needAnalyzeSource: true): unreachable: goroutine 152626 [running]:
runtime/debug.Stack()
runtime/debug/stack.go:24 +0x65
github.com/golangci/golangci-lint/pkg/golinters/goanalysis.(*action).analyzeSafe.func1()
github.com/golangci/golangci-lint/pkg/golinters/goanalysis/runner_action.go:101 +0x155
panic({0xf149a0, 0x12f3500})
runtime/panic.go:884 +0x212
github.com/quasilyte/go-ruleguard/internal/xtypes.typeIdentical({0x12fb460?, 0xc03f3f6630?}, {0x12fb208?, 0x19f41c0?}, 0x0)
github.com/quasilyte/go-ruleguard@v0.3.17/internal/xtypes/xtypes.go:218 +0x687
github.com/quasilyte/go-ruleguard/internal/xtypes.Identical(...)
github.com/quasilyte/go-ruleguard@v0.3.17/internal/xtypes/xtypes.go:57
github.com/quasilyte/go-ruleguard/ruleguard/typematch.(*Pattern).matchIdentical(0xc047c0a7c8?, 0xc015760c90, 0xc09060d560, {0x12fb460?, 0xc03f3f6630?})
github.com/quasilyte/go-ruleguard@v0.3.17/ruleguard/typematch/typematch.go:439 +0xba
github.com/quasilyte/go-ruleguard/ruleguard/typematch.(*Pattern).MatchIdentical(0xc009abde78, 0xc015760c90, {0x12fb460, 0xc03f3f6630})
github.com/quasilyte/go-ruleguard@v0.3.17/ruleguard/typematch/typematch.go:370 +0x15d
github.com/quasilyte/go-ruleguard/ruleguard.makeTypeIsFilter.func2(0xc014add138)
github.com/quasilyte/go-ruleguard@v0.3.17/ruleguard/filters.go:345 +0x117
github.com/quasilyte/go-ruleguard/ruleguard.(*rulesRunner).handleMatch(0xc014adcfc0, {0xc00873a420, 0x16, 0xc009abdf20, {0x111a3ff, 0x14}, {0x0, 0x0}, {0x108fc19, 0x2}, ...}, ...)
github.com/quasilyte/go-ruleguard@v0.3.17/ruleguard/runner.go:352 +0x130
github.com/quasilyte/go-ruleguard/ruleguard.(*rulesRunner).runRules.func1({{0x12fa8d0, 0xc051981bc0}, {0xc09beae300, 0x1, 0x8}})
github.com/quasilyte/go-ruleguard@v0.3.17/ruleguard/runner.go:252 +0xc5
github.com/quasilyte/gogrep.(*matcher).MatchNode(0xc009608680, 0xc014add030, {0x12fa8d0?, 0xc051981bc0?}, 0xc047c0ac88)
github.com/quasilyte/gogrep@v0.0.0-20220120141003-628d8b3623b5/match.go:84 +0x4e3
github.com/quasilyte/gogrep.(*Pattern).MatchNode(...)
github.com/quasilyte/gogrep@v0.0.0-20220120141003-628d8b3623b5/gogrep.go:90
github.com/quasilyte/go-ruleguard/ruleguard.(*rulesRunner).runRules(0xc014adcfc0?, {0x12fa8d0?, 0xc051981bc0?}, 0x7?)
github.com/quasilyte/go-ruleguard@v0.3.17/ruleguard/runner.go:251 +0x14b
github.com/quasilyte/go-ruleguard/ruleguard.(*rulesRunner).run.func1({0x12fa8d0?, 0xc051981bc0?}, 0xc09e5111d0?)
github.com/quasilyte/go-ruleguard@v0.3.17/ruleguard/runner.go:166 +0x33
github.com/quasilyte/go-ruleguard/ruleguard.(*astWalker).walk(0xc047c0b4f8, {0x12fa8d0?, 0xc051981bc0?})
github.com/quasilyte/go-ruleguard@v0.3.17/ruleguard/ast_walker.go:116 +0x22e
github.com/quasilyte/go-ruleguard/ruleguard.(*astWalker).walk(0xc047c0b4f8, {0x12fae20?, 0xc031b2f4a0?})
github.com/quasilyte/go-ruleguard@v0.3.17/ruleguard/ast_walker.go:136 +0x12dd
github.com/quasilyte/go-ruleguard/ruleguard.(*astWalker).walkExprList(0xc047c0b4f8?, {0xc051981c00?, 0x3, 0x40a80d?})
github.com/quasilyte/go-ruleguard@v0.3.17/ruleguard/ast_walker.go:31 +0x85
github.com/quasilyte/go-ruleguard/ruleguard.(*astWalker).walk(0xc047c0b4f8, {0x12faa38?, 0xc051981c80?})
github.com/quasilyte/go-ruleguard@v0.3.17/ruleguard/ast_walker.go:79 +0x15fe
github.com/quasilyte/go-ruleguard/ruleguard.(*astWalker).walk(0xc047c0b4f8, {0x12fb168?, 0xc00895c320?})
github.com/quasilyte/go-ruleguard@v0.3.17/ruleguard/ast_walker.go:126 +0x5ac
github.com/quasilyte/go-ruleguard/ruleguard.(*astWalker).walkExprList(0x12faf10?, {0xc0257b6740?, 0x1, 0x64?})
github.com/quasilyte/go-ruleguard@v0.3.17/ruleguard/ast_walker.go:31 +0x85
github.com/quasilyte/go-ruleguard/ruleguard.(*astWalker).walk(0xc047c0b4f8, {0x12faf10?, 0xc00895c340?})
github.com/quasilyte/go-ruleguard@v0.3.17/ruleguard/ast_walker.go:208 +0xcd2
github.com/quasilyte/go-ruleguard/ruleguard.(*astWalker).walkStmtList(0x12fa880?, {0xc0257b6750?, 0x1, 0x7fd4efb137b0?})
github.com/quasilyte/go-ruleguard@v0.3.17/ruleguard/ast_walker.go:37 +0x85
github.com/quasilyte/go-ruleguard/ruleguard.(*astWalker).walk(0xc047c0b4f8, {0x12fa880?, 0xc031b2f500?})
github.com/quasilyte/go-ruleguard@v0.3.17/ruleguard/ast_walker.go:218 +0x181e
github.com/quasilyte/go-ruleguard/ruleguard.(*astWalker).walk(0xc047c0b4f8, {0x12fabc8?, 0xc031b2f530?})
github.com/quasilyte/go-ruleguard@v0.3.17/ruleguard/ast_walker.go:360 +0x7d9
github.com/quasilyte/go-ruleguard/ruleguard.(*astWalker).walkDeclList(0xc047c0b4f8?, {0xc08ff39400?, 0x7, 0xc047c0b478?})
github.com/quasilyte/go-ruleguard@v0.3.17/ruleguard/ast_walker.go:43 +0x85
github.com/quasilyte/go-ruleguard/ruleguard.(*astWalker).walk(0xc047c0b4f8, {0x12fab78?, 0xc08ff39500?})
github.com/quasilyte/go-ruleguard@v0.3.17/ruleguard/ast_walker.go:367 +0x135e
github.com/quasilyte/go-ruleguard/ruleguard.(*astWalker).Walk(...)
github.com/quasilyte/go-ruleguard@v0.3.17/ruleguard/ast_walker.go:20
github.com/quasilyte/go-ruleguard/ruleguard.(*rulesRunner).run(0xc014adcfc0, 0xc08ff39500)
github.com/quasilyte/go-ruleguard@v0.3.17/ruleguard/runner.go:165 +0x1c9
github.com/quasilyte/go-ruleguard/ruleguard.(*engine).Run(0x404534?, 0x1b50360?, 0x0?, 0x9d9b4f?)
github.com/quasilyte/go-ruleguard@v0.3.17/ruleguard/engine.go:130 +0x45
github.com/quasilyte/go-ruleguard/ruleguard.(*Engine).Run(...)
github.com/quasilyte/go-ruleguard@v0.3.17/ruleguard/ruleguard.go:74
github.com/go-critic/go-critic/checkers.runRuleguardEngine(0xc058534408, 0xc08ff39500, 0xc066d6e2a0, 0xc02b339500)
github.com/go-critic/go-critic@v0.6.4/checkers/ruleguard_checker.go:301 +0xd9
github.com/go-critic/go-critic/checkers.(*embeddedRuleguardChecker).WalkFile(0xc006ffb540, 0xc08ff39500?)
github.com/go-critic/go-critic@v0.6.4/checkers/embedded_rules.go:98 +0xea
github.com/go-critic/go-critic/framework/linter.(*Checker).Check(...)
github.com/go-critic/go-critic@v0.6.4/framework/linter/linter.go:130
github.com/golangci/golangci-lint/pkg/golinters.runGocriticOnFile(0xc031f73380, 0xc00180ded5?, {0xc00d1f3000, 0x56, 0xf5af20?})
github.com/golangci/golangci-lint/pkg/golinters/gocritic.go:178 +0xd1
github.com/golangci/golangci-lint/pkg/golinters.runGocriticOnPackage(0xc031f73380, {0xc00d1f3000, 0x56, 0x80}, {0xc004e006c0, 0x12, 0x105a880?})
github.com/golangci/golangci-lint/pkg/golinters/gocritic.go:166 +0x1df
github.com/golangci/golangci-lint/pkg/golinters.(*goCriticWrapper).run(0xc00094e640, 0xc0991baf70)
github.com/golangci/golangci-lint/pkg/golinters/gocritic.go:126 +0x217
github.com/golangci/golangci-lint/pkg/golinters.NewGoCritic.func1(0xf531e0?)
github.com/golangci/golangci-lint/pkg/golinters/gocritic.go:49 +0x39
github.com/golangci/golangci-lint/pkg/golinters/goanalysis.(*action).analyze(0xc00624cc90)
github.com/golangci/golangci-lint/pkg/golinters/goanalysis/runner_action.go:187 +0x9d6
github.com/golangci/golangci-lint/pkg/golinters/goanalysis.(*action).analyzeSafe.func2()
github.com/golangci/golangci-lint/pkg/golinters/goanalysis/runner_action.go:105 +0x1d
github.com/golangci/golangci-lint/pkg/timeutils.(*Stopwatch).TrackStage(0xc002b80640, {0x10a7381, 0x8}, 0xc004760748)
github.com/golangci/golangci-lint/pkg/timeutils/stopwatch.go:111 +0x4a
github.com/golangci/golangci-lint/pkg/golinters/goanalysis.(*action).analyzeSafe(0xc00078a9c0?)
github.com/golangci/golangci-lint/pkg/golinters/goanalysis/runner_action.go:104 +0x85
github.com/golangci/golangci-lint/pkg/golinters/goanalysis.(*loadingPackage).analyze.func2(0xc00624cc90)
github.com/golangci/golangci-lint/pkg/golinters/goanalysis/runner_loadingpackage.go:80 +0xb4
created by github.com/golangci/golangci-lint/pkg/golinters/goanalysis.(*loadingPackage).analyze
github.com/golangci/golangci-lint/pkg/golinters/goanalysis/runner_loadingpackage.go:75 +0x1eb
WARN [runner] Can't run linter goanalysis_metalinter: goanalysis_metalinter: gocritic: package "model" (isInitialPkg: true, needAnalyzeSource: true): unreachable
WARN [linters context] rowserrcheck is disabled because of generics. You can track the evolution of the generics support by following the https://github.com/golangci/golangci-lint/issues/2649.
WARN [linters context] sqlclosecheck is disabled because of generics. You can track the evolution of the generics support by following the https://github.com/golangci/golangci-lint/issues/2649.
WARN [linters context] wastedassign is disabled because of generics. You can track the evolution of the generics support by following the https://github.com/golangci/golangci-lint/issues/2649.
INFO [runner] processing took 3.317µs with stages: max_same_issues: 781ns, skip_dirs: 321ns, max_from_linter: 280ns, filename_unadjuster: 241ns, nolint: 220ns, cgo: 170ns, exclude: 161ns, path_prettifier: 151ns, skip_files: 151ns, autogenerated_exclude: 150ns, path_prefixer: 71ns, source_code: 70ns, path_shortener: 70ns, identifier_marker: 70ns, sort_results: 70ns, diff: 70ns, severity-rules: 70ns, max_per_file_from_linter: 70ns, uniq_by_line: 70ns, exclude-rules: 60ns
INFO [runner] linters took 20.145531482s with stages: goanalysis_metalinter: 20.145461741s, rowserrcheck: 8.957µs, wastedassign: 7.654µs, sqlclosecheck: 7.634µs
ERRO Running error: 1 error occurred:
* can't run linter goanalysis_metalinter: goanalysis_metalinter: gocritic: package "model" (isInitialPkg: true, needAnalyzeSource: true): unreachable
INFO Memory: 225 samples, avg is 2124.3MB, max is 3709.4MB
INFO Execution took 22.825767632s |
are you using the same version of go-critic as golangci-lint v1.49.0? Line 31 in cc2d97f
|
Oh well, no I just installed the latest version according to the readme. Sorry. Good catch, this version has the the issue: $ gocritic check -enableAll ./...
./contracts/native/micropay/payment.go:27:2: commentedOutCode: may want to remove commented-out code
./core/database/versioning.go:26:37: whyNoLint: include an explanation for nolint directive
./packages/apilib/deploychain.go:42:25: hugeParam: par is heavy (152 bytes); consider passing it by pointer
./packages/apilib/deploychain.go:62:18: hugeParam: par is heavy (152 bytes); consider passing it by pointer
./packages/authentication/jwt_auth.go:177:1: unnamedResult: consider giving a name to these results
./packages/chain/chainimpl/eventproc.go:27:1: whyNoLint: include an explanation for nolint directive
./packages/chain/consensus/action.go:103:39: whyNoLint: include an explanation for nolint directive
./packages/chain/consensus/action.go:458:1: whyNoLint: include an explanation for nolint directive
./packages/chain/consensus/batch_proposal.go:138:3: commentedOutCode: may want to remove commented-out code
./packages/chain/consensus/batch_proposal.go:142:2: commentedOutCode: may want to remove commented-out code
./packages/chain/consensus/batch_proposal.go:204:1: unnamedResult: consider giving a name to these results
./packages/chain/consensus/consensus.go:178:1: whyNoLint: include an explanation for nolint directive
./packages/chain/consensus/mocked_env_test.go:139:1: paramTypeCombine: func(numRequests int, quorum int, timeout ...time.Duration) error could be replaced with func(numRequests, quorum int, timeout ...time.Duration) error
./packages/chain/consensus/mocked_env_test.go:139:98: whyNoLint: include an explanation for nolint directive
./packages/chain/consensus/mocked_node_test.go:78:2: commentedOutCode: may want to remove commented-out code
./packages/chain/consensus/mocked_node_test.go:47:86: whyNoLint: include an explanation for nolint directive
./packages/chain/consensus/commoncoin/commoncoin.go:55:1: unnamedResult: consider giving a name to these results
./packages/chain/consensus/commoncoin/commoncoin.go:59:1: unnamedResult: consider giving a name to these results
./packages/chain/consensus/commoncoin/commoncoin.go:95:1: unnamedResult: consider giving a name to these results
./packages/chain/consensus/commoncoin/commoncoin.go:128:1: unnamedResult: consider giving a name to these results
./packages/chain/consensus/commonsubset/commonsubset.go:421:1: whyNoLint: include an explanation for nolint directive
./packages/chain/consensus/commonsubset/commonsubset.go:562:1: whyNoLint: include an explanation for nolint directive
./packages/chain/consensus/journal/journal.go:106:32: whyNoLint: include an explanation for nolint directive
./packages/chain/dss/dss.go:156:1: whyNoLint: include an explanation for nolint directive
./packages/chain/dss/node/dss_series.go:43:1: unnamedResult: consider giving a name to these results
./packages/chain/dss/node/msg.go:26:1: unnamedResult: consider giving a name to these results
./packages/chain/statemgr/statemgr.go:205:1: whyNoLint: include an explanation for nolint directive
./packages/chain/statemgr/mocked_node_test.go:82:2: commentedOutCode: may want to remove commented-out code
./packages/cryptolib/byteutils/byteutils.go:8:1: paramTypeCombine: func(target []byte, targetOffset int, source []byte, sourceOffset int, sourceLength int) int could be replaced with func(target []byte, targetOffset int, source []byte, sourceOffset, sourceLength int) int
./packages/cryptolib/byteutils/byteutils.go:8:123: whyNoLint: include an explanation for nolint directive
./packages/database/dbmanager/db.go:68:2: commentedOutCode: may want to remove commented-out code
./packages/dkg/messages.go:259:5: sloppyReassign: re-assignment to `err` can be replaced with `err := util.WriteByte(w, m.step)`
./packages/dkg/messages.go:262:5: sloppyReassign: re-assignment to `err` can be replaced with `err := util.WriteString16(w, m.dkgRef)`
./packages/dkg/messages.go:268:5: sloppyReassign: re-assignment to `err` can be replaced with `err := util.WriteUint16(w, uint16(len(m.peerPubs)))`
./packages/dkg/messages.go:272:6: sloppyReassign: re-assignment to `err` can be replaced with `err := util.WriteBytes16(w, m.peerPubs[i].AsBytes())`
./packages/dkg/messages.go:276:5: sloppyReassign: re-assignment to `err` can be replaced with `err := util.WriteBytes16(w, m.initiatorPub.AsBytes())`
./packages/dkg/messages.go:279:5: sloppyReassign: re-assignment to `err` can be replaced with `err := util.WriteUint16(w, m.threshold)`
./packages/dkg/messages.go:282:5: sloppyReassign: re-assignment to `err` can be replaced with `err := util.WriteInt64(w, m.timeout.Milliseconds())`
./packages/dkg/messages.go:306:5: sloppyReassign: re-assignment to `err` can be replaced with `err := util.ReadUint16(r, &arrLen)`
./packages/dkg/messages.go:330:5: sloppyReassign: re-assignment to `err` can be replaced with `err := util.ReadUint16(r, &m.threshold)`
./packages/dkg/messages.go:334:5: sloppyReassign: re-assignment to `err` can be replaced with `err := util.ReadInt64(r, &timeoutMS)`
./packages/dkg/messages.go:339:5: sloppyReassign: re-assignment to `err` can be replaced with `err := util.ReadInt64(r, &roundRetryMS)`
./packages/dkg/messages.go:429:5: sloppyReassign: re-assignment to `err` can be replaced with `err := util.WriteByte(w, m.step)`
./packages/dkg/messages.go:432:5: sloppyReassign: re-assignment to `err` can be replaced with `err := util.WriteUint16(w, uint16(len(m.edPubShares)))`
./packages/dkg/messages.go:436:6: sloppyReassign: re-assignment to `err` can be replaced with `err := util.WriteMarshaled(w, m.edPubShares[i])`
./packages/dkg/messages.go:440:5: sloppyReassign: re-assignment to `err` can be replaced with `err := util.WriteUint16(w, uint16(len(m.blsPubShares)))`
./packages/dkg/messages.go:444:6: sloppyReassign: re-assignment to `err` can be replaced with `err := util.WriteMarshaled(w, m.blsPubShares[i])`
./packages/dkg/messages.go:460:5: sloppyReassign: re-assignment to `err` can be replaced with `err := util.ReadUint16(r, &arrLen)`
./packages/dkg/messages.go:472:5: sloppyReassign: re-assignment to `err` can be replaced with `err := util.ReadUint16(r, &arrLen)`
./packages/dkg/messages.go:533:5: sloppyReassign: re-assignment to `err` can be replaced with `err := util.WriteByte(w, m.step)`
./packages/dkg/messages.go:536:5: sloppyReassign: re-assignment to `err` can be replaced with `err := util.WriteBytes16(w, isc.BytesFromAddress(m.sharedAddress))`
./packages/dkg/messages.go:540:6: sloppyReassign: re-assignment to `err` can be replaced with `err := util.WriteMarshaled(w, m.edSharedPublic)`
./packages/dkg/messages.go:543:6: sloppyReassign: re-assignment to `err` can be replaced with `err := util.WriteMarshaled(w, m.edPublicShare)`
./packages/dkg/messages.go:546:6: sloppyReassign: re-assignment to `err` can be replaced with `err := util.WriteBytes16(w, m.edSignature)`
./packages/dkg/messages.go:551:6: sloppyReassign: re-assignment to `err` can be replaced with `err := util.WriteMarshaled(w, m.blsSharedPublic)`
./packages/dkg/messages.go:554:6: sloppyReassign: re-assignment to `err` can be replaced with `err := util.WriteMarshaled(w, m.blsPublicShare)`
./packages/dkg/messages.go:557:6: sloppyReassign: re-assignment to `err` can be replaced with `err := util.WriteBytes16(w, m.blsSignature)`
./packages/dkg/messages.go:704:5: sloppyReassign: re-assignment to `err` can be replaced with `err := util.WriteByte(w, m.step)`
./packages/dkg/messages.go:707:5: sloppyReassign: re-assignment to `err` can be replaced with `err := util.WriteUint32(w, m.deal.Index)`
./packages/dkg/messages.go:710:5: sloppyReassign: re-assignment to `err` can be replaced with `err := util.WriteMarshaled(w, m.deal.Deal.DHKey)`
./packages/dkg/messages.go:713:5: sloppyReassign: re-assignment to `err` can be replaced with `err := util.WriteBytes16(w, m.deal.Deal.Signature)`
./packages/dkg/messages.go:716:5: sloppyReassign: re-assignment to `err` can be replaced with `err := util.WriteBytes16(w, m.deal.Deal.Nonce)`
./packages/dkg/messages.go:728:5: sloppyReassign: re-assignment to `err` can be replaced with `err := util.ReadUint32(r, &m.deal.Index)`
./packages/dkg/messages.go:731:5: sloppyReassign: re-assignment to `err` can be replaced with `err := util.ReadMarshaled(r, m.deal.Deal.DHKey)`
./packages/dkg/messages.go:777:5: sloppyReassign: re-assignment to `err` can be replaced with `err := util.WriteByte(w, m.step)`
./packages/dkg/messages.go:781:5: sloppyReassign: re-assignment to `err` can be replaced with `err := util.WriteUint32(w, listLen)`
./packages/dkg/messages.go:785:6: sloppyReassign: re-assignment to `err` can be replaced with `err := util.WriteUint32(w, r.Index)`
./packages/dkg/messages.go:788:6: sloppyReassign: re-assignment to `err` can be replaced with `err := util.WriteBytes16(w, r.Response.SessionID)`
./packages/dkg/messages.go:791:6: sloppyReassign: re-assignment to `err` can be replaced with `err := util.WriteUint32(w, r.Response.Index)`
./packages/dkg/messages.go:794:6: sloppyReassign: re-assignment to `err` can be replaced with `err := util.WriteBoolByte(w, r.Response.Approved)`
./packages/dkg/messages.go:797:6: sloppyReassign: re-assignment to `err` can be replaced with `err := util.WriteBytes16(w, r.Response.Signature)`
./packages/dkg/messages.go:811:5: sloppyReassign: re-assignment to `err` can be replaced with `err := util.ReadUint32(r, &listLen)`
./packages/dkg/messages.go:820:6: sloppyReassign: re-assignment to `err` can be replaced with `err := util.ReadUint32(r, &response.Index)`
./packages/dkg/messages.go:826:6: sloppyReassign: re-assignment to `err` can be replaced with `err := util.ReadUint32(r, &response.Response.Index)`
./packages/dkg/messages.go:829:6: sloppyReassign: re-assignment to `err` can be replaced with `err := util.ReadBoolByte(r, &response.Response.Approved)`
./packages/dkg/messages.go:866:5: sloppyReassign: re-assignment to `err` can be replaced with `err := util.WriteByte(w, m.step)`
./packages/dkg/messages.go:870:5: sloppyReassign: re-assignment to `err` can be replaced with `err := util.WriteUint32(w, jLen)`
./packages/dkg/messages.go:874:6: sloppyReassign: re-assignment to `err` can be replaced with `err := util.WriteUint32(w, j.Index)`
./packages/dkg/messages.go:877:6: sloppyReassign: re-assignment to `err` can be replaced with `err := util.WriteBytes16(w, j.Justification.SessionID)`
./packages/dkg/messages.go:880:6: sloppyReassign: re-assignment to `err` can be replaced with `err := util.WriteUint32(w, j.Justification.Index)`
./packages/dkg/messages.go:883:6: sloppyReassign: re-assignment to `err` can be replaced with `err := writeVssDeal(w, j.Justification.Deal)`
./packages/dkg/messages.go:886:6: sloppyReassign: re-assignment to `err` can be replaced with `err := util.WriteBytes16(w, j.Justification.Signature)`
./packages/dkg/messages.go:900:5: sloppyReassign: re-assignment to `err` can be replaced with `err := util.ReadUint32(r, &jLen)`
./packages/dkg/messages.go:909:6: sloppyReassign: re-assignment to `err` can be replaced with `err := util.ReadUint32(r, &j.Index)`
./packages/dkg/messages.go:915:6: sloppyReassign: re-assignment to `err` can be replaced with `err := util.ReadUint32(r, &j.Justification.Index)`
./packages/dkg/messages.go:918:6: sloppyReassign: re-assignment to `err` can be replaced with `err := readVssDeal(r, &j.Justification.Deal, m.blsSuite)`
./packages/dkg/messages.go:956:5: sloppyReassign: re-assignment to `err` can be replaced with `err := util.WriteByte(w, m.step)`
./packages/dkg/messages.go:959:5: sloppyReassign: re-assignment to `err` can be replaced with `err := util.WriteBoolByte(w, m.secretCommits == nil)`
./packages/dkg/messages.go:965:5: sloppyReassign: re-assignment to `err` can be replaced with `err := util.WriteUint32(w, m.secretCommits.Index)`
./packages/dkg/messages.go:968:5: sloppyReassign: re-assignment to `err` can be replaced with `err := util.WriteUint32(w, uint32(len(m.secretCommits.Commitments)))`
./packages/dkg/messages.go:972:6: sloppyReassign: re-assignment to `err` can be replaced with `err := util.WriteMarshaled(w, m.secretCommits.Commitments[i])`
./packages/dkg/messages.go:976:5: sloppyReassign: re-assignment to `err` can be replaced with `err := util.WriteBytes16(w, m.secretCommits.SessionID)`
./packages/dkg/messages.go:989:5: sloppyReassign: re-assignment to `err` can be replaced with `err := util.ReadBoolByte(r, &isNil)`
./packages/dkg/messages.go:997:5: sloppyReassign: re-assignment to `err` can be replaced with `err := util.ReadUint32(r, &m.secretCommits.Index)`
./packages/dkg/messages.go:1001:5: sloppyReassign: re-assignment to `err` can be replaced with `err := util.ReadUint32(r, &cLen)`
./packages/dkg/messages.go:1007:6: sloppyReassign: re-assignment to `err` can be replaced with `err := util.ReadMarshaled(r, m.secretCommits.Commitments[i])`
./packages/dkg/messages.go:1048:5: sloppyReassign: re-assignment to `err` can be replaced with `err := util.WriteByte(w, m.step)`
./packages/dkg/messages.go:1051:5: sloppyReassign: re-assignment to `err` can be replaced with `err := util.WriteUint32(w, uint32(len(m.complaintCommits)))`
./packages/dkg/messages.go:1055:6: sloppyReassign: re-assignment to `err` can be replaced with `err := util.WriteUint32(w, m.complaintCommits[i].Index)`
./packages/dkg/messages.go:1058:6: sloppyReassign: re-assignment to `err` can be replaced with `err := util.WriteUint32(w, m.complaintCommits[i].DealerIndex)`
./packages/dkg/messages.go:1061:6: sloppyReassign: re-assignment to `err` can be replaced with `err := writeVssDeal(w, m.complaintCommits[i].Deal)`
./packages/dkg/messages.go:1064:6: sloppyReassign: re-assignment to `err` can be replaced with `err := util.WriteBytes16(w, m.complaintCommits[i].Signature)`
./packages/dkg/messages.go:1078:5: sloppyReassign: re-assignment to `err` can be replaced with `err := util.ReadUint32(r, &ccLen)`
./packages/dkg/messages.go:1084:6: sloppyReassign: re-assignment to `err` can be replaced with `err := util.ReadUint32(r, &m.complaintCommits[i].Index)`
./packages/dkg/messages.go:1087:6: sloppyReassign: re-assignment to `err` can be replaced with `err := util.ReadUint32(r, &m.complaintCommits[i].DealerIndex)`
./packages/dkg/messages.go:1090:6: sloppyReassign: re-assignment to `err` can be replaced with `err := readVssDeal(r, &m.complaintCommits[i].Deal, m.blsSuite)`
./packages/dkg/messages.go:1127:5: sloppyReassign: re-assignment to `err` can be replaced with `err := util.WriteByte(w, m.step)`
./packages/dkg/messages.go:1130:5: sloppyReassign: re-assignment to `err` can be replaced with `err := util.WriteUint32(w, uint32(len(m.reconstructCommits)))`
./packages/dkg/messages.go:1134:6: sloppyReassign: re-assignment to `err` can be replaced with `err := util.WriteBytes16(w, m.reconstructCommits[i].SessionID)`
./packages/dkg/messages.go:1137:6: sloppyReassign: re-assignment to `err` can be replaced with `err := util.WriteUint32(w, m.reconstructCommits[i].Index)`
./packages/dkg/messages.go:1140:6: sloppyReassign: re-assignment to `err` can be replaced with `err := util.WriteUint32(w, m.reconstructCommits[i].DealerIndex)`
./packages/dkg/messages.go:1143:6: sloppyReassign: re-assignment to `err` can be replaced with `err := writePriShare(w, m.reconstructCommits[i].Share)`
./packages/dkg/messages.go:1146:6: sloppyReassign: re-assignment to `err` can be replaced with `err := util.WriteBytes16(w, m.reconstructCommits[i].Signature)`
./packages/dkg/messages.go:1160:5: sloppyReassign: re-assignment to `err` can be replaced with `err := util.ReadUint32(r, &ccLen)`
./packages/dkg/messages.go:1169:6: sloppyReassign: re-assignment to `err` can be replaced with `err := util.ReadUint32(r, &m.reconstructCommits[i].Index)`
./packages/dkg/messages.go:1172:6: sloppyReassign: re-assignment to `err` can be replaced with `err := util.ReadUint32(r, &m.reconstructCommits[i].DealerIndex)`
./packages/dkg/messages.go:1175:6: sloppyReassign: re-assignment to `err` can be replaced with `err := readPriShare(r, &m.reconstructCommits[i].Share)`
./packages/dkg/messages.go:1326:5: sloppyReassign: re-assignment to `err` can be replaced with `err := util.WriteBoolByte(w, val == nil)`
./packages/dkg/messages.go:1332:5: sloppyReassign: re-assignment to `err` can be replaced with `err := util.WriteUint32(w, uint32(val.I))`
./packages/dkg/messages.go:1342:5: sloppyReassign: re-assignment to `err` can be replaced with `err := util.ReadBoolByte(r, &valNil)`
./packages/dkg/messages.go:1349:5: sloppyReassign: re-assignment to `err` can be replaced with `err := util.ReadUint32(r, &i)`
./packages/dkg/messages.go:1367:5: sloppyReassign: re-assignment to `err` can be replaced with `err := util.WriteBytes16(w, d.SessionID)`
./packages/dkg/messages.go:1370:5: sloppyReassign: re-assignment to `err` can be replaced with `err := writePriShare(w, d.SecShare)`
./packages/dkg/messages.go:1373:5: sloppyReassign: re-assignment to `err` can be replaced with `err := writePriShare(w, d.RndShare)`
./packages/dkg/messages.go:1376:5: sloppyReassign: re-assignment to `err` can be replaced with `err := util.WriteUint32(w, d.T)`
./packages/dkg/messages.go:1379:5: sloppyReassign: re-assignment to `err` can be replaced with `err := util.WriteUint32(w, uint32(len(d.Commitments)))`
./packages/dkg/messages.go:1383:6: sloppyReassign: re-assignment to `err` can be replaced with `err := util.WriteMarshaled(w, d.Commitments[i])`
./packages/dkg/messages.go:97:1: unnamedResult: consider giving a name to these results
./packages/dkg/messages.go:539:2: unnecessaryBlock: block doesn't have definitions, can be simply deleted
./packages/dkg/messages.go:550:2: unnecessaryBlock: block doesn't have definitions, can be simply deleted
./packages/dkg/messages.go:82:44: whyNoLint: include an explanation for nolint directive
./packages/dkg/messages.go:87:44: whyNoLint: include an explanation for nolint directive
./packages/dkg/messages.go:256:1: whyNoLint: include an explanation for nolint directive
./packages/dkg/messages.go:288:1: whyNoLint: include an explanation for nolint directive
./packages/dkg/messages.go:426:1: whyNoLint: include an explanation for nolint directive
./packages/dkg/messages.go:451:1: whyNoLint: include an explanation for nolint directive
./packages/dkg/messages.go:530:1: whyNoLint: include an explanation for nolint directive
./packages/dkg/messages.go:701:1: whyNoLint: include an explanation for nolint directive
./packages/dkg/messages.go:722:1: whyNoLint: include an explanation for nolint directive
./packages/dkg/messages.go:774:1: whyNoLint: include an explanation for nolint directive
./packages/dkg/messages.go:804:1: whyNoLint: include an explanation for nolint directive
./packages/dkg/messages.go:863:1: whyNoLint: include an explanation for nolint directive
./packages/dkg/messages.go:893:1: whyNoLint: include an explanation for nolint directive
./packages/dkg/messages.go:953:1: whyNoLint: include an explanation for nolint directive
./packages/dkg/messages.go:982:1: whyNoLint: include an explanation for nolint directive
./packages/dkg/messages.go:1045:1: whyNoLint: include an explanation for nolint directive
./packages/dkg/messages.go:1071:1: whyNoLint: include an explanation for nolint directive
./packages/dkg/messages.go:1124:1: whyNoLint: include an explanation for nolint directive
./packages/dkg/messages.go:1153:1: whyNoLint: include an explanation for nolint directive
./packages/dkg/messages.go:1318:1: whyNoLint: include an explanation for nolint directive
./packages/dkg/messages.go:1338:1: whyNoLint: include an explanation for nolint directive
./packages/dkg/messages.go:1356:1: whyNoLint: include an explanation for nolint directive
./packages/dkg/node.go:142:7: sloppyReassign: re-assignment to `err` can be replaced with `err := n.Await(timeout)`
./packages/dkg/node.go:154:5: sloppyReassign: re-assignment to `err` can be replaced with `err := n.exchangeInitiatorAcks(netGroup, netGroup.AllNodes(), recvCh, rTimeout, gTimeout, rabinStep0Initialize,
func(peerIdx uint16, peer peering.PeerSender) {
n.log.Debugf("Initiator sends step=%v command to %v", rabinStep0Initialize, peer.NetID())
peer.SendMsg(makePeerMessage(initPeeringID, peering.PeerMessageReceiverDkgInit, rabinStep0Initialize, &initiatorInitMsg{
dkgRef: dkgID.String(),
peeringID: dkgID,
peerPubs: peerPubs,
initiatorPub: n.identity.GetPublicKey(),
threshold: threshold,
timeout: timeout,
roundRetry: roundRetry,
}))
},
)`
./packages/dkg/node.go:174:6: sloppyReassign: re-assignment to `err` can be replaced with `err := n.exchangeInitiatorStep(netGroup, netGroup.AllNodes(), recvCh, rTimeout, gTimeout, dkgID, rabinStep1R21SendDeals)`
./packages/dkg/node.go:177:6: sloppyReassign: re-assignment to `err` can be replaced with `err := n.exchangeInitiatorStep(netGroup, netGroup.AllNodes(), recvCh, rTimeout, gTimeout, dkgID, rabinStep2R22SendResponses)`
./packages/dkg/node.go:180:6: sloppyReassign: re-assignment to `err` can be replaced with `err := n.exchangeInitiatorStep(netGroup, netGroup.AllNodes(), recvCh, rTimeout, gTimeout, dkgID, rabinStep3R23SendJustifications)`
./packages/dkg/node.go:183:6: sloppyReassign: re-assignment to `err` can be replaced with `err := n.exchangeInitiatorStep(netGroup, netGroup.AllNodes(), recvCh, rTimeout, gTimeout, dkgID, rabinStep4R4SendSecretCommits)`
./packages/dkg/node.go:186:6: sloppyReassign: re-assignment to `err` can be replaced with `err := n.exchangeInitiatorStep(netGroup, netGroup.AllNodes(), recvCh, rTimeout, gTimeout, dkgID, rabinStep5R5SendComplaintCommits)`
./packages/dkg/node.go:194:5: sloppyReassign: re-assignment to `err` can be replaced with `err := n.exchangeInitiatorMsgs(netGroup, netGroup.AllNodes(), recvCh, rTimeout, gTimeout, rabinStep6R6SendReconstructCommits,
func(peerIdx uint16, peer peering.PeerSender) {
n.log.Debugf("Initiator sends step=%v command to %v", rabinStep6R6SendReconstructCommits, peer.NetID())
peer.SendMsg(makePeerMessage(dkgID, peering.PeerMessageReceiverDkg, rabinStep6R6SendReconstructCommits, &initiatorStepMsg{}))
},
func(recv *peering.PeerMessageGroupIn, initMsg initiatorMsg) (bool, error) {
switch msg := initMsg.(type) {
case *initiatorPubShareMsg:
pubShareResponses[int(recv.SenderIndex)] = msg
return true, nil
default:
n.log.Errorf("unexpected message type instead of initiatorPubShareMsg: %v", msg)
return false, errors.New("unexpected message type instead of initiatorPubShareMsg")
}
},
)`
./packages/dkg/node.go:233:5: sloppyReassign: re-assignment to `err` can be replaced with `err := n.exchangeInitiatorAcks(netGroup, netGroup.AllNodes(), recvCh, rTimeout, gTimeout, rabinStep7CommitAndTerminate,
func(peerIdx uint16, peer peering.PeerSender) {
n.log.Debugf("Initiator sends step=%v command to %v", rabinStep7CommitAndTerminate, peer.NetID())
peer.SendMsg(makePeerMessage(dkgID, peering.PeerMessageReceiverDkg, rabinStep7CommitAndTerminate, &initiatorDoneMsg{
edPubShares: edPublicShares,
blsPubShares: blsPublicShares,
}))
},
)`
./packages/dkg/node.go:99:1: whyNoLint: include an explanation for nolint directive
./packages/dkg/proc.go:663:2: commentedOutCode: may want to remove commented-out code
./packages/dkg/proc.go:504:1: whyNoLint: include an explanation for nolint directive
./packages/dkg/proc.go:505:60: whyNoLint: include an explanation for nolint directive
./packages/dkg/proc.go:769:28: whyNoLint: include an explanation for nolint directive
./packages/dkg/utils.go:27:1: whyNoLint: include an explanation for nolint directive
./packages/dkg/utils.go:32:1: whyNoLint: include an explanation for nolint directive
./packages/dkg/utils.go:45:1: whyNoLint: include an explanation for nolint directive
./packages/dkg/utils.go:54:1: whyNoLint: include an explanation for nolint directive
./packages/dkg/utils.go:67:1: whyNoLint: include an explanation for nolint directive
./packages/dkg/node_test.go:70:2: commentedOutCode: may want to remove commented-out code
./packages/evm/evmtest/contracts.go:33:2: commentFormatting: put a space between `//` and comment text
./packages/evm/evmtypes/callargs.go:15:20: hugeParam: c is heavy (120 bytes); consider passing it by pointer
./packages/evm/jsonrpc/evmchain.go:279:33: hugeParam: args is heavy (120 bytes); consider passing it by pointer
./packages/evm/jsonrpc/evmchain.go:289:32: hugeParam: callMsg is heavy (120 bytes); consider passing it by pointer
./packages/evm/jsonrpc/service.go:162:59: whyNoLint: include an explanation for nolint directive
./packages/evm/jsonrpc/service.go:310:47: whyNoLint: include an explanation for nolint directive
./packages/evm/jsonrpc/types.go:235:1: whyNoLint: include an explanation for nolint directive
./packages/evm/jsonrpc/types.go:310:1: whyNoLint: include an explanation for nolint directive
./packages/evm/jsonrpc/jsonrpctest/env.go:45:60: hugeParam: contractABI is heavy (528 bytes); consider passing it by pointer
./packages/evm/jsonrpc/jsonrpctest/env.go:115:27: hugeParam: msg is heavy (120 bytes); consider passing it by pointer
./packages/evm/jsonrpc/jsonrpctest/env.go:100:1: whyNoLint: include an explanation for nolint directive
./packages/gpa/acss/crypto/implicate.go:71:36: captLocal: `G' should not be capitalized
./packages/gpa/acss/crypto/implicate.go:71:51: captLocal: `H' should not be capitalized
./packages/gpa/acss/crypto/implicate.go:104:32: captLocal: `G' should not be capitalized
./packages/gpa/acss/crypto/implicate.go:104:47: captLocal: `H' should not be capitalized
./packages/gpa/acss/crypto/implicate.go:104:62: captLocal: `P1' should not be capitalized
./packages/gpa/acss/crypto/implicate.go:104:78: captLocal: `P2' should not be capitalized
./packages/gpa/acss/crypto/implicate.go:104:110: captLocal: `R1' should not be capitalized
./packages/gpa/acss/crypto/implicate.go:104:126: captLocal: `R2' should not be capitalized
./packages/gpa/acss/crypto/implicate.go:71:1: paramTypeCombine: func(suite suites.Suite, G kyber.Point, H kyber.Point, secret kyber.Scalar) (kyber.Scalar, kyber.Point, kyber.Point) could be replaced with func(suite suites.Suite, G, H kyber.Point, secret kyber.Scalar) (kyber.Scalar, kyber.Point, kyber.Point)
./packages/gpa/acss/crypto/implicate.go:104:1: paramTypeCombine: func(g kyber.Group, G kyber.Point, H kyber.Point, P1 kyber.Point, P2 kyber.Point, s kyber.Scalar, R1 kyber.Point, R2 kyber.Point) bool could be replaced with func(g kyber.Group, G, H, P1, P2 kyber.Point, s kyber.Scalar, R1, R2 kyber.Point) bool
./packages/gpa/acss/crypto/implicate.go:71:1: unnamedResult: consider giving a name to these results
./packages/gpa/acss/crypto/implicate.go:71:130: whyNoLint: include an explanation for nolint directive
./packages/gpa/acss/crypto/implicate.go:104:149: whyNoLint: include an explanation for nolint directive
./packages/gpa/acss/crypto/marshal.go:12:25: captLocal: `P' should not be capitalized
./packages/gpa/acss/crypto/marshal.go:12:68: whyNoLint: include an explanation for nolint directive
./packages/gpa/adkg/test_util.go:21:1: unnamedResult: consider giving a name to these results
./packages/isc/receipt.go:22:7: hugeParam: r is heavy (88 bytes); consider passing it by pointer
./packages/isc/receipt.go:30:7: hugeParam: r is heavy (88 bytes); consider passing it by pointer
./packages/isc/request_evm.go:154:58: hugeParam: callMsg is heavy (120 bytes); consider passing it by pointer
./packages/kv/kvstream.go:52:1: unnamedResult: consider giving a name to these results
./packages/kv/buffered/mutation.go:71:5: sloppyReassign: re-assignment to `err` can be replaced with `err := util.ReadUint32(r, &n)`
./packages/kv/buffered/mutation.go:85:5: sloppyReassign: re-assignment to `err` can be replaced with `err := util.ReadUint32(r, &n)`
./packages/kv/buffered/mutation.go:67:1: whyNoLint: include an explanation for nolint directive
./packages/kv/codec/encodego.go:14:1: whyNoLint: include an explanation for nolint directive
./packages/kv/codec/encodego.go:15:37: whyNoLint: include an explanation for nolint directive
./packages/kv/collections/tlog.go:354:1: unnamedResult: consider giving a name to these results
./packages/kv/collections/tlog.go:411:1: unnamedResult: consider giving a name to these results
./packages/kv/collections/tlog.go:473:1: unnamedResult: consider giving a name to these results
./packages/kv/collections/tlog.go:480:1: unnamedResult: consider giving a name to these results
./packages/kv/collections/tlog.go:353:1: whyNoLint: include an explanation for nolint directive
./packages/kv/collections/tlog.go:410:1: whyNoLint: include an explanation for nolint directive
./packages/kv/kvdecoder/kvdecoder.go:25:75: whyNoLint: include an explanation for nolint directive
./packages/kv/kvtest/testutil.go:80:1: unnamedResult: consider giving a name to these results
./packages/kv/kvtest/testutil.go:105:73: whyNoLint: include an explanation for nolint directive
./packages/kv/optimism/optimism_test.go:50:1: unnamedResult: consider giving a name to these results
./packages/l1connection/l1connection.go:157:1: whyNoLint: include an explanation for nolint directive
./packages/l1connection/pow.go:67:1: whyNoLint: include an explanation for nolint directive
panic: unreachable [recovered]
panic: unreachable
goroutine 50757 [running]:
github.com/go-critic/go-critic/framework/lintmain/internal/check.(*program).checkFile.func1.1()
/home/luke/go/pkg/mod/github.com/go-critic/go-critic@v0.6.4/framework/lintmain/internal/check/check.go:160 +0x11e
panic({0x9b67a0, 0xae44b0})
/usr/lib/go/src/runtime/panic.go:884 +0x212
github.com/quasilyte/go-ruleguard/internal/xtypes.typeIdentical({0xae83b0?, 0xc003cec150?}, {0xae8298?, 0xc0000d6850?}, 0x0)
/home/luke/go/pkg/mod/github.com/quasilyte/go-ruleguard@v0.3.17/internal/xtypes/xtypes.go:218 +0x687
github.com/quasilyte/go-ruleguard/internal/xtypes.Identical(...)
/home/luke/go/pkg/mod/github.com/quasilyte/go-ruleguard@v0.3.17/internal/xtypes/xtypes.go:57
github.com/quasilyte/go-ruleguard/ruleguard/typematch.(*Pattern).matchIdentical(0xc01262b270?, 0xc009087710, 0xc0060d91a0, {0xae83b0?, 0xc003cec150?})
/home/luke/go/pkg/mod/github.com/quasilyte/go-ruleguard@v0.3.17/ruleguard/typematch/typematch.go:439 +0xba
github.com/quasilyte/go-ruleguard/ruleguard/typematch.(*Pattern).MatchIdentical(0xc003bab628, 0xc009087710, {0xae83b0, 0xc003cec150})
/home/luke/go/pkg/mod/github.com/quasilyte/go-ruleguard@v0.3.17/ruleguard/typematch/typematch.go:370 +0x15d
github.com/quasilyte/go-ruleguard/ruleguard.makeTypeIsFilter.func2(0xc01264b138)
/home/luke/go/pkg/mod/github.com/quasilyte/go-ruleguard@v0.3.17/ruleguard/filters.go:345 +0x117
github.com/quasilyte/go-ruleguard/ruleguard.makeAndFilter.func1(0xa0c4a0?)
/home/luke/go/pkg/mod/github.com/quasilyte/go-ruleguard@v0.3.17/ruleguard/filters.go:46 +0x2e
github.com/quasilyte/go-ruleguard/ruleguard.(*rulesRunner).handleMatch(0xc01264afc0, {0xc00505d3f0, 0x2d8, 0xc003bab700, {0xa66a24, 0x34}, {0x0, 0x0}, {0x0, 0x0}, ...}, ...)
/home/luke/go/pkg/mod/github.com/quasilyte/go-ruleguard@v0.3.17/ruleguard/runner.go:352 +0x130
github.com/quasilyte/go-ruleguard/ruleguard.(*rulesRunner).runRules.func1({{0xae7938, 0xc002e41780}, {0xc012647700, 0x3, 0x8}})
/home/luke/go/pkg/mod/github.com/quasilyte/go-ruleguard@v0.3.17/ruleguard/runner.go:252 +0xc5
github.com/quasilyte/gogrep.(*matcher).MatchNode(0xc0050a8180, 0xc01264b030, {0xae7938?, 0xc002e41780?}, 0xc01262b758)
/home/luke/go/pkg/mod/github.com/quasilyte/gogrep@v0.0.0-20220120141003-628d8b3623b5/match.go:84 +0x4e3
github.com/quasilyte/gogrep.(*Pattern).MatchNode(...)
/home/luke/go/pkg/mod/github.com/quasilyte/gogrep@v0.0.0-20220120141003-628d8b3623b5/gogrep.go:90
github.com/quasilyte/go-ruleguard/ruleguard.(*rulesRunner).runRules(0xc01264afc0?, {0xae7938?, 0xc002e41780?}, 0x2?)
/home/luke/go/pkg/mod/github.com/quasilyte/go-ruleguard@v0.3.17/ruleguard/runner.go:251 +0x14b
github.com/quasilyte/go-ruleguard/ruleguard.(*rulesRunner).run.func1({0xae7938?, 0xc002e41780?}, 0xc01262b858?)
/home/luke/go/pkg/mod/github.com/quasilyte/go-ruleguard@v0.3.17/ruleguard/runner.go:166 +0x33
github.com/quasilyte/go-ruleguard/ruleguard.(*astWalker).walk(0xc01262bc18, {0xae7938?, 0xc002e41780?})
/home/luke/go/pkg/mod/github.com/quasilyte/go-ruleguard@v0.3.17/ruleguard/ast_walker.go:194 +0x1851
github.com/quasilyte/go-ruleguard/ruleguard.(*astWalker).walkStmtList(0xae7a28?, {0xc002e35650?, 0x1, 0x7f80b8467e10?})
/home/luke/go/pkg/mod/github.com/quasilyte/go-ruleguard@v0.3.17/ruleguard/ast_walker.go:37 +0x85
github.com/quasilyte/go-ruleguard/ruleguard.(*astWalker).walk(0xc01262bc18, {0xae7a28?, 0xc002e19650?})
/home/luke/go/pkg/mod/github.com/quasilyte/go-ruleguard@v0.3.17/ruleguard/ast_walker.go:218 +0x181e
github.com/quasilyte/go-ruleguard/ruleguard.(*astWalker).walk(0xc01262bc18, {0xae7cf8?, 0xc002e19680?})
/home/luke/go/pkg/mod/github.com/quasilyte/go-ruleguard@v0.3.17/ruleguard/ast_walker.go:360 +0x7d9
github.com/quasilyte/go-ruleguard/ruleguard.(*astWalker).walkDeclList(0xc0127d3c18?, {0xc002a38b00?, 0xa, 0xc0127d3b98?})
/home/luke/go/pkg/mod/github.com/quasilyte/go-ruleguard@v0.3.17/ruleguard/ast_walker.go:43 +0x85
github.com/quasilyte/go-ruleguard/ruleguard.(*astWalker).walk(0xc0127d3c18, {0xae7ca8?, 0xc00542a880?})
/home/luke/go/pkg/mod/github.com/quasilyte/go-ruleguard@v0.3.17/ruleguard/ast_walker.go:367 +0x135e
github.com/quasilyte/go-ruleguard/ruleguard.(*astWalker).Walk(...)
/home/luke/go/pkg/mod/github.com/quasilyte/go-ruleguard@v0.3.17/ruleguard/ast_walker.go:20
github.com/quasilyte/go-ruleguard/ruleguard.(*rulesRunner).run(0xc01264afc0, 0xc00542a880)
/home/luke/go/pkg/mod/github.com/quasilyte/go-ruleguard@v0.3.17/ruleguard/runner.go:165 +0x1c9
github.com/quasilyte/go-ruleguard/ruleguard.(*engine).Run(0xae7938?, 0x59ae6d?, 0x0?, 0xae7128?)
/home/luke/go/pkg/mod/github.com/quasilyte/go-ruleguard@v0.3.17/ruleguard/engine.go:130 +0x45
github.com/quasilyte/go-ruleguard/ruleguard.(*Engine).Run(...)
/home/luke/go/pkg/mod/github.com/quasilyte/go-ruleguard@v0.3.17/ruleguard/ruleguard.go:74
github.com/go-critic/go-critic/checkers.runRuleguardEngine(0xc009174c08, 0xc00542a880, 0xc006f07060, 0xc012639e30)
/home/luke/go/pkg/mod/github.com/go-critic/go-critic@v0.6.4/checkers/ruleguard_checker.go:301 +0xd9
github.com/go-critic/go-critic/checkers.(*embeddedRuleguardChecker).WalkFile(0xc006f074b0, 0xc00574b680?)
/home/luke/go/pkg/mod/github.com/go-critic/go-critic@v0.6.4/checkers/embedded_rules.go:98 +0xea
github.com/go-critic/go-critic/framework/linter.(*Checker).Check(...)
/home/luke/go/pkg/mod/github.com/go-critic/go-critic@v0.6.4/framework/linter/linter.go:130
github.com/go-critic/go-critic/framework/lintmain/internal/check.(*program).checkFile.func1(0x25, 0xc009174c00)
/home/luke/go/pkg/mod/github.com/go-critic/go-critic@v0.6.4/framework/lintmain/internal/check/check.go:164 +0xc2
created by github.com/go-critic/go-critic/framework/lintmain/internal/check.(*program).checkFile
/home/luke/go/pkg/mod/github.com/go-critic/go-critic@v0.6.4/framework/lintmain/internal/check/check.go:146 +0xa5 So it seems like upgrading the go-critic version in golangci-lint could solve the problem? |
So the issue is already fixed by #3150 |
Welcome
Description of the problem
Hey, thanks a lot for this great piece of software. It has helped tremendously during development.
Today it started to act out though, and I'm not quite sure why. I've tried to google the error, but
unreachable
seems not so common?The main application itself builds fine. (It also contains multiple tools, all of them build fine
go build ./...
).I've tried to figure out the problem by adding folders to
skip-dirs
configuration, but even if I blacklist all folders wheremodel
is referenced, the linter still throws this error. (mainly,packages
/plugins
)The configuration itself seems to get pulled and used though. If I disable all linters inside the configuration, I get an error that at least one linter needs to be enabled.
Thanks in advance!
Version of golangci-lint
Configuration file
Go environment
Verbose output of running
Code example or link to a public repository
The text was updated successfully, but these errors were encountered: