Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion cli/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ func fail(err string) {

// RunRevive runs the CLI for revive.
func RunRevive(extraRules ...revivelib.ExtraRule) {
// move parsing flags outside of init() otherwise tests dont works properly
// move parsing flags outside of init() otherwise tests don't works properly
// more info: https://github.com/golang/go/issues/46869#issuecomment-865695953
initConfig()

Expand Down
2 changes: 1 addition & 1 deletion lint/filefilter.go
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ func (ff *FileFilter) prepareRegexp() error {
return nil
}

// it's whole file mask, just escape dots and normilze separators
// it's whole file mask, just escape dots and normalize separators
fillRx := src
fillRx = strings.ReplaceAll(fillRx, "\\", "/")
fillRx = strings.ReplaceAll(fillRx, ".", `\.`)
Expand Down
6 changes: 3 additions & 3 deletions rule/optimize_operands_order.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ func (*OptimizeOperandsOrderRule) Apply(file *lint.File, _ lint.Arguments) []lin
onFailure := func(failure lint.Failure) {
failures = append(failures, failure)
}
w := lintOptimizeOperandsOrderlExpr{
w := lintOptimizeOperandsOrderExpr{
onFailure: onFailure,
}
ast.Walk(w, file.AST)
Expand All @@ -30,13 +30,13 @@ func (*OptimizeOperandsOrderRule) Name() string {
return "optimize-operands-order"
}

type lintOptimizeOperandsOrderlExpr struct {
type lintOptimizeOperandsOrderExpr struct {
onFailure func(failure lint.Failure)
}

// Visit checks boolean AND and OR expressions to determine
// if swapping their operands may result in an execution speedup.
func (w lintOptimizeOperandsOrderlExpr) Visit(node ast.Node) ast.Visitor {
func (w lintOptimizeOperandsOrderExpr) Visit(node ast.Node) ast.Visitor {
binExpr, ok := node.(*ast.BinaryExpr)
if !ok {
return w
Expand Down
2 changes: 1 addition & 1 deletion testdata/go1.24/struct_tag.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ package fixtures
import "time"

type decodeAndValidateRequest struct {
// BEAWRE : the flag of URLParam should match the const string URLParam
// BEWARE : the flag of URLParam should match the const string URLParam
URLParam string `json:"-" path:"url_param" validate:"numeric"`
Text string `json:"text" validate:"max=10"`
DefaultInt int `json:"defaultInt" default:"10.0"` // MATCH /field's type and default value's type mismatch/
Expand Down
2 changes: 1 addition & 1 deletion testdata/struct_tag.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ package fixtures
import "time"

type decodeAndValidateRequest struct {
// BEAWRE : the flag of URLParam should match the const string URLParam
// BEWARE : the flag of URLParam should match the const string URLParam
URLParam string `json:"-" path:"url_param" validate:"numeric"`
Text string `json:"text" validate:"max=10"`
DefaultInt int `json:"defaultInt" default:"10.0"` // MATCH /field's type and default value's type mismatch/
Expand Down