8 Commits

Author SHA1 Message Date
Jamie Holdstock
63b2a6117d
Use latest golangci-lint release and update linter list. (#484)
* ci: Update linter to 1.59.1.

Also remove deprecated linter "vetshadow", its functionality is now
included in the "govet" linter.

* ci: Add new linters.

- fatcontext - Detects nested contexts in loops.
- mirror - Reports wrong mirror patterns of bytes/strings usage.
- nilnil - Checks that there is no simultaneous return of nil error and
  an invalid value.
- usestdlibvars - detect the possibility to use variables/constants from
  the Go standard library.
2024-07-08 09:52:43 -04:00
jholdstock
a4d21d7838 build: Add extra linters.
Some of these cover points which have recently been highlighted in
reviews, such as contexts contained in structs, slices initialized with
zero length, and periods missing from the end of comments.
2023-08-24 07:52:40 +01:00
jholdstock
2db761e072 client: Remove autoclient & bump to v3
Adding the autoclient to vspd created a circular dependency between vspd
and dcrwallet which is cumbersome and not worth the maintence burden.

At this point there are no known consumers of the vspd version of
autoclient, so removing it is not expected to cause problems for
anybody.

The autoclient will continue to live in the dcrwallet repo.
2023-08-18 14:32:37 +01:00
Jamie Holdstock
a5003c046b
client: Automatic fee payment from dcrwallet (#382) 2023-05-30 11:50:23 +01:00
Jamie Holdstock
6d872db60e
Rename APIError to ErrorResponse. (#360)
Last commit before tagging v1.0.0 of the types module. The name ErrorResponse is consistent with all other response types.
2022-11-22 17:09:06 +08:00
Jamie Holdstock
11401c5369
Move vspd into cmd directory. (#352)
* Update linter to 1.49.0

* Move vspd into cmd directory.

This is standard practise in Decred golang repos. Especially useful when multiple executables are built from a single repo.

* Ignore bins in new dir.
2022-09-27 08:54:23 -05:00
jholdstock
9fa1012f3d Add some new linters. 2022-03-21 14:49:40 +00:00
jholdstock
2d67a35ba5 Use golangci-lint GitHub action.
- Rather than manually downloading and invoking golangci-lint, use the GitHub
action provided by the developers.
- Configure golangci with a config file rather than passing command line args.
This enables the same config to be used locally and on CI without introducing
duplication. It also allows much more flexibililty in configuration than using
CLI args alone.
2022-03-21 14:49:40 +00:00