-
Notifications
You must be signed in to change notification settings - Fork 77
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
Adjust vet and gosec complaints #548
Conversation
Fix complaints for test files that were previously unchecked Signed-off-by: Giuseppe Maxia <gmaxia@vmware.com>
Signed-off-by: Giuseppe Maxia <gmaxia@vmware.com>
Signed-off-by: Giuseppe Maxia <gmaxia@vmware.com>
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.
Thanks!
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.
Thanks for the improvements!
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.
Thanks!
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.
Perfect. Thanks!
The command
make vet
was running without tags, and therefore it was ignoring most of the test files.After adding
-tags ALL
, some complains appeared that are addressed here.Makefile
govcd/access_control_catalog_test.go
govcd/access_control_vapp_test.go
govcd/catalog_test.go
govcd/common_test.go
govcd/external_network_v2_test.go
govcd/nsxt_firewall_group_dynamic_security_group_test.go
The latest version of
gosec
(2.15 released today) raises several security complaints related to unsafe usage ofdefer
. Such usages are fixed in this PR.govcd/api_vcd.go
govcd/catalog.go
govcd/media.go
govcd/nsxt_importable_switch.go
Furthermore, the installation of
gosec
in the Github Actions worker sometimes fails with unclear errors. To help understanding the issue, we have added more debugging information toscripts/gosec.sh
.