You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
lockstore/lockstore.go:65:16: func (*node).entryLen is unused (U1000)
lockstore/lockstore.go:236:21: func (*MemStore).getNode is unused (U1000)
metrics/metrics.go:99:26: prometheus.Handler is deprecated: Please note the issues described in the doc comment of InstrumentHandler. You might want to consider using promhttp.Handler instead. (SA1019)
pd/client.go:63:2: var errFailInitClusterID is unused (U1000)
rocksdb/filter_builder.go:49:34: should use !bytes.Equal(b.lastWholeKey, key) instead (S1004)
rocksdb/filter_builder.go:74:33: should use !bytes.Equal(b.lastPrefix, prefix) instead (S1004)
rocksdb/options.go:17:2: only the first constant in this group has an explicit type (SA9004)
rocksdb/options.go:41:2: only the first constant in this group has an explicit type (SA9004)
rocksdb/sst_file_iterator.go:171:2: should use 'return ' instead of 'if { return }; return ' (S1008)
tikv/closure_exec.go:267:2: field count is unused (U1000)
tikv/closure_exec.go:268:2: field limit is unused (U1000)
tikv/closure_exec.go:661:6: this value of err is never used (SA4006)
tikv/cop_handler.go:23:5: var dummySlice is unused (U1000)
tikv/cop_handler.go:151:23: func (*evalContext).newRowDecoderForOffsets is unused (U1000)
tikv/cop_handler.go:172:23: func (*evalContext).decodeRelatedColumnVals is unused (U1000)
tikv/cop_handler_test.go:264:22: store.svr.buildDAGExecutor undefined (type *Server has no field or method buildDAGExecutor) (compile)
tikv/dbreader/db_reader.go:124:2: redundant return statement (S1023)
tikv/mvcc/tikv.go:146:3: this value of data is never used (SA4006)
tikv/raftstore/applier.go:79:6: type keyRange is unused (U1000)
tikv/raftstore/applier.go:149:2: field ranges is unused (U1000)
tikv/raftstore/applier.go:263:2: redundant return statement (S1023)
tikv/raftstore/applier.go:530:2: field merged is unused (U1000)
tikv/raftstore/applier.go:540:2: field readySourceRegion is unused (U1000)
tikv/raftstore/applier.go:1036:2: redundant return statement (S1023)
tikv/raftstore/applier.go:1094:2: redundant return statement (S1023)
tikv/raftstore/applier.go:1119:2: redundant return statement (S1023)
tikv/raftstore/applier.go:1159:2: redundant return statement (S1023)
tikv/raftstore/applier.go:1430:2: field merge is unused (U1000)
tikv/raftstore/applier.go:1431:2: field readyToMerge is unused (U1000)
tikv/raftstore/applier.go:1527:19: func (*applier).resumePendingMerge is unused (U1000)
tikv/raftstore/config.go:267:20: error strings should not end with punctuation or a newline (ST1005)
tikv/raftstore/config.go:289:20: error strings should not end with punctuation or a newline (ST1005)
tikv/raftstore/config.go:298:20: error strings should not be capitalized (ST1005)
tikv/raftstore/config.go:302:20: error strings should not end with punctuation or a newline (ST1005)
tikv/raftstore/config.go:311:20: error strings should not end with punctuation or a newline (ST1005)
tikv/raftstore/fsm_peer.go:87:20: func (*peerFsm).drop is unused (U1000)
tikv/raftstore/fsm_peer.go:91:20: func (*peerFsm).regionID is unused (U1000)
tikv/raftstore/fsm_peer.go:115:20: func (*peerFsm).hasPendingMergeApplyResult is unused (U1000)
tikv/raftstore/fsm_peer.go:232:27: func (*peerFsmDelegate).resumeHandlePendingApplyResult is unused (U1000)
tikv/raftstore/fsm_peer.go:879:27: func (*peerFsmDelegate).validateMergePeer is unused (U1000)
tikv/raftstore/fsm_peer.go:883:27: func (*peerFsmDelegate).scheduleMerge is unused (U1000)
tikv/raftstore/fsm_peer.go:887:27: func (*peerFsmDelegate).rollbackMerge is unused (U1000)
tikv/raftstore/fsm_peer.go:1198:3: should use bytes.Equal(leftKey[:tablecodec.TableSplitKeyLen], rightKey[:tablecodec.TableSplitKeyLen]) instead (S1004)
tikv/raftstore/fsm_peer.go:1409:4: should use 'return ' instead of 'if { return }; return ' (S1008)
tikv/raftstore/fsm_store.go:89:2: field cleanUpSSTScheduler is unused (U1000)
tikv/raftstore/fsm_store.go:109:24: func (*PollContext).flushLocalStats is unused (U1000)
tikv/raftstore/fsm_store.go:170:2: field lastCompactCheckKey is unused (U1000)
tikv/raftstore/fsm_store.go:171:2: field stopped is unused (U1000)
tikv/raftstore/fsm_store.go:249:2: field resolverScheduler is unused (U1000)
tikv/raftstore/fsm_store.go:250:2: field snapScheduler is unused (U1000)
tikv/raftstore/fsm_store.go:918:6: type regionIDDeclinedBytesPair is unused (U1000)
tikv/raftstore/fsm_store.go:923:6: func calcRegionDeclinedBytes is unused (U1000)
tikv/raftstore/io_limiter.go:20:2: field limiter is unused (U1000)
tikv/raftstore/msg.go:55:2: const msgDefaultChanSize is unused (U1000)
tikv/raftstore/peer.go:466:50: should use time.Since instead of time.Now().Sub (S1012)
tikv/raftstore/peer.go:1072:7: should use !bytes.Equal(state.RequestCtx, read.binaryId()) instead (S1004)
tikv/raftstore/peer.go:1085:7: should use !bytes.Equal(state.RequestCtx, read.binaryId()) instead (S1004)
tikv/raftstore/peer.go:1467:21: error strings should not end with punctuation or a newline (ST1005)
tikv/raftstore/peer.go:1489:20: error strings should not end with punctuation or a newline (ST1005)
tikv/raftstore/peer.go:1493:20: error strings should not end with punctuation or a newline (ST1005)
tikv/raftstore/peer.go:1530:23: error strings should not end with punctuation or a newline (ST1005)
tikv/raftstore/peer.go:1591:23: error strings should not end with punctuation or a newline (ST1005)
tikv/raftstore/peer.go:1705:44: error strings should not end with punctuation or a newline (ST1005)
tikv/raftstore/peer_state.go:102:2: field closeCh is unused (U1000)
tikv/raftstore/peer_storage.go:203:6: func recoverFromApplyingState is unused (U1000)
tikv/raftstore/peer_storage.go:499:22: this value of err is never used (SA4006)
tikv/raftstore/raft_client.go:122:2: should write v := c.addrs[storeID] instead of v, _ := c.addrs[storeID] (S1005)
tikv/raftstore/snap.go:140:6: func copySnapshot is unused (U1000)
tikv/raftstore/snap.go:506:10: empty branch (SA9003)
tikv/raftstore/snap_test.go:48:72: undeclared name: DBBundle (compile)
tikv/raftstore/ticker.go:100:20: using time.Tick leaks the underlying ticker, consider using it only in endless functions, tests and the main package, and use time.NewTicker here (SA1015)
tikv/raftstore/ticker.go:107:18: should omit value from range; this loop is equivalent to for regionID := range ... (S1005)
tikv/raftstore/util.go:321:20: error strings should not end with punctuation or a newline (ST1005)
tikv/raftstore/util.go:325:20: error strings should not end with punctuation or a newline (ST1005)
tikv/raftstore/worker.go:50:2: const taskTypeCompact is unused (U1000)
tikv/raftstore/worker.go:51:2: const taskTypeCheckAndCompact is unused (U1000)
tikv/raftstore/worker.go:154:6: type compactTask is unused (U1000)
tikv/raftstore/worker.go:158:6: type checkAndCompactTask is unused (U1000)
tikv/raftstore/worker.go:184:2: field closeCh is unused (U1000)
tikv/raftstore/worker.go:440:43: func (*pendingDeleteRanges).remove is unused (U1000)
tikv/raftstore/worker.go:450:43: func (*pendingDeleteRanges).timeoutRanges is unused (U1000)
tikv/raftstore/worker.go:482:24: func stalePeerInfo.timeout is unused (U1000)
tikv/raftstore/worker.go:626:74: should use time.Since instead of time.Now().Sub (S1012)
tikv/raftstore/worker.go:651:19: plainFileUsed is a pure function but its return value is ignored (SA4017)
tikv/raftstore/worker.go:876:24: func (*regionRunner).shutdown is unused (U1000)
tikv/region.go:98:22: func (*regionCtx).lessThanStartKey is unused (U1000)
tikv/region.go:106:22: func (*regionCtx).greaterThanEndKey is unused (U1000)
tikv/region.go:496:21: using time.Tick leaks the underlying ticker, consider using it only in endless functions, tests and the main package, and use time.NewTicker here (SA1015)
tikv/server.go:29:2: field wg is unused (U1000)
tikv/server.go:44:20: func (*Server).checkRequestSize is unused (U1000)
tikv/server.go:134:8: this value of err is never used (SA4006)
tikv/write.go:185:21: using time.Tick leaks the underlying ticker, consider using it only in endless functions, tests and the main package, and use time.NewTicker here (SA1015)
tikv/write.go:231:34: should use make(chan struct{}) instead (S1019)
The text was updated successfully, but these errors were encountered:
coocood
changed the title
evaluate problems of staticcheck.
evaluate problems found by staticcheck.
Nov 14, 2019
lockstore/lockstore.go:65:16: func (*node).entryLen is unused (U1000)
lockstore/lockstore.go:236:21: func (*MemStore).getNode is unused (U1000)
metrics/metrics.go:99:26: prometheus.Handler is deprecated: Please note the issues described in the doc comment of InstrumentHandler. You might want to consider using promhttp.Handler instead. (SA1019)
pd/client.go:63:2: var errFailInitClusterID is unused (U1000)
rocksdb/filter_builder.go:49:34: should use !bytes.Equal(b.lastWholeKey, key) instead (S1004)
rocksdb/filter_builder.go:74:33: should use !bytes.Equal(b.lastPrefix, prefix) instead (S1004)
rocksdb/options.go:17:2: only the first constant in this group has an explicit type (SA9004)
rocksdb/options.go:41:2: only the first constant in this group has an explicit type (SA9004)
rocksdb/sst_file_iterator.go:171:2: should use 'return ' instead of 'if { return }; return ' (S1008)
tikv/closure_exec.go:267:2: field count is unused (U1000)
tikv/closure_exec.go:268:2: field limit is unused (U1000)
tikv/closure_exec.go:661:6: this value of err is never used (SA4006)
tikv/cop_handler.go:23:5: var dummySlice is unused (U1000)
tikv/cop_handler.go:151:23: func (*evalContext).newRowDecoderForOffsets is unused (U1000)
tikv/cop_handler.go:172:23: func (*evalContext).decodeRelatedColumnVals is unused (U1000)
tikv/cop_handler_test.go:264:22: store.svr.buildDAGExecutor undefined (type *Server has no field or method buildDAGExecutor) (compile)
tikv/dbreader/db_reader.go:124:2: redundant return statement (S1023)
tikv/mvcc/tikv.go:146:3: this value of data is never used (SA4006)
tikv/raftstore/applier.go:79:6: type keyRange is unused (U1000)
tikv/raftstore/applier.go:149:2: field ranges is unused (U1000)
tikv/raftstore/applier.go:263:2: redundant return statement (S1023)
tikv/raftstore/applier.go:530:2: field merged is unused (U1000)
tikv/raftstore/applier.go:540:2: field readySourceRegion is unused (U1000)
tikv/raftstore/applier.go:1036:2: redundant return statement (S1023)
tikv/raftstore/applier.go:1094:2: redundant return statement (S1023)
tikv/raftstore/applier.go:1119:2: redundant return statement (S1023)
tikv/raftstore/applier.go:1159:2: redundant return statement (S1023)
tikv/raftstore/applier.go:1430:2: field merge is unused (U1000)
tikv/raftstore/applier.go:1431:2: field readyToMerge is unused (U1000)
tikv/raftstore/applier.go:1527:19: func (*applier).resumePendingMerge is unused (U1000)
tikv/raftstore/config.go:267:20: error strings should not end with punctuation or a newline (ST1005)
tikv/raftstore/config.go:289:20: error strings should not end with punctuation or a newline (ST1005)
tikv/raftstore/config.go:298:20: error strings should not be capitalized (ST1005)
tikv/raftstore/config.go:302:20: error strings should not end with punctuation or a newline (ST1005)
tikv/raftstore/config.go:311:20: error strings should not end with punctuation or a newline (ST1005)
tikv/raftstore/fsm_peer.go:87:20: func (*peerFsm).drop is unused (U1000)
tikv/raftstore/fsm_peer.go:91:20: func (*peerFsm).regionID is unused (U1000)
tikv/raftstore/fsm_peer.go:115:20: func (*peerFsm).hasPendingMergeApplyResult is unused (U1000)
tikv/raftstore/fsm_peer.go:232:27: func (*peerFsmDelegate).resumeHandlePendingApplyResult is unused (U1000)
tikv/raftstore/fsm_peer.go:879:27: func (*peerFsmDelegate).validateMergePeer is unused (U1000)
tikv/raftstore/fsm_peer.go:883:27: func (*peerFsmDelegate).scheduleMerge is unused (U1000)
tikv/raftstore/fsm_peer.go:887:27: func (*peerFsmDelegate).rollbackMerge is unused (U1000)
tikv/raftstore/fsm_peer.go:1198:3: should use bytes.Equal(leftKey[:tablecodec.TableSplitKeyLen], rightKey[:tablecodec.TableSplitKeyLen]) instead (S1004)
tikv/raftstore/fsm_peer.go:1409:4: should use 'return ' instead of 'if { return }; return ' (S1008)
tikv/raftstore/fsm_store.go:89:2: field cleanUpSSTScheduler is unused (U1000)
tikv/raftstore/fsm_store.go:109:24: func (*PollContext).flushLocalStats is unused (U1000)
tikv/raftstore/fsm_store.go:170:2: field lastCompactCheckKey is unused (U1000)
tikv/raftstore/fsm_store.go:171:2: field stopped is unused (U1000)
tikv/raftstore/fsm_store.go:249:2: field resolverScheduler is unused (U1000)
tikv/raftstore/fsm_store.go:250:2: field snapScheduler is unused (U1000)
tikv/raftstore/fsm_store.go:918:6: type regionIDDeclinedBytesPair is unused (U1000)
tikv/raftstore/fsm_store.go:923:6: func calcRegionDeclinedBytes is unused (U1000)
tikv/raftstore/io_limiter.go:20:2: field limiter is unused (U1000)
tikv/raftstore/msg.go:55:2: const msgDefaultChanSize is unused (U1000)
tikv/raftstore/peer.go:466:50: should use time.Since instead of time.Now().Sub (S1012)
tikv/raftstore/peer.go:1072:7: should use !bytes.Equal(state.RequestCtx, read.binaryId()) instead (S1004)
tikv/raftstore/peer.go:1085:7: should use !bytes.Equal(state.RequestCtx, read.binaryId()) instead (S1004)
tikv/raftstore/peer.go:1467:21: error strings should not end with punctuation or a newline (ST1005)
tikv/raftstore/peer.go:1489:20: error strings should not end with punctuation or a newline (ST1005)
tikv/raftstore/peer.go:1493:20: error strings should not end with punctuation or a newline (ST1005)
tikv/raftstore/peer.go:1530:23: error strings should not end with punctuation or a newline (ST1005)
tikv/raftstore/peer.go:1591:23: error strings should not end with punctuation or a newline (ST1005)
tikv/raftstore/peer.go:1705:44: error strings should not end with punctuation or a newline (ST1005)
tikv/raftstore/peer_state.go:102:2: field closeCh is unused (U1000)
tikv/raftstore/peer_storage.go:203:6: func recoverFromApplyingState is unused (U1000)
tikv/raftstore/peer_storage.go:499:22: this value of err is never used (SA4006)
tikv/raftstore/raft_client.go:122:2: should write v := c.addrs[storeID] instead of v, _ := c.addrs[storeID] (S1005)
tikv/raftstore/snap.go:140:6: func copySnapshot is unused (U1000)
tikv/raftstore/snap.go:506:10: empty branch (SA9003)
tikv/raftstore/snap_test.go:48:72: undeclared name: DBBundle (compile)
tikv/raftstore/ticker.go:100:20: using time.Tick leaks the underlying ticker, consider using it only in endless functions, tests and the main package, and use time.NewTicker here (SA1015)
tikv/raftstore/ticker.go:107:18: should omit value from range; this loop is equivalent to
for regionID := range ...
(S1005)tikv/raftstore/util.go:321:20: error strings should not end with punctuation or a newline (ST1005)
tikv/raftstore/util.go:325:20: error strings should not end with punctuation or a newline (ST1005)
tikv/raftstore/worker.go:50:2: const taskTypeCompact is unused (U1000)
tikv/raftstore/worker.go:51:2: const taskTypeCheckAndCompact is unused (U1000)
tikv/raftstore/worker.go:154:6: type compactTask is unused (U1000)
tikv/raftstore/worker.go:158:6: type checkAndCompactTask is unused (U1000)
tikv/raftstore/worker.go:184:2: field closeCh is unused (U1000)
tikv/raftstore/worker.go:440:43: func (*pendingDeleteRanges).remove is unused (U1000)
tikv/raftstore/worker.go:450:43: func (*pendingDeleteRanges).timeoutRanges is unused (U1000)
tikv/raftstore/worker.go:482:24: func stalePeerInfo.timeout is unused (U1000)
tikv/raftstore/worker.go:626:74: should use time.Since instead of time.Now().Sub (S1012)
tikv/raftstore/worker.go:651:19: plainFileUsed is a pure function but its return value is ignored (SA4017)
tikv/raftstore/worker.go:876:24: func (*regionRunner).shutdown is unused (U1000)
tikv/region.go:98:22: func (*regionCtx).lessThanStartKey is unused (U1000)
tikv/region.go:106:22: func (*regionCtx).greaterThanEndKey is unused (U1000)
tikv/region.go:496:21: using time.Tick leaks the underlying ticker, consider using it only in endless functions, tests and the main package, and use time.NewTicker here (SA1015)
tikv/server.go:29:2: field wg is unused (U1000)
tikv/server.go:44:20: func (*Server).checkRequestSize is unused (U1000)
tikv/server.go:134:8: this value of err is never used (SA4006)
tikv/write.go:185:21: using time.Tick leaks the underlying ticker, consider using it only in endless functions, tests and the main package, and use time.NewTicker here (SA1015)
tikv/write.go:231:34: should use make(chan struct{}) instead (S1019)
The text was updated successfully, but these errors were encountered: