From d64bddc9bc5e4fdd1a08fca0f9ae55d4bf1a06c5 Mon Sep 17 00:00:00 2001 From: ccoVeille <3875889+ccoVeille@users.noreply.github.com> Date: Thu, 12 Dec 2024 14:13:45 +0100 Subject: [PATCH] chore: use US English instead of UK English (#1186) --- internal/ifelse/doc.go | 2 +- rule/bare_return.go | 4 ++-- rule/early_return.go | 2 +- rule/indent_error_flow.go | 2 +- rule/superfluous_else.go | 2 +- 5 files changed, 6 insertions(+), 6 deletions(-) diff --git a/internal/ifelse/doc.go b/internal/ifelse/doc.go index 0aa2c98..7461b12 100644 --- a/internal/ifelse/doc.go +++ b/internal/ifelse/doc.go @@ -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 diff --git a/rule/bare_return.go b/rule/bare_return.go index 5c5d341..c5a9441 100644 --- a/rule/bare_return.go +++ b/rule/bare_return.go @@ -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 } diff --git a/rule/early_return.go b/rule/early_return.go index c6c2321..41557b0 100644 --- a/rule/early_return.go +++ b/rule/early_return.go @@ -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 } diff --git a/rule/indent_error_flow.go b/rule/indent_error_flow.go index 5e554d5..4dda64c 100644 --- a/rule/indent_error_flow.go +++ b/rule/indent_error_flow.go @@ -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 } diff --git a/rule/superfluous_else.go b/rule/superfluous_else.go index 2e8cfeb..c9474d9 100644 --- a/rule/superfluous_else.go +++ b/rule/superfluous_else.go @@ -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 }