Commit Graph

4 Commits

Author SHA1 Message Date
WithoutPants 9e2261a813
Temporarily disable caching in lint action 2022-04-02 18:41:43 +11:00
SmallCoccinelle 45f700d6ea
Support Go 1.18: Upgrade gqlgen to v0.17.2 (#2443)
* Upgrade gqlgen to v0.17.2

This enables builds on Go 1.18. github.com/vektah/gqlparser is upgraded
to the newest version too.

Getting this to work is a bit of a hazzle. I had to first remove
vendoring from the repository, perform the upgrade and then re-introduce
the vendor directory. I think gqlgens analysis went wrong for some
reason on the upgrade. It would seem a clean-room installation fixed it.

* Bump project to 1.18

* Update all packages, address gqlgenc breaking changes

* Let `go mod tidy` handle the go.mod file

* Upgrade linter to 1.45.2

* Introduce v1.45.2 of the linter

The linter now correctly warns on `strings.Title` because it isn't
unicode-aware. Fix this by using the suggested fix from x/text/cases
to produce unicode-aware strings.

The mapping isn't entirely 1-1 as this new approach has a larger iface:
it spans all of unicode rather than just ASCII. It coincides for ASCII
however, so things should be largely the same.

* Ready ourselves for errchkjson and contextcheck.

* Revert dockerfile golang version changes for now

Co-authored-by: Kermie <kermie@isinthe.house>
Co-authored-by: WithoutPants <53250216+WithoutPants@users.noreply.github.com>
2022-04-02 18:08:14 +11:00
kermieisinthehouse 0e514183a7
Desktop integration (#2073)
* Open stash in system tray on Windows/MacOS
* Add desktop notifications
* MacOS Bundling
* Add binary icon

Co-authored-by: WithoutPants <53250216+WithoutPants@users.noreply.github.com>
2022-02-03 11:20:34 +11:00
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