Skip to content
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

Add golangci-lint to GitHub hooks #5503

Closed
morgo opened this issue Dec 4, 2019 · 4 comments
Closed

Add golangci-lint to GitHub hooks #5503

morgo opened this issue Dec 4, 2019 · 4 comments
Assignees
Labels
good first issue Good issue for new contributors Type: Enhancement Logical improvement (somewhere between a bug and feature)
Milestone

Comments

@morgo
Copy link
Contributor

morgo commented Dec 4, 2019

Feature Description

At the last Vitess monthly meeting we discussed adding golangci-lint as a git hook, and the hosted service https://golangci.com/ as a GitHub check.

@morgo morgo self-assigned this Dec 4, 2019
@morgo morgo added the Type: Enhancement Logical improvement (somewhere between a bug and feature) label Dec 5, 2019
@morgo morgo added this to the v5.0 milestone Dec 10, 2019
@morgo
Copy link
Contributor Author

morgo commented Dec 10, 2019

I took a look at this today. It is unfortunately not as straight forward as it looks. Here is why:

  • Currently the linter is reporting a lot of errors (which is good!)
  • .. But there is no progressive way to enable it. If I try to modify one file and the run golangci-lint run /home/morgo/vitess/go/vt/mysqlctl/mysqld.go there will be an error because other files in the package are not processed:
WARN [runner] Can't run linter unused: buildssa: analysis skipped: errors in package: [/home/morgo/vitess/go/vt/mysqlctl/mysqld.go:95:15: undeclared name: capabilitySet /home/morgo/vitess/go/vt/mysqlctl/mysqld.go:187:34: undeclared name: mysqlFlavor /home/morgo/vitess/go/vt/mysqlctl/mysqld.go:187:51: undeclared name: serverVersion /home/morgo/vitess/go/vt/mysqlctl/mysqld.go:219:49: undeclared name: mysqlFlavor /home/morgo/vitess/go/vt/mysqlctl/mysqld.go:219:66: undeclared name: serverVersion /home/morgo/vitess/go/vt/mysqlctl/mysqld.go:318:55: undeclared name: Mycnf /home/morgo/vitess/go/vt/mysqlctl/mysqld.go:338:61: undeclared name: Mycnf /home/morgo/vitess/go/vt/mysqlctl/mysqld.go:436:54: undeclared name: Mycnf /home/morgo/vitess/go/vt/mysqlctl/mysqld.go:446:54: undeclared name: Mycnf /home/morgo/vitess/go/vt/mysqlctl/mysqld.go:479:58: undeclared name: Mycnf /home/morgo/vitess/go/vt/mysqlctl/mysqld.go:618:39: undeclared name: Mycnf /home/morgo/vitess/go/vt/mysqlctl/mysqld.go:642:54: undeclared name: Mycnf /home/morgo/vitess/go/vt/mysqlctl/mysqld.go:716:43: undeclared name: Mycnf /home/morgo/vitess/go/vt/mysqlctl/mysqld.go:763:52: undeclared name: Mycnf /home/morgo/vitess/go/vt/mysqlctl/mysqld.go:833:63: undeclared name: Mycnf /home/morgo/vitess/go/vt/mysqlctl/mysqld.go:893:62: undeclared name: Mycnf /home/morgo/vitess/go/vt/mysqlctl/mysqld.go:917:39: undeclared name: Mycnf /home/morgo/vitess/go/vt/mysqlctl/mysqld.go:945:41: undeclared name: Mycnf /home/morgo/vitess/go/vt/mysqlctl/mysqld.go:970:58: undeclared name: Mycnf /home/morgo/vitess/go/vt/mysqlctl/mysqld.go:979:22: undeclared name: TopLevelDirs /home/morgo/vitess/go/vt/mysqlctl/mysqld.go:923:22: undeclared name: TopLevelDirs /home/morgo/vitess/go/vt/mysqlctl/mysqld.go:815:7: undeclared name: flavorMariaDB /home/morgo/vitess/go/vt/mysqlctl/mysqld.go:817:7: undeclared name: flavorMySQL /home/morgo/vitess/go/vt/mysqlctl/mysqld.go:221:12: undeclared name: flavorPercona /home/morgo/vitess/go/vt/mysqlctl/mysqld.go:223:12: undeclared name: flavorMariaDB /home/morgo/vitess/go/vt/mysqlctl/mysqld.go:227:12: undeclared name: flavorMySQL /home/morgo/vitess/go/vt/mysqlctl/mysqld.go:191:10: undeclared name: flavorMariaDB /home/morgo/vitess/go/vt/mysqlctl/mysqld.go:191:25: undeclared name: serverVersion /home/morgo/vitess/go/vt/mysqlctl/mysqld.go:193:10: undeclared name: flavorMariaDB /home/morgo/vitess/go/vt/mysqlctl/mysqld.go:193:25: undeclared name: serverVersion /home/morgo/vitess/go/vt/mysqlctl/mysqld.go:195:10: undeclared name: flavorMySQL /home/morgo/vitess/go/vt/mysqlctl/mysqld.go:195:23: undeclared name: serverVersion /home/morgo/vitess/go/vt/mysqlctl/mysqld.go:197:10: undeclared name: flavorMySQL /home/morgo/vitess/go/vt/mysqlctl/mysqld.go:197:23: undeclared name: serverVersion /home/morgo/vitess/go/vt/mysqlctl/mysqld.go:173:24: undeclared name: newCapabilitySet] 
WARN [runner] Can't run linter goanalysis_metalinter: SA4020: failed prerequisites: inspect@command-line-arguments 

