mirror of
https://github.com/mgechev/revive.git
synced 2024-12-14 10:52:54 +02:00
ae07914dc4
* ifelse: option to preserve variable scope
12 lines
338 B
Go
12 lines
338 B
Go
package ifelse
|
|
|
|
// PreserveScope is a configuration argument that prevents suggestions
|
|
// that would enlarge variable scope
|
|
const PreserveScope = "preserveScope"
|
|
|
|
// Args contains arguments common to the early-return, indent-error-flow
|
|
// and superfluous-else rules (currently just preserveScope)
|
|
type Args struct {
|
|
PreserveScope bool
|
|
}
|