Skip to content

Commit

Permalink
chore(sage): bump to v0.306.0
Browse files Browse the repository at this point in the history
Linter fixes:

* ignore G115 in filtering/lexer

  Not likely that `n` (width of a rune) is large enough to overflow
  an int32.

* rename variable to avoid shadowing built-in function

  Pleases the predeclared linter.
  • Loading branch information
radhus committed Sep 9, 2024
1 parent 6090222 commit 5da9840
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 8 deletions.
2 changes: 1 addition & 1 deletion .sage/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@ module sage

go 1.19

require go.einride.tech/sage v0.293.0
require go.einride.tech/sage v0.306.0
4 changes: 2 additions & 2 deletions .sage/go.sum
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
go.einride.tech/sage v0.293.0 h1:y9jHXCAMx0HrIU4bKGLhc1jQl6iWRMly0f4MPOlzEYE=
go.einride.tech/sage v0.293.0/go.mod h1:EzV5uciFX7/2ho8EKB5K9JghOfXIxlzs694b+Tkl5GQ=
go.einride.tech/sage v0.306.0 h1:FjnGGXqA11NJnV11zYhTq+tcMN4vrqMdBeSLnwfSAs0=
go.einride.tech/sage v0.306.0/go.mod h1:EzV5uciFX7/2ho8EKB5K9JghOfXIxlzs694b+Tkl5GQ=
2 changes: 1 addition & 1 deletion filtering/lexer.go
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,7 @@ func (l *Lexer) nextRune() (rune, error) {
} else {
l.tokenEnd.Column++
}
l.tokenEnd.Offset += int32(n)
l.tokenEnd.Offset += int32(n) // #nosec G115
return r, nil
}

Expand Down
8 changes: 4 additions & 4 deletions filtering/macro.go
Original file line number Diff line number Diff line change
Expand Up @@ -77,12 +77,12 @@ func (c *Cursor) Replace(newExpr *expr.Expr) {
}

func maxID(exp *expr.Expr) int64 {
var max int64
var maxFound int64
Walk(func(_, _ *expr.Expr) bool {
if exp.GetId() > max {
max = exp.GetId()
if exp.GetId() > maxFound {
maxFound = exp.GetId()
}
return true
}, exp)
return max
return maxFound
}

0 comments on commit 5da9840

Please sign in to comment.