mirror of
https://github.com/mgechev/revive.git
synced 2025-11-23 22:04:49 +02:00
chore: use US English instead of UK English (#1186)
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
// Package ifelse provides helpers for analysing the control flow in if-else chains,
|
||||
// Package ifelse provides helpers for analyzing the control flow in if-else chains,
|
||||
// presently used by the following rules:
|
||||
// - early-return
|
||||
// - indent-error-flow
|
||||
|
||||
@@ -60,8 +60,8 @@ type bareReturnFinder struct {
|
||||
func (w bareReturnFinder) Visit(node ast.Node) ast.Visitor {
|
||||
_, ok := node.(*ast.FuncLit)
|
||||
if ok {
|
||||
// skip analysing function literals
|
||||
// they will be analysed by the lintBareReturnRule.Visit method
|
||||
// skip analyzing function literals
|
||||
// they will be analyzed by the lintBareReturnRule.Visit method
|
||||
return nil
|
||||
}
|
||||
|
||||
|
||||
@@ -35,7 +35,7 @@ func (*EarlyReturnRule) checkIfElse(chain ifelse.Chain, args ifelse.Args) (strin
|
||||
|
||||
if chain.HasPriorNonDeviating && !chain.If.IsEmpty() {
|
||||
// if we de-indent this block then a previous branch
|
||||
// might flow into it, affecting program behaviour
|
||||
// might flow into it, affecting program behavior
|
||||
return "", false
|
||||
}
|
||||
|
||||
|
||||
@@ -30,7 +30,7 @@ func (*IndentErrorFlowRule) checkIfElse(chain ifelse.Chain, args ifelse.Args) (s
|
||||
|
||||
if chain.HasPriorNonDeviating {
|
||||
// if we de-indent the "else" block then a previous branch
|
||||
// might flow into it, affecting program behaviour
|
||||
// might flow into it, affecting program behavior
|
||||
return "", false
|
||||
}
|
||||
|
||||
|
||||
@@ -32,7 +32,7 @@ func (*SuperfluousElseRule) checkIfElse(chain ifelse.Chain, args ifelse.Args) (s
|
||||
|
||||
if chain.HasPriorNonDeviating {
|
||||
// if we de-indent the "else" block then a previous branch
|
||||
// might flow into it, affecting program behaviour
|
||||
// might flow into it, affecting program behavior
|
||||
return "", false
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user