Go: Add static analysis for generated Go bindings#126
Conversation
Signed-off-by: Arthit Suriyawongkul <arthit@gmail.com>
Signed-off-by: Arthit Suriyawongkul <arthit@gmail.com>
Signed-off-by: Arthit Suriyawongkul <arthit@gmail.com>
|
Test runs well and detect a number of warnings from S and ST categories:
|
Signed-off-by: Arthit Suriyawongkul <arthit@gmail.com>
Signed-off-by: Arthit Suriyawongkul <arthit@gmail.com>
Signed-off-by: Arthit Suriyawongkul <arthit@gmail.com>
Signed-off-by: Arthit Suriyawongkul <arthit@gmail.com>
Signed-off-by: Arthit Suriyawongkul <arthit@gmail.com>
|
@JPEWdev sorry, minor change - commit 0831f23 . I have updated templates it to put from Package {{ package_name }}: {{ disclaimer }}to Package {{ package_name }}:
{{ disclaimer }}Passed locally (only ran on test_golang.py). Will wait for CI to finished the full tests (now including the newly merged C++ static analysis). |
Signed-off-by: Arthit Suriyawongkul <arthit@gmail.com>
|
Tests on Python 3.9 failed not because of our code but because of pyshacl 0.40.0 (released few hours before the previous commit) no longer support Python 3.9 (it uses language construct that Python 3.9 runtime doesn't support). Fix by pin pyshacl at < 0.40.0. |
Add
go vetandstaticcheck.Test will failed as there are few style suggestions from the analysers to be addressed.
See #120
--
These minor issues are also fixed. Mostly about comment lines, missing package name declaration, and code styles.
switch v := x.(type)once instead of re-asserting per casex != nil &&beforelen(x) > 0append(lst, values...)sort.Sort(sort.StringSlice(...))->sort.Strings(...)for o, _ := range m->for o := range m