Prevent Canceling Goroutines in Validator Client (#2324)

* do not cancel assignments goroutines

* exclude rule

* disable lostcancel for now
This commit is contained in:
Raul Jordan 2019-04-21 15:49:57 -05:00 committed by Preston Van Loon
parent a5da9f2dd6
commit ccf7beb5f7
3 changed files with 6 additions and 3 deletions

View File

@ -68,7 +68,7 @@ nogo(
"@org_golang_x_tools//go/analysis/passes/pkgfact:go_tool_library", "@org_golang_x_tools//go/analysis/passes/pkgfact:go_tool_library",
"@org_golang_x_tools//go/analysis/passes/nilness:go_tool_library", "@org_golang_x_tools//go/analysis/passes/nilness:go_tool_library",
"@org_golang_x_tools//go/analysis/passes/nilfunc:go_tool_library", "@org_golang_x_tools//go/analysis/passes/nilfunc:go_tool_library",
"@org_golang_x_tools//go/analysis/passes/lostcancel:go_tool_library", # "@org_golang_x_tools//go/analysis/passes/lostcancel:go_tool_library",
"@org_golang_x_tools//go/analysis/passes/loopclosure:go_tool_library", "@org_golang_x_tools//go/analysis/passes/loopclosure:go_tool_library",
"@org_golang_x_tools//go/analysis/passes/httpresponse:go_tool_library", "@org_golang_x_tools//go/analysis/passes/httpresponse:go_tool_library",
"@org_golang_x_tools//go/analysis/passes/findcall:go_tool_library", "@org_golang_x_tools//go/analysis/passes/findcall:go_tool_library",

View File

@ -10,6 +10,11 @@
"external/*": "Unreachable third party code" "external/*": "Unreachable third party code"
} }
}, },
"lostcancel": {
"exclude_files": {
"validator/client/runner.go": "No need to cancel right when goroutines begin"
}
},
"nilness": { "nilness": {
"exclude_files": { "exclude_files": {
"external/*": "Third party code" "external/*": "Third party code"
@ -44,6 +49,5 @@
"exclude_files": { "exclude_files": {
"external/*": "Third party code" "external/*": "Third party code"
} }
} }
} }

View File

@ -100,7 +100,6 @@ func run(ctx context.Context, v Validator) {
}(role, id) }(role, id)
} }
cancel()
} }
} }
} }