risor-io / risor

Fast and flexible scripting for Go developers and DevOps.
https://risor.io
Apache License 2.0
610 stars 26 forks source link

fix linter errors #214

Closed rprtr258 closed 5 months ago

rprtr258 commented 5 months ago

found some warnings from linters, fixed them in the PR

myzie commented 5 months ago

Thank you @rprtr258! I will review this soon.

myzie commented 5 months ago

Which linter(s) did you use? These were good catches. Should probably add the linters to the standard Risor CI setup.

rprtr258 commented 5 months ago

Which linter(s) did you use? These were good catches. Should probably add the linters to the standard Risor CI setup.

error checks are caught by somewhat standard linter which is turned on somewhere in vscode nilness, can be ran manually with

go run golang.org/x/tools/go/analysis/passes/nilness/cmd/nilness@latest ./...

others - by mannually running go-critic, excluding unimportant linters

gocritic check -enableAll ./... 2>&1 | grep -v 'ifElseChain|redundantSprint|hugeParam|unnamedResult|paramTypeCombine|importShadow|builtinShadow|singleCaseSwitch|commentedOutCode'