Skip to content

Commit

Permalink
Updates for golangci-lint v1.61.0 (some gosec improvements) (#239)
Browse files Browse the repository at this point in the history
* Updates for golangci-lint v1.61.0 (some gosec improvements)

* forgot this didn't use the shared workflow setup
  • Loading branch information
ldemailly authored Sep 17, 2024
1 parent dda178b commit 2bb2aa3
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 3 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/gochecks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ jobs:
if: matrix.os == 'ubuntu-latest'
uses: golangci/golangci-lint-action@aaa42aa0628b4ae2578232a66b541047968fac86 # pin@v6
with:
version: v1.60.3
version: v1.61.0
- name: Install Git Bash
run: |
choco install git
Expand Down
4 changes: 2 additions & 2 deletions extensions/images.go
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ func elem2ColorComponent(o object.Object) (uint8, *object.Error) {
if i < 0 || i > 255 {
return 0, object.Errorfp("color component out of range (should be 0-255): %s", o.Inspect())
}
return uint8(i), nil //nolint:gosec // gosec not smart enough to see the range check just above this.
return uint8(i), nil
}

func rgbArrayToRBGAColor(arr []object.Object) (color.NRGBA, *object.Error) {
Expand Down Expand Up @@ -425,7 +425,7 @@ func createVectorImageFunctions(cdata ImageMap) { //nolint:funlen // this is a g
}

func mergeAdd(img1, img2 *image.NRGBA) {
//nolint:gosec // gosec not smart enough to see the range checks.
//nolint:gosec // gosec not smart enough to see the range checks with min - https://github.com/securego/gosec/issues/1212
for y := range img1.Bounds().Dy() {
for x := range img1.Bounds().Dx() {
p1 := img1.NRGBAAt(x, y)
Expand Down
1 change: 1 addition & 0 deletions extensions/shell.go
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,7 @@ func createShellFunctions() {
if s.Term != nil {
s.Term.Suspend()
}
//nolint:fatcontext // we do need to update/reset the context and its cancel function.
s.Context, s.Cancel = context.WithCancel(context.Background()) // no timeout.
cmd, oerr := createCmd(*s, args)
if oerr != nil {
Expand Down

0 comments on commit 2bb2aa3

Please sign in to comment.