LeonardYam

Results 8 issues of LeonardYam

gosec detects security issues in the Go code. Any lint issues related to gosec can be found by searching for `// nolint:gosec`. Related issue: #2984

staticcheck is a linter that detects various bugs and issues for Go. The full list of checks can be found [here](https://staticcheck.io/docs/checks/). Any lint issues related to staticcheck can be found...

gocognit detects functions with high cognitive complexities based on [a set of rules](https://github.com/uudashr/gocognit). Reasoning - Functions with high cognitive complexities are harder to understand. Any lint issues related to gocognit...

containedctx detects struct contained context.Context field. [Reasoning](https://go.dev/blog/context-and-structs) - Storing context in structs is generally only used to preserve backwards compatibility. Ideally contexts should be passed as arguments. Any lint issues...

exhaustruct detects structures with uninitialized fields. Any lint issues related to exhaustruct can be found by searching for `// nolint:exhaustruct` Related issue: #2984

ireturn detects functions that return interfaces. [Reasoning](https://medium.com/@cep21/preemptive-interface-anti-pattern-in-go-54c18ac0668a) - Pre-emptive interfaces are generally an anti-pattern in Go due to implicit interfaces. Returning structs allows for quick navigation to the correct function....

nestif detects complex nested if statements. Reasoning - Complex nested if statements affects code readability and should ideally be refactored Any lint issues related to gochecknoglobals can be found by...

gochecknoglobals checks for any global variables in Go code. Reasoning - Global variables are an input to functions that is not visible in the functions signature, complicate testing, reduces readability...