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

fix linting issues #325

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open

Conversation

thaJeztah
Copy link
Contributor

Signed-off-by: Sebastiaan van Stijn <[email protected]>
@thaJeztah thaJeztah requested a review from a team as a code owner January 10, 2025 23:23
@thaJeztah
Copy link
Contributor Author

cc @kevpar if you have permissions to kick CI ❤️

@katiewasnothere
Copy link
Contributor

@thaJeztah It looks like the CI is still failing

@thaJeztah
Copy link
Contributor Author

Yeah, I noticed; I suspect the other failures may also be with newer go versions, or updated golangci-lint.

I think they're all about integer conversion in generated code; haven't checked if they can be ignored (temporarily) or need fixing;

mode=readonly] in [] ...
  ::high file=wim/lzx/lzx.go,line=137,col=13::G115: integer overflow conversion uint32 -> uint16 (gosec)
  ::high file=wim/lzx/lzx.go,line=191,col=26::G115: integer overflow conversion uint -> uint16 (gosec)
  ::high file=wim/lzx/lzx.go,line=200,col=38::G115: integer overflow conversion int -> uint16 (gosec)
  ::high file=wim/lzx/lzx.go,line=376,col=20::G115: integer overflow conversion uint32 -> uint16 (gosec)
  ::high file=wim/lzx/lzx.go,line=377,col=20::G115: integer overflow conversion uint32 -> uint16 (gosec)
  ::high file=wim/lzx/lzx.go,line=378,col=20::G115: integer overflow conversion uint32 -> uint16 (gosec)
  ::high file=wim/lzx/lzx.go,line=526,col=51::G115: integer overflow conversion int -> uint16 (gosec)

@mat007
Copy link

mat007 commented Jan 30, 2025

I opened a separate PR to fix the «Go Generate» failure: #326

Copy link

@kiashok kiashok left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

CI is still failing

@kiashok
Copy link

kiashok commented Jan 30, 2025

@mat007 @thaJeztah looks like the CIs are still failing

@mat007
Copy link

mat007 commented Jan 31, 2025

Maybe these should be pinned versions? 🤷

GO_VERSION: "oldstable"
GOTESTSUM_VERSION: "latest"
GOLANGCILINT_VERSION: "latest"

@mat007
Copy link

mat007 commented Jan 31, 2025

There are 104 linting errors remaining, all due to conversions. I’ve looked at a few and they all seem to be similar, for instance

ed.writeUint16(uint16(len(values)))
raises

  ::high file=pkg/etw/fieldopt.go,line=165,col=24::G115: integer overflow conversion int -> uint16 (gosec)

What would be best here? To «nolint» them all?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants