gitea icon indicating copy to clipboard operation
gitea copied to clipboard

Clean up revive linter config, tweak golangci output

Open silverwind opened this issue 1 year ago • 1 comments

The errorCode and warningCode options were removed at some point, they are not recognized by golangci-lint any more at least and they do not match their published json schema. confidence and ignore-generated-header are at the default value so does not need to be configured.

https://golangci-lint.run/usage/linters/#revive

silverwind avatar May 15 '24 00:05 silverwind

Lint output tweaked, sort by file and show count of errors below.

go run github.com/golangci/golangci-lint/cmd/[email protected] run
modules/base/tool.go:70:2: increment-decrement: should replace minutes -= 1 with minutes-- (revive)
	minutes -= 1
	^
modules/base/tool.go:71:2: increment-decrement: should replace minutes += 1 with minutes++ (revive)
	minutes += 1
	^
2 issues:
* revive: 2
exit status 1
make: *** [Makefile:408: lint-go] Error 1

silverwind avatar May 16 '24 22:05 silverwind