mirror of
https://github.com/d0zingcat/gocryptotrader.git
synced 2026-05-24 07:26:47 +00:00
golangci-lint/CI: Bump versions and introduce new linters (#798)
* golangci-lint/CI: Bump versions
Fix remaining linter issues
* Specifically set AppVeyor version
* Fix the infamous typos 👀
* Add go env cmd to AppVeyor
* Add go version cmd to AppVeyor
* Specify AppVeyor image, adjust linters
* Update go get to go install due to deprecation
* Bump golangci-lint timeout time for AppVeyor
* Change NW contract to NQ
* Address nitters
* GetRandomPair -> Pair{}
* Address nits
* Address time nitterinos plus additional tweaks
* More time inception upgrades!
* Bending time and space
This commit is contained in:
@@ -73,8 +73,7 @@ func (g *GctScriptManager) Stop() error {
|
||||
atomic.CompareAndSwapInt32(&g.started, 1, 0)
|
||||
}()
|
||||
|
||||
err := g.ShutdownAll()
|
||||
if err != nil {
|
||||
if err := g.ShutdownAll(); err != nil {
|
||||
return err
|
||||
}
|
||||
close(g.shutdown)
|
||||
|
||||
@@ -37,6 +37,7 @@ func TestNewManager(t *testing.T) {
|
||||
for _, tt := range tests {
|
||||
tt := tt
|
||||
t.Run(tt.name, func(t *testing.T) {
|
||||
t.Parallel()
|
||||
got, err := NewManager(tt.args.config)
|
||||
if (err != nil) != tt.wantErr {
|
||||
t.Errorf("NewManager() error = %v, wantErr %v", err, tt.wantErr)
|
||||
|
||||
@@ -279,7 +279,7 @@ func TestVMWithRunnerOnce(t *testing.T) {
|
||||
config: configHelper(true, true, maxTestVirtualMachines),
|
||||
started: 1,
|
||||
}
|
||||
vmCount := VMSCount.Len()
|
||||
vmCount := VMSCount.Len() // nolint:ifshort,nolintlint // false positive and triggers only on Windows
|
||||
VM := manager.New()
|
||||
if VM == nil {
|
||||
t.Fatal("Failed to allocate new VM exiting")
|
||||
@@ -533,8 +533,7 @@ func TestVMLimit(t *testing.T) {
|
||||
config: configHelper(true, false, 0),
|
||||
started: 1,
|
||||
}
|
||||
testVM := manager.New()
|
||||
if testVM != nil {
|
||||
if testVM := manager.New(); testVM != nil {
|
||||
t.Fatal("expected nil but received pointer to VM")
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user