This seems to be a known limitation. In future plans it mentions "Analyze (don't only filter) only new code: analyze only changed files and dependencies, make incremental analysis, caches.".

Here is a paste of the issues that will need to be fixed first, before adding this to CI:

morgo@ryzen:~/vitess$ golangci-lint run
go/vt/discovery/healthcheck.go:246:27: Error return value of `tabletURLTemplate.Execute` is not checked (errcheck)
	tabletURLTemplate.Execute(&buffer, e)
	                         ^
go/vt/discovery/healthcheck.go:397:10: Error return value of `w.Write` is not checked (errcheck)
		w.Write([]byte(err.Error()))
		       ^
go/vt/discovery/healthcheck.go:403:9: Error return value of `w.Write` is not checked (errcheck)
	w.Write(buf.Bytes())
	       ^
go/vt/discovery/healthcheck_test.go:48:10: Error return value of `flag.Set` is not checked (errcheck)
	flag.Set("tablet_protocol", "fake_discovery")
	        ^
go/vt/discovery/healthcheck_test.go:612:10: Error return value of `flag.Set` is not checked (errcheck)
	flag.Set("tablet_url_template", "https://{{.GetHostNameLevel 0}}.bastion.{{.Tablet.Alias.Cell}}.corp")
	        ^
go/vt/discovery/tablet_picker_test.go:172:26: Error return value of `te.topoServ.DeleteTablet` is not checked (errcheck)
	te.topoServ.DeleteTablet(context.Background(), tablet.Alias)
	                        ^
go/vt/discovery/tablet_picker_test.go:174:34: Error return value of `topo.DeleteTabletReplicationData` is not checked (errcheck)
	topo.DeleteTabletReplicationData(context.Background(), te.topoServ, tablet)
	                                ^
go/vt/discovery/tablet_stats_cache_test.go:38:21: Error return value of `ts.CreateCellsAlias` is not checked (errcheck)
	ts.CreateCellsAlias(context.Background(), "region1", cellsAlias)
	                   ^
go/vt/discovery/tablet_stats_cache_test.go:40:27: Error return value of `ts.DeleteCellsAlias` is not checked (errcheck)
	defer ts.DeleteCellsAlias(context.Background(), "region1")
	                         ^
go/vt/discovery/tablet_stats_cache_test.go:46:21: Error return value of `ts.CreateCellsAlias` is not checked (errcheck)
	ts.CreateCellsAlias(context.Background(), "region2", cellsAlias)
	                   ^
go/vt/discovery/tablet_stats_cache_test.go:48:27: Error return value of `ts.DeleteCellsAlias` is not checked (errcheck)
	defer ts.DeleteCellsAlias(context.Background(), "region2")
	                         ^
go/mysql/fakesqldb/server.go:356:11: Error return value of `callback` is not checked (errcheck)
		callback(&sqltypes.Result{})
		        ^
go/mysql/fakesqldb/server.go:364:11: Error return value of `callback` is not checked (errcheck)
		callback(&sqltypes.Result{})
		        ^
go/vt/mysqlctl/cephbackupstorage/ceph.go:95:25: Error return value of `reader.CloseWithError` is not checked (errcheck)
			reader.CloseWithError(err)
			                     ^
