linter: Enable error checking linter (#766)

* golangci: Enable err checking linter to expose unchecked errors.

* gct: handle errors across the board

* gct: handle errors NOTE: Found bug in FTX (WIP)

* linter: fix issues

* ftx/exchanges: fix bug where error was being returned when setting pair management variables to an already enabled state

* bitmex: fix bug where a dangly supported asset in config danglied up the place.

* linter: fix more linter issues

* linter: fix my terrible spelling.

* currency: fix test

* exchanges: fix tests

* logger: fix test

* exchanges: fix tests

* glorious: nits

* vm: revert rm variable and instigate test
This commit is contained in:
Ryan O'Hara-Reid
2021-08-30 14:06:40 +10:00
committed by GitHub
parent c9ab0b1164
commit 8020e1ec6a
99 changed files with 814 additions and 293 deletions

View File

@@ -2953,8 +2953,7 @@ var withdrawalRequestCommand = &cli.Command{
func withdrawlRequestByID(c *cli.Context) error {
if c.NArg() == 0 && c.NumFlags() == 0 {
cli.ShowSubcommandHelp(c)
return nil
return cli.ShowSubcommandHelp(c)
}
var ID string
@@ -2990,8 +2989,7 @@ func withdrawlRequestByID(c *cli.Context) error {
func withdrawlRequestByExchangeID(c *cli.Context) error {
if c.NArg() == 0 && c.NumFlags() == 0 {
cli.ShowSubcommandHelp(c)
return nil
return cli.ShowSubcommandHelp(c)
}
var exchange, currency string
@@ -3058,8 +3056,7 @@ func withdrawlRequestByExchangeID(c *cli.Context) error {
func withdrawlRequestByDate(c *cli.Context) error {
if c.NArg() == 0 && c.NumFlags() == 0 {
cli.ShowSubcommandHelp(c)
return nil
return cli.ShowSubcommandHelp(c)
}
var exchange string
@@ -3842,8 +3839,7 @@ var gctScriptCommand = &cli.Command{
func gctScriptAutoload(c *cli.Context) error {
if c.NArg() == 0 && c.NumFlags() == 0 {
_ = cli.ShowSubcommandHelp(c)
return nil
return cli.ShowSubcommandHelp(c)
}
var command, script string
@@ -3866,8 +3862,7 @@ func gctScriptAutoload(c *cli.Context) error {
case "remove":
status = true
default:
_ = cli.ShowSubcommandHelp(c)
return nil
return cli.ShowSubcommandHelp(c)
}
conn, err := setupClient()
@@ -3893,8 +3888,7 @@ func gctScriptAutoload(c *cli.Context) error {
func gctScriptExecute(c *cli.Context) error {
if c.NArg() == 0 && c.NumFlags() == 0 {
_ = cli.ShowSubcommandHelp(c)
return nil
return cli.ShowSubcommandHelp(c)
}
if !c.IsSet("filename") {
@@ -3973,8 +3967,7 @@ func gctScriptList(c *cli.Context) error {
func gctScriptStop(c *cli.Context) error {
if c.NArg() == 0 && c.NumFlags() == 0 {
_ = cli.ShowSubcommandHelp(c)
return nil
return cli.ShowSubcommandHelp(c)
}
if !c.IsSet("uuid") {
@@ -4024,8 +4017,7 @@ func gctScriptStopAll(c *cli.Context) error {
func gctScriptRead(c *cli.Context) error {
if c.NArg() == 0 && c.NumFlags() == 0 {
_ = cli.ShowSubcommandHelp(c)
return nil
return cli.ShowSubcommandHelp(c)
}
if !c.IsSet("name") {
@@ -4058,8 +4050,7 @@ func gctScriptRead(c *cli.Context) error {
func gctScriptQuery(c *cli.Context) error {
if c.NArg() == 0 && c.NumFlags() == 0 {
_ = cli.ShowSubcommandHelp(c)
return nil
return cli.ShowSubcommandHelp(c)
}
if !c.IsSet("uuid") {
@@ -4093,8 +4084,7 @@ func gctScriptQuery(c *cli.Context) error {
func gctScriptUpload(c *cli.Context) error {
if c.NArg() == 0 && c.NumFlags() == 0 {
_ = cli.ShowSubcommandHelp(c)
return nil
return cli.ShowSubcommandHelp(c)
}
var overwrite bool