Closed
Description
Right now you have to use the variable, type or field in the first statement in a block if you want to use it like this:
variable := "assigned"
[token] {
// Must use 'variable' here
}
I think this is reasonable for most of the time but I kind of like to be able to use this pattern, especially if it's spawning a go routine like this:
done := make(chan struct{})
go func() {
fmt.Println("Let's spawn this go routine")
<-somethingBlocking
close(done)
}()
// Wait for done
<-done
This might be useful in more scenarios like ranges, if-statements etcetera and therefore could possible be configured. Although as of now the only place I really felt that this was needed was a very few go routines.
Since this linter isn't really embrarcing any kind of official best practices like pythons black I think it's ok to have the linter heavily configurable like e.g. perltidy.