Commit Graph

1 Commits

Author SHA1 Message Date
SmallCoccinelle a2cce0ba77
Add golangci-lint workflow (#1759)
* Add golangci-lint workflow

* Add a bit more lenient linter timeout

1 Minute isn't always enough, so bump to 3.

* Document golangci, add make target

Document how to get golangci-lint in the README file. While here,
provide a QOL target in the makefile
for the linter, and make it part of validation.

* Introduce .golangci.yml

This is the default golangci-lint configuration file location. Use it.

Move configuration into the yaml file, and enable the default set of
linters; we know we pass most of those.

* Add gofmt and revive to golangci-lint

Read the golangci-lint source code to figure out the configuration format.

Copy the configuration from `revive.toml` into the linter configuration.

* Do not set simplify on gofmt

The project currently runs without simplify. So for consistency, don't
make that a requirement for the linter.

* Add new-from-rev

Older issues should not be considered a failure for new PRs and issues.
Use new-from-from to make the current develop as the point-in-time for
when we consider errors.

Once in the tree, we can go and fix the older errors in separate
patches, taking a little bit at a time.

* Move to golangci-lint

Rewrite the way we run targets in the makefile, so it is split between
frontend and backend.

Use the frontend build steps in build.yml

Update README to reflect the new world order.

* Remove check-gofmt.sh

The tool now runs as part of golangci-lint, in particular through the
'validate' target in the Makefile.

* Remove targets for golangci-lint

Fold these targets into the `lint` target. While here, update README.
2021-09-27 10:41:59 +10:00