-
-
Notifications
You must be signed in to change notification settings - Fork 612
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: parsing of the Go version #844
Conversation
3a2b679
to
8a042a3
Compare
@ldez Please could you fix the lint warnings? Thanks |
yes, I will fix that immediately. |
in fact, I'm not able to see where is the issue: no information about the file, and locally The only problem is the use of I can fix it, but you have a hidden problem because of the invalid directive syntax. More information: golangci/golangci-lint#1658 |
Codecov Report
@@ Coverage Diff @@
## master #844 +/- ##
==========================================
- Coverage 74.08% 73.92% -0.17%
==========================================
Files 51 51
Lines 3180 3187 +7
==========================================
Hits 2356 2356
- Misses 754 761 +7
Partials 70 70
Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. |
@ccojocar do you plan to make a bugfix release? |
The parsing of the Go version inside the function
GoVersion
is based on an incorrect assumption.gosec/helpers.go
Lines 476 to 482 in 0c8e63e
The Go version follows a specific pattern.
The current version of Go is
go1.19
thenversionParts[2]
panic (runtime error: index out of range [2] with length 2
)Fixes #843
The problem has been introduced by #819
Related to golangci/golangci-lint#3071