esimonov / ifshort

Go linter for checking that your code uses short syntax for if-statements whenever possible.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Timeouts

phoenix2x opened this issue · comments

package main

type test struct {
}

func (t test) Test() test {
	return t
}

func main() {
	_ = test{}.
		Test().Test().Test().Test().Test().Test().Test().Test().Test().Test().
		Test().Test().Test().Test().Test().Test().Test().Test().Test().Test().
		Test().Test().Test().Test().Test().Test().Test().Test().Test().Test().
		Test().Test()
}

For the code above linter runs for 40s, when adding couple more calls to Test() it eventually timeouts with error:

golangci-lint run --disable-all -E ifshort
ERRO Timeout exceeded: try increasing it by passing --timeout option