go/vt/vitessdriver/driver_test.go:59:17: Error return value of `server.Serve` is not checked (errcheck)
	go server.Serve(listener)
	               ^
go/mysql/endtoend/main_test.go:201:25: Error return value of `cluster.TearDown` is not checked (errcheck)
		defer cluster.TearDown()
		                      ^
go/mysql/endtoend/query_benchmark_test.go:67:24: Error return value of `cluster.TearDown` is not checked (errcheck)
	defer cluster.TearDown()
	                      ^
go/vt/throttler/max_replication_lag_module_test.go:455:21: Error return value of `tf.m.memory.markBad` is not checked (errcheck)
	tf.m.memory.markBad(150, sinceZero(30*time.Second))
	                   ^
go/vt/throttler/max_replication_lag_module_test.go:484:21: Error return value of `tf.m.memory.markBad` is not checked (errcheck)
	tf.m.memory.markBad(105, sinceZero(30*time.Second))
	                   ^
go/vt/throttler/max_replication_lag_module_test.go:998:26: Error return value of `tf.m.updateConfiguration` is not checked (errcheck)
	tf.m.updateConfiguration(&config.Configuration, true /* copyZeroValues */)
	                        ^
go/vt/throttler/memory_test.go:27:12: Error return value of `m.markGood` is not checked (errcheck)
	m.markGood(201)
	          ^
go/vt/throttler/memory_test.go:32:12: Error return value of `m.markGood` is not checked (errcheck)
	m.markGood(101)
	          ^
go/vt/throttler/memory_test.go:36:12: Error return value of `m.markGood` is not checked (errcheck)
	m.markGood(301)
	          ^
go/vt/throttler/memory_test.go:51:11: Error return value of `m.markBad` is not checked (errcheck)
	m.markBad(300, sinceZero(0))
	         ^
go/vt/throttler/memory_test.go:59:11: Error return value of `m.markBad` is not checked (errcheck)
	m.markBad(311, sinceZero(0))
	         ^
go/vt/throttler/memory_test.go:76:11: Error return value of `m.markBad` is not checked (errcheck)
	m.markBad(199, sinceZero(0))
	         ^
