Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Updates for golangci-lint v1.61.0 (some gosec improvements) #239

Merged
merged 2 commits into from
Sep 17, 2024
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 .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