Unwrap errors#404
Conversation
|
This pull request does not have a backport label. Could you fix it @olegsu? 🙏
|
bfdf60d to
0ef1d9c
Compare
oren-zohar
left a comment
There was a problem hiding this comment.
Love the use of go vet printfuncs
| - name: Run Tests | ||
| id: run_tests | ||
| run: | | ||
| just run-golang-vet |
There was a problem hiding this comment.
should probably be part of unit-test.yml so we'll run it only once
There was a problem hiding this comment.
I see we are using golangci-lint. Will update its config
Cloudbeat CI 🤖Allure Report: http://csp-allure-reports.s3.amazonaws.com/allure_reports/cloudbeat/prs/404/index.html |
| - name: Run Tests | ||
| id: run_tests | ||
| run: | | ||
| just run-golang-vet |
There was a problem hiding this comment.
should probably be part of unit-test.yml so we'll run it only once
72df493 to
717ce96
Compare
oren-zohar
left a comment
There was a problem hiding this comment.
looks great, can you please share a screenshot of what the logs looks like for one of the edited logs?
| - Fatalf | ||
| - Panicf | ||
| - DPanicf | ||
| disable-all: true |
There was a problem hiding this comment.
Why not include them if we are passing all of the analyzers? (Tested locally and appears to pass)
0afa31f to
2048f5f
Compare
2048f5f to
ec1ff03
Compare
* fix: error unwrap * feat: run vet in ci
Related to #388
This PR includes also:
go vetwould reportgolangci-lintconfiguration to run customprint.funcsWhy update vet with print.funcs?
Normally
go vetruns on a lot of functions signatures (the full listgo tool vet help printf), but not the one that in logpTo overcome this
go vetallow to add additional functions to check.By setting
-printfuncs="Infof,Debugf,Warnf,Errorf,Fatalf,Panicf,DPanicf"we can make sure that all the logger calls are coveredRun locally
golangci-lint runOutput
When having formatting issues, for example

l.log.Infof("Waiting for initial reconfiguration from Fleet server... %s")You would see
Additional Reading