This repository was archived by the owner on Jan 28, 2021. It is now read-only.
This repository was archived by the owner on Jan 28, 2021. It is now read-only.
Run staticcheck on go-mysql-server - list of things to verify/check #581
Closed
Description
staticcheck gopkg.in/src-d/go-mysql-server.v0/...
auth/common_test.go:198:9: the argument is already a string, there's no need to use fmt.Sprintf (S1025)
engine_test.go:26:7: const driverName is unused (U1000)
mem/table.go:92:15: m[string(key)] would be more efficient than k := string(key); m[k] (SA6001)
mem/table_test.go:206:18: m[string(key)] would be more efficient than k := string(key); m[k] (SA6001)
sql/analyzer/aggregations.go:10:8: this value of ctx is never used (SA4006)
sql/analyzer/assign_catalog.go:10:8: this value of ctx is never used (SA4006)
sql/analyzer/assign_indexes.go:710:6: func isColumn is unused (U1000)
sql/analyzer/optimization_rules.go:11:8: this value of ctx is never used (SA4006)
sql/analyzer/optimization_rules.go:32:8: this value of ctx is never used (SA4006)
sql/analyzer/resolve_columns.go:39:8: this value of ctx is never used (SA4006)
sql/analyzer/resolve_columns.go:282:14: should replace this if statement with an unconditional strings.TrimPrefix (S1017)
sql/analyzer/resolve_columns_test.go:199:2: this value of result is never used (SA4006)
sql/analyzer/resolve_database.go:9:8: this value of ctx is never used (SA4006)
sql/analyzer/resolve_functions.go:9:8: this value of ctx is never used (SA4006)
sql/analyzer/resolve_natural_joins.go:22:8: this value of ctx is never used (SA4006)
sql/analyzer/resolve_orderby.go:13:8: this value of ctx is never used (SA4006)
sql/analyzer/resolve_stars.go:10:8: this value of ctx is never used (SA4006)
sql/analyzer/resolve_tables.go:20:8: this value of ctx is never used (SA4006)
sql/analyzer/validation_rules.go:52:8: this value of ctx is never used (SA4006)
sql/analyzer/validation_rules.go:63:8: this value of ctx is never used (SA4006)
sql/analyzer/validation_rules.go:80:8: this value of ctx is never used (SA4006)
sql/analyzer/validation_rules.go:125:8: this value of ctx is never used (SA4006)
sql/analyzer/validation_rules.go:141:8: this value of ctx is never used (SA4006)
sql/analyzer/validation_rules.go:182:8: this value of ctx is never used (SA4006)
sql/expression/function/ceil_round_floor_test.go:221:10: this value of err is never used (SA4006)
sql/index.go:377:6: type withIndexer is unused (U1000)
sql/index.go:378:2: func withIndexer.WithIndex is unused (U1000)
sql/index.go:381:6: func removeIndexes is unused (U1000)
sql/index/pilosa/driver.go:49:2: var errLoadingIndex is unused (U1000)
sql/index/pilosa/driver.go:51:2: var errDeletePilosaField is unused (U1000)
sql/index/pilosa/driver_test.go:98:2: this value of indexes is never used (SA4006)
sql/index/pilosa/driver_test.go:158:2: this value of indexes is never used (SA4006)
sql/index/pilosa/driver_test.go:162:6: type logLoc is unused (U1000)
sql/index/pilosa/driver_test.go:574:2: this value of loc is never used (SA4006)
sql/index/pilosa/driver_test.go:650:2: this value of loc is never used (SA4006)
sql/index/pilosa/driver_test.go:743:15: this value of ok is never used (SA4006)
sql/index/pilosa/driver_test.go:754:7: this value of err is never used (SA4006)
sql/index/pilosa/driver_test.go:758:7: this value of err is never used (SA4006)
sql/index/pilosa/driver_test.go:1215:2: this value of r2 is never used (SA4006)
sql/index/pilosa/driver_test.go:1277:3: field values is unused (U1000)
sql/index/pilosa/driver_test.go:1278:3: field location is unused (U1000)
sql/index/pilosa/index.go:109:3: this value of n is never used (SA4006)
sql/index/pilosa/lookup.go:599:6: should omit comparison to bool constant, can be simplified to !a (S1002)
sql/plan/create_index.go:343:2: field table is unused (U1000)
sql/plan/limit.go:85:3: the surrounding loop is unconditionally terminated (SA4004)
sql/plan/set.go:99:10: should replace this if statement with an unconditional strings.TrimPrefix (S1017)
sql/plan/show_create_table.go:58:6: type createTableStmt is unused (U1000)
sql/plan/show_create_table.go:67:2: field createStmt is unused (U1000)
sql/plan/show_create_table.go:94:40: should use make([]string, len(schema)) instead (S1019)
sql/plan/show_create_table.go:118:26: the argument is already a string, there's no need to use fmt.Sprintf (S1025)
sql/plan/showcolumns.go:57:8: this value of ctx is never used (SA4006)
sql/type.go:582:5: should omit comparison to bool constant, can be simplified to !a.(bool) (S1002)