go/vt/throttler/throttlerz.go:76:22: Error return value of `listTemplate.Execute` is not checked (errcheck)
	listTemplate.Execute(w, map[string]interface{}{
	                    ^
go/vt/throttler/throttlerz.go:82:25: Error return value of `detailsTemplate.Execute` is not checked (errcheck)
	detailsTemplate.Execute(w, name)
	                       ^
go/vt/vtgate/endtoend/deletetest/delete_test.go:145:20: Error return value of `cluster.TearDown` is not checked (errcheck)
			cluster.TearDown()
			                ^
go/vt/binlog/binlogplayer/framework_test.go:119:10: Error return value of `flag.Set` is not checked (errcheck)
	flag.Set("binlog_player_protocol", "test")
	        ^
go/vt/topo/etcd2topo/lock.go:59:14: Error return value of `cli.Delete` is not checked (errcheck)
			cli.Delete(context.Background(), newKey)
			          ^
go/vt/topo/etcd2topo/server_test.go:96:19: Error return value of `cmd.Process.Kill` is not checked (errcheck)
		cmd.Process.Kill()
		                ^
go/vt/topo/etcd2topo/server_test.go:97:11: Error return value of `cmd.Wait` is not checked (errcheck)
		cmd.Wait()
		        ^
go/vt/vtgate/gateway/discoverygateway_test.go:245:21: Error return value of `ts.CreateCellsAlias` is not checked (errcheck)
	ts.CreateCellsAlias(context.Background(), "local", cellsAlias)
	                   ^
go/vt/vtgate/gateway/discoverygateway_test.go:247:27: Error return value of `ts.DeleteCellsAlias` is not checked (errcheck)
	defer ts.DeleteCellsAlias(context.Background(), "local")
	                         ^
go/test/endtoend/vtgate/buffer/buffer_test.go:78:2: `masterPositionQuery` is unused (varcheck)
	masterPositionQuery        = "SELECT @@GLOBAL.gtid_executed;"
	^
go/test/endtoend/vtgate/buffer/buffer_test.go:148:19: Error return value of `conn.ExecuteFetch` is not checked (errcheck)
	conn.ExecuteFetch("begin", 1000, true)
	                 ^
go/test/endtoend/vtgate/buffer/buffer_test.go:274:52: Error return value of `clusterInstance.VtctlclientProcess.ExecuteCommand` is not checked (errcheck)
		clusterInstance.VtctlclientProcess.ExecuteCommand("PlannedReparentShard", "-keyspace_shard",
		                                                 ^
go/test/endtoend/vtgate/buffer/buffer_test.go:357:36: Error return value of `master.VttabletProcess.QueryTablet` is not checked (errcheck)
	master.VttabletProcess.QueryTablet(demoteMasterQuery, keyspaceUnshardedName, true)
	                                  ^
go/test/endtoend/vtgate/buffer/buffer_test.go:359:37: Error return value of `master.VttabletProcess.QueryTablet` is not checked (errcheck)
		master.VttabletProcess.QueryTablet(disableSemiSyncMasterQuery, keyspaceUnshardedName, true)
		                                  ^
go/test/endtoend/vtgate/buffer/buffer_test.go:374:37: Error return value of `replica.VttabletProcess.QueryTablet` is not checked (errcheck)
	replica.VttabletProcess.QueryTablet(promoteSlaveQuery, keyspaceUnshardedName, true)
	                                   ^
go/test/endtoend/vtgate/buffer/buffer_test.go:377:38: Error return value of `replica.VttabletProcess.QueryTablet` is not checked (errcheck)
		replica.VttabletProcess.QueryTablet(enableSemiSyncMasterQuery, keyspaceUnshardedName, true)
		                                   ^
go/test/endtoend/vtgate/buffer/buffer_test.go:386:39: Error return value of `oldMaster.VttabletProcess.QueryTablet` is not checked (errcheck)
	oldMaster.VttabletProcess.QueryTablet(changeMasterCommands, keyspaceUnshardedName, true)
	                                     ^
go/test/endtoend/vtgate/buffer/buffer_test.go:389:51: Error return value of `clusterInstance.VtctlclientProcess.ExecuteCommand` is not checked (errcheck)
	clusterInstance.VtctlclientProcess.ExecuteCommand("TabletExternallyReparented", newMaster.Alias)
	                                                 ^
go/vt/topo/consultopo/server_test.go:132:19: Error return value of `cmd.Process.Kill` is not checked (errcheck)
		cmd.Process.Kill()
		                ^
go/vt/topo/consultopo/server_test.go:133:11: Error return value of `cmd.Wait` is not checked (errcheck)
		cmd.Wait()
		        ^
go/vt/topo/consultopo/server_test.go:169:19: Error return value of `cmd.Process.Kill` is not checked (errcheck)
		cmd.Process.Kill()
		                ^
go/vt/topo/consultopo/server_test.go:170:11: Error return value of `cmd.Wait` is not checked (errcheck)
		cmd.Wait()
		        ^
go/vt/topo/zk2topo/lock.go:64:17: Error return value of `zs.conn.Delete` is not checked (errcheck)
		zs.conn.Delete(ctx, nodePath, -1)
		              ^
go/vt/topo/zk2topo/server_test.go:37:20: Error return value of `zkd.Teardown` is not checked (errcheck)
	defer zkd.Teardown()
	                  ^
go/cmd/zkctld/zkctld.go:72:15: Error return value of `zkd.Shutdown` is not checked (errcheck)
		zkd.Shutdown()
		            ^
go/test/endtoend/tabletmanager/main_test.go:40:2: `vtParams` is unused (deadcode)
	vtParams            mysql.ConnParams
	^
go/test/endtoend/tabletmanager/commands_test.go:59:10: ineffectual assignment to `err` (ineffassign)
	result, err := clusterInstance.VtctlclientProcess.ExecuteCommandWithOutput(args...)
	        ^
go/test/endtoend/tabletmanager/commands_test.go:64:10: ineffectual assignment to `err` (ineffassign)
	result, err = clusterInstance.VtctlclientProcess.ExecuteCommandWithOutput("ExecuteFetchAsDba", "-json", masterTablet.Alias, sql)
	        ^
go/test/endtoend/tabletmanager/commands_test.go:145:2: ineffectual assignment to `err` (ineffassign)
	err := clusterInstance.VtctlclientProcess.ExecuteCommand("Sleep", masterTablet.Alias, "5s")
	^
go/test/endtoend/tabletmanager/tablet_health_test.go:264:2: SA5001: should check returned error before deferring masterConn.Close() (staticcheck)
	defer masterConn.Close()
	^
go/test/endtoend/tabletmanager/main_test.go:140:28: SA1006: printf-style function with dynamic format string and no further arguments should use print-style function instead (staticcheck)
			UnixSocket: fmt.Sprintf(path.Join(os.Getenv("VTDATAROOT"), fmt.Sprintf("/vt_%010d/mysql.sock", masterTablet.TabletUID))),
			                        ^
go/test/endtoend/tabletmanager/main_test.go:145:28: SA1006: printf-style function with dynamic format string and no further arguments should use print-style function instead (staticcheck)
			UnixSocket: fmt.Sprintf(path.Join(os.Getenv("VTDATAROOT"), fmt.Sprintf("/vt_%010d/mysql.sock", replicaTablet.TabletUID))),
			                        ^
tools/statsd.go:86:2: `name` is unused (structcheck)
	name string
	^
go/vt/vttablet/tabletserver/splitquery/splitter_test.go:51:3: ineffectual assignment to `message` (ineffassign)
		message += fmt.Sprintf("len is different: expected: %v vs got:%v\n", len(expected), len(got))
		^
go/vt/vtqueryserver/plugin_mysql_server.go:115:2: ineffectual assignment to `session` (ineffassign)
	session, result, err := mh.mp.Execute(ctx, session, query, make(map[string]*querypb.BindVariable))
	^
go/test/endtoend/vtgate/schema/schema_test.go:114:6: ineffectual assignment to `sqlQuery` (ineffassign)
	var sqlQuery = ""
	    ^
go/vt/vtgate/executor.go:1579:3: ineffectual assignment to `errCount` (ineffassign)
		errCount = 1
		^
go/vt/vtgate/executor_test.go:567:2: SA4006: this value of `result` is never used (staticcheck)
	result, err = executor.Execute(context.Background(), "TestExecute", session, show, nil)
	^
go/vt/vtgate/mysql_protocol_test.go:138:2: SA4006: this value of `qr` is never used (staticcheck)
	qr, err = c.ExecuteFetch("select id from t1", 10, true /* wantfields */)
	^
go/vt/vtgate/executor_test.go:1611:25: SA4010: this result of append is never used, except maybe in other appends (staticcheck)
		vschemaTables = append(vschemaTables, t)
		                      ^
go/mysql/replication_constants.go:198:2: `eMariaAnnotateRowsEvent` is unused (varcheck)
	eMariaAnnotateRowsEvent     = 160
	^
go/mysql/replication_constants.go:167:2: `eNewLoadEvent` is unused (varcheck)
	eNewLoadEvent           = 12
	^
go/mysql/replication_constants.go:181:2: `eIncidentEvent` is unused (varcheck)
	eIncidentEvent          = 26
	^
go/mysql/replication_constants.go:199:2: `eMariaBinlogCheckpointEvent` is unused (varcheck)
	eMariaBinlogCheckpointEvent = 161
	^
go/mysql/replication_constants.go:156:2: `eStartEventV3` is unused (varcheck)
	eStartEventV3           = 1
	^
go/mysql/replication_constants.go:193:2: `eTransactionContextEvent` is unused (varcheck)
	eTransactionContextEvent = 36
	^
go/mysql/replication_constants.go:183:2: `eIgnorableEvent` is unused (varcheck)
	eIgnorableEvent         = 28
	^
go/mysql/replication_constants.go:164:2: `eAppendBlockEvent` is unused (varcheck)
	eAppendBlockEvent       = 9
	^
go/mysql/replication_constants.go:163:2: `eCreateFileEvent` is unused (varcheck)
	eCreateFileEvent        = 8
	^
go/mysql/replication_constants.go:195:2: `eXAPrepareLogEvent` is unused (varcheck)
	eXAPrepareLogEvent       = 38
	^
go/mysql/replication_constants.go:184:2: `eRowsQueryEvent` is unused (varcheck)
	eRowsQueryEvent         = 29
	^
go/mysql/replication_constants.go:173:2: `eExecuteLoadQueryEvent` is unused (varcheck)
	eExecuteLoadQueryEvent  = 18
	^
go/mysql/replication_constants.go:166:2: `eDeleteFileEvent` is unused (varcheck)
	eDeleteFileEvent        = 11
	^
go/mysql/replication_constants.go:161:2: `eLoadEvent` is unused (varcheck)
	eLoadEvent              = 6
	^
go/mysql/replication_constants.go:172:2: `eBeginLoadQueryEvent` is unused (varcheck)
	eBeginLoadQueryEvent    = 17
	^
go/mysql/replication_constants.go:194:2: `eViewChangeEvent` is unused (varcheck)
	eViewChangeEvent         = 37
	^
go/mysql/replication_constants.go:202:2: `eMariaStartEncryptionEvent` is unused (varcheck)
	eMariaStartEncryptionEvent  = 164
	^
go/mysql/replication_constants.go:162:2: `eSlaveEvent` is unused (varcheck)
	eSlaveEvent             = 7
	^
go/mysql/replication_constants.go:169:2: `eUserVarEvent` is unused (varcheck)
	eUserVarEvent           = 14
	^
go/mysql/replication_constants.go:165:2: `eExecLoadEvent` is unused (varcheck)
	eExecLoadEvent          = 10
	^
go/mysql/replication_constants.go:182:2: `eHeartbeatEvent` is unused (varcheck)
	eHeartbeatEvent         = 27
	^
go/mysql/replication_constants.go:158:2: `eStopEvent` is unused (varcheck)
	eStopEvent              = 3
	^
go/mysql/replication_constants.go:155:2: `eUnknownEvent` is unused (varcheck)
	eUnknownEvent           = 0
	^
go/mysql/query_test.go:645:6: `writeResult` is unused (deadcode)
func writeResult(conn *Conn, result *sqltypes.Result) error {
     ^
go/mysql/client.go:383:13: ineffectual assignment to `pos` (ineffassign)
		errorMsg, pos, _ := readEOFString(data, pos)
		          ^
go/mysql/replication.go:64:2: ineffectual assignment to `pos` (ineffassign)
	pos += copy(data[pos:], gtidSet)
	^
go/mysql/server.go:379:3: ineffectual assignment to `data` (ineffassign)
		data := make([]byte, 21)
		^
go/mysql/binlog_event_make_test.go:310:2: ineffectual assignment to `tableID` (ineffassign)
	tableID := uint64(0x102030405060)
	^
go/mysql/auth_server_static.go:163:4: S1000: should use for range instead of for { select {} } (gosimple)
			for {
			^
go/test/endtoend/clustertest/vtcltd_test.go:73:17: S1025: should use String() instead of fmt.Sprintf (gosimple)
	childrenGot := fmt.Sprintf("%s", children)
	               ^
go/vt/sqlparser/parse_test.go:2550:2: SA5001: should check returned error before deferring file.Close() (staticcheck)
	defer file.Close()
	^
go/vt/vttablet/tabletserver/txserializer/tx_serializer_test.go:112:2: SA2002: the goroutine calls T.Fatal, which must be called in the same goroutine as the test (staticcheck)
	go func() {
	^
go/vt/vttablet/tabletserver/txserializer/tx_serializer_test.go:190:2: SA2002: the goroutine calls T.Fatal, which must be called in the same goroutine as the test (staticcheck)
	go func() {
	^
go/vt/vttablet/tabletserver/txserializer/tx_serializer_test.go:312:2: SA2002: the goroutine calls T.Fatal, which must be called in the same goroutine as the test (staticcheck)
	go func() {
	^
go/vt/mysqlctl/replication.go:302:2: `colDbName` is unused (varcheck)
	colDbName
	^
go/vt/mysqlctl/replication.go:299:2: `colConnectionID` is unused (varcheck)
	colConnectionID = iota
	^
go/vt/mysqlctl/replication.go:300:2: `colUsername` is unused (varcheck)
	colUsername
	^
go/vt/wrangler/reparent.go:49:2: `tabletExternallyReparentedOperation` is unused (varcheck)
	tabletExternallyReparentedOperation = "TabletExternallyReparented"
	^
go/vt/vttablet/tabletmanager/vreplication/vstreamer_client_test.go:297:3: `isOpen` is unused (structcheck)
		isOpen           bool
		^
go/vt/vttablet/tabletmanager/vreplication/vstreamer_client_test.go:366:3: `vsEngine` is unused (structcheck)
		vsEngine         *vstreamer.Engine
		^
go/vt/vttablet/tabletmanager/vreplication/vstreamer_client_test.go:367:3: `sourceSe` is unused (structcheck)
		sourceSe         *schema.Engine
		^
go/vt/vttablet/tabletmanager/vreplication/vstreamer_client_test.go:43:3: `isOpen` is unused (structcheck)
		isOpen         bool
		^
go/vt/vttablet/tabletmanager/vreplication/vstreamer_client_test.go:45:3: `target` is unused (structcheck)
		target         *querypb.Target
		^
go/vt/vttablet/tabletmanager/vreplication/vstreamer_client_test.go:46:3: `tsQueryService` is unused (structcheck)
		tsQueryService queryservice.QueryService
		^
go/vt/vttablet/tabletmanager/vreplication/vstreamer_client_test.go:103:3: `isOpen` is unused (structcheck)
		isOpen         bool
		^
go/vt/vttablet/tabletmanager/vreplication/vstreamer_client_test.go:105:3: `target` is unused (structcheck)
		target         *querypb.Target
		^
go/vt/vttablet/tabletmanager/vreplication/vstreamer_client_test.go:106:3: `tsQueryService` is unused (structcheck)
		tsQueryService queryservice.QueryService
		^
go/vt/mysqlctl/builtinbackupengine.go:136:2: ineffectual assignment to `readOnly` (ineffassign)
	readOnly := true
	^
go/vt/mysqlctl/mysqld.go:346:3: ineffectual assignment to `name` (ineffassign)
		name = "mysqld_start hook"
		^
go/vt/vtctl/backup.go:137:5: ineffectual assignment to `secondsBehind` (ineffassign)
				secondsBehind = 0
				^
go/vt/vtexplain/vtexplain_vttablet.go:506:10: S1034: assigning the result of this type assertion to a variable (switch stmt := stmt.(type)) could eliminate the following type assertions:
	go/vt/vtexplain/vtexplain_vttablet.go:508:14 (gosimple)
		switch stmt.(type) {
		       ^
go/vt/vtgate/vtgate.go:94:2: var `errorsByKeyspace` is unused (unused)
	errorsByKeyspace  *stats.Rates
	^
go/vt/vtgate/vtgate.go:95:2: var `errorsByDbType` is unused (unused)
	errorsByDbType    *stats.Rates
	^
go/vt/vtgate/vtgate.go:93:2: var `errorsByOperation` is unused (unused)
	errorsByOperation *stats.Rates
	^
go/vt/vtgate/vtgate.go:89:2: var `qpsByDbType` is unused (unused)
	qpsByDbType    *stats.Rates
	^
go/vt/vtgate/vtgate.go:88:2: var `qpsByKeyspace` is unused (unused)
	qpsByKeyspace  *stats.Rates
	^
go/vt/vtgate/vtgate.go:87:2: var `qpsByOperation` is unused (unused)
	qpsByOperation *stats.Rates
	^
go/vt/vtgate/vtgate.go:96:2: var `errorsByCode` is unused (unused)
	errorsByCode      *stats.Rates
	^
go/cmd/zkctl/zkctl.go:44:2: var `stdin` is unused (unused)
	stdin *bufio.Reader
	^
go/test/endtoend/keyspace/keyspace_test.go:241:6: func `RemoveKeyspaceCell` is unused (unused)
func RemoveKeyspaceCell(t *testing.T) {
     ^
go/vt/mysqlctl/mycnf_test.go:87:6: func `NoTestMycnfHook` is unused (unused)
func NoTestMycnfHook(t *testing.T) {
     ^
go/cmd/mysqlctl/mysqlctl.go:44:2: var `tabletAddr` is unused (unused)
	tabletAddr string
	^

@morgo morgo modified the milestones: v5.0, v6.0 Dec 10, 2019
@morgo morgo added the good first issue Good issue for new contributors label Jan 4, 2020
@yindia
Copy link
Contributor

yindia commented Feb 24, 2020

@morgo Can this be assigned to me?

@morgo morgo assigned yindia and unassigned morgo Feb 24, 2020
@morgo
Copy link
Contributor Author

morgo commented Feb 24, 2020

Go for it. Please feel free to divide up the tasks and look for contributors in #developers on Slack if it's too much effort :-)

@morgo morgo removed this from the v6.0 milestone Apr 27, 2020
@deepthi
Copy link
Member

deepthi commented Jul 18, 2020

Fixed by #6385 #6364

@deepthi deepthi closed this as completed Jul 18, 2020
@deepthi deepthi added this to the v7.0 milestone Jul 18, 2020
systay pushed a commit that referenced this issue Jul 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue Good issue for new contributors Type: Enhancement Logical improvement (somewhere between a bug and feature)
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants