1
0
mirror of https://github.com/robertkrimen/otto synced 2025-10-12 20:27:30 +08:00
Commit Graph

8 Commits

Author SHA1 Message Date
Steven Hartland
ea8bcc30d6
ci: fix lint failures (#502)
Fix lint failures introduced by new 1.53 linters
* Remove naked returns
* Accept times using local time where intended
* Allow unused parameter for now on call method
* Disable depguard which just seems to be noise

Also:
* Correct typo so we use the specified golangci-lint version in CI.
2023-07-16 19:17:11 +01:00
Steven Hartland
ddcbf14a26
chore: improve error messages (#482)
Improve error messages so we don't just get TypeError with no clue what
the issue was.
2022-12-07 00:13:42 +00:00
Steven Hartland
233dfa4ef0
chore: remove perl, make and local docs. (#476)
Remove the dependencies on perl and make.

inline.pl is replaced by tools/gen-jscore and token/tokenfmt is replaced
by tools/gen-tokens which are both golang text/template utilities.

gen-jscore uses property ordering that matches chromes output ordering
adding missing properties to the Error types.

Local generated documentation have been removed as https://pkg.go.dev/
is more feature rich.

The use of make has been removed as the functionality is now replicated by
standard golang tools go test ./... and go generate ./... as well as integrated
into github actions.
2022-12-05 22:19:34 +00:00
Steven Hartland
9163a3ee27
ci: enable golangci-lint cache (#451)
Remove skip-cache: true and restore skip-pkg-cache: true and
skip-build-cache: true so that we still cache golangci-lint results
which skip-cache: true disables.
2022-11-25 21:34:48 +00:00
Steven Hartland
ba066df8fc
ci: use setup-go caching (#448)
Use setup-go caching instead of manually rolled version.

Also:
* Bump golangci-lint to 1.50.1.
* Add go 1.19 to test / lint matrix.
* Bump timeout to 6 mins.
2022-11-25 15:00:07 +00:00
Steven Hartland
93072360ee
ci: add goreleaser (#447)
Add goreleaser to enable the easy creation of otto releases.
2022-11-25 13:29:41 +00:00
Steven Hartland
7009038f79
fix: linting errors (#441)
Disable new linters which aren't compatible with this code module.

Upgrade github actions to fix caching issues.

Run go mod to bring in new styling.

Remove space on nolint declarations.

Apply all changes to whitespace as required to pass goimports linter.

Only trigger checks on pull_request which works for pulls from other
forks, where as push only works from the same repo.
2022-10-08 00:12:19 +01:00
Steven Hartland
9297a9abe4
feat: add github action tests and linting (#418)
Leverage github actions for tests and linting.

This includes fixing a bunch of issues highlighted by golangci
including:
* Dead code.
* Ineffectual assigns.
* Goto warnings.
* Nil return err.
* Reused literal strings.
* Test parameter order.

Also:
* Setup clog.
2021-09-27 16:19:28 +01:00