-
Notifications
You must be signed in to change notification settings - Fork 20
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
Introduce static code analysis #50
Conversation
ff5239b
to
99cb8e2
Compare
5945030
to
4dbb85a
Compare
This pull request sets up GitHub code scanning for this repository. Once the scans have completed and the checks have passed, the analysis results for this pull request branch will appear on this overview. Once you merge this pull request, the 'Security' tab will show more code scanning analysis results (for example, for the default branch). Depending on your configuration and choice of analysis tool, future pull requests will be annotated with code scanning analysis results. For more information about GitHub code scanning, check out the documentation. |
a7e7375
to
bb89744
Compare
@luthermonson @avestuk @zliang-akamai Could you please take a look |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm fine with the SCA change. I'm glad to see the updates to break out reconcile into smaller pieces!
My one question is why you've chosen to use named returns in all of the the new reconcile functions such as reconcileUpdate. Personally I'm just not used to seeing naked returns in Go and I find it a bit jarring.
@avestuk the answer is simply because the original |
Eminently reasonable! What do you think about only doing named returns in |
@avestuk I did what i could, but reconcile update has to be an exception too. |
That works for me! |
Sorry just reading through that function and I'm not seeing why |
@avestuk Otherwise it looks like:
And all the returns are the same |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not a blocker for me, but I'd prefer explicit, repeated returns than the bare return.
* Introduce static code analysis * Replace named returns where possible * Allow storage.googleapis.com for nilcheck --------- Co-authored-by: Richard Kovacs <[email protected]>
Golangci-lint, Gosec, Govulncheck and Nilaway has been introduced. CodeQL Github also has been added.
Fixes: #44