Compare commits

...

92 Commits
v1 ... v2.4.0

Author SHA1 Message Date
544d2efb30 Update dist folder (#160) 2021-02-14 18:50:33 +01:00
0dd30832fc Add options to skip caching of folders. (#154)
Add option to skip caching the Go package directory (~/go/pkg).
Add option to skip caching the Go build directory (~/.cache/go-build).
Update README to mention new options.
2021-02-14 10:59:58 -06:00
e1ae6cf354 build(deps-dev): bump @types/node from 14.14.22 to 14.14.25 (#158) 2021-02-08 10:04:43 +01:00
0ef0ffc44e build(deps): bump @actions/cache from 1.0.5 to 1.0.6 (#159)
Bumps [@actions/cache](https://github.com/actions/toolkit/tree/HEAD/packages/cache) from 1.0.5 to 1.0.6.
- [Release notes](https://github.com/actions/toolkit/releases)
- [Changelog](https://github.com/actions/toolkit/blob/main/packages/cache/RELEASES.md)
- [Commits](https://github.com/actions/toolkit/commits/HEAD/packages/cache)

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-02-08 16:54:09 +11:00
125ac487c1 build(deps-dev): bump @types/node from 14.14.21 to 14.14.22 (#152)
Bumps [@types/node](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/node) from 14.14.21 to 14.14.22.
- [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases)
- [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/node)

Signed-off-by: dependabot[bot] <support@github.com>
Signed-off-by: Xiang Dai <long0dai@foxmail.com>
Co-authored-by: Xiang Dai <long0dai@foxmail.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-01-25 14:18:44 +08:00
e246bba31d Fix a typo in README.md (it's->its) (#151)
See https://www.grammarly.com/blog/possessive-pronouns/: A Common Mistake: Its vs. It’s
2021-01-23 01:23:41 +01:00
147f37a473 build(deps-dev): bump @types/node from 14.14.20 to 14.14.21 (#149)
Bumps [@types/node](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/node) from 14.14.20 to 14.14.21.
- [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases)
- [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/node)

Signed-off-by: dependabot[bot] <support@github.com>
Signed-off-by: Xiang Dai <long0dai@foxmail.com>
Co-authored-by: Xiang Dai <long0dai@foxmail.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-01-18 14:12:26 +08:00
a19645e82f build(deps-dev): bump eslint-plugin-prettier from 3.3.0 to 3.3.1 (#148) 2021-01-11 10:15:27 +01:00
286cf073ea build(deps-dev): bump @types/node from 14.14.19 to 14.14.20 (#147) 2021-01-11 10:15:08 +01:00
7641a6707d build(deps-dev): bump @types/node from 14.14.16 to 14.14.19 (#145)
Bumps [@types/node](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/node) from 14.14.16 to 14.14.19.
- [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases)
- [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/node)

Signed-off-by: dependabot[bot] <support@github.com>
Signed-off-by: Xiang Dai <long0dai@foxmail.com>
Co-authored-by: Xiang Dai <long0dai@foxmail.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-01-04 14:22:37 +08:00
e4e910b0ce Add a skip-go-installation to use pre-installed Go (#144)
* update package-lock.json

* Add skip-go-installation to use pre-installed Go

Add the golangci-lint to PATH
2020-12-31 11:20:57 -06:00
89d96d6c20 build(deps-dev): bump eslint-plugin-simple-import-sort from 5.0.3 to 7.0.0 (#137)
* build(deps-dev): bump eslint-plugin-simple-import-sort

Bumps [eslint-plugin-simple-import-sort](https://github.com/lydell/eslint-plugin-simple-import-sort) from 5.0.3 to 7.0.0.
- [Release notes](https://github.com/lydell/eslint-plugin-simple-import-sort/releases)
- [Changelog](https://github.com/lydell/eslint-plugin-simple-import-sort/blob/main/CHANGELOG.md)
- [Commits](https://github.com/lydell/eslint-plugin-simple-import-sort/compare/v5.0.3...v7.0.0)

Signed-off-by: dependabot[bot] <support@github.com>

* update dist

* update .eslintrc.json

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Sergey Vilgelm <sergey.vilgelm@ibm.com>
2020-12-28 22:41:47 -06:00
45f3a377de build(deps-dev): bump @types/node from 14.14.14 to 14.14.16 (#143)
Bumps [@types/node](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/node) from 14.14.14 to 14.14.16.
- [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases)
- [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/node)

Signed-off-by: dependabot[bot] <support@github.com>
Signed-off-by: Xiang Dai <long0dai@foxmail.com>
Co-authored-by: Xiang Dai <long0dai@foxmail.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2020-12-28 14:10:50 +08:00
943013ec20 build(deps-dev): bump @types/node from 14.14.13 to 14.14.14 (#142) 2020-12-21 10:16:58 +01:00
49a9e469b1 build(deps-dev): bump typescript from 4.1.2 to 4.1.3 (#140)
Bumps [typescript](https://github.com/Microsoft/TypeScript) from 4.1.2 to 4.1.3.
- [Release notes](https://github.com/Microsoft/TypeScript/releases)
- [Commits](https://github.com/Microsoft/TypeScript/commits)

Signed-off-by: dependabot[bot] <support@github.com>
Signed-off-by: Xiang Dai <long0dai@foxmail.com>
Co-authored-by: Xiang Dai <long0dai@foxmail.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2020-12-14 14:20:44 +08:00
528677aa24 build(deps-dev): bump @types/node from 14.14.10 to 14.14.13 (#139)
Bumps [@types/node](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/node) from 14.14.10 to 14.14.13.
- [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases)
- [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/node)

Signed-off-by: dependabot[bot] <support@github.com>
Signed-off-by: Xiang Dai <long0dai@foxmail.com>
Co-authored-by: Xiang Dai <long0dai@foxmail.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2020-12-14 14:20:04 +08:00
85798b53e5 build(deps): bump @actions/cache from 1.0.4 to 1.0.5 (#141)
Bumps [@actions/cache](https://github.com/actions/toolkit/tree/HEAD/packages/cache) from 1.0.4 to 1.0.5.
- [Release notes](https://github.com/actions/toolkit/releases)
- [Changelog](https://github.com/actions/toolkit/blob/main/packages/cache/RELEASES.md)
- [Commits](https://github.com/actions/toolkit/commits/HEAD/packages/cache)

Signed-off-by: dependabot[bot] <support@github.com>
Signed-off-by: Xiang Dai <long0dai@foxmail.com>
Co-authored-by: Xiang Dai <long0dai@foxmail.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2020-12-14 14:19:45 +08:00
d164f0d6d8 build(deps-dev): bump eslint-plugin-prettier from 3.2.0 to 3.3.0 (#138)
Bumps [eslint-plugin-prettier](https://github.com/prettier/eslint-plugin-prettier) from 3.2.0 to 3.3.0.
- [Release notes](https://github.com/prettier/eslint-plugin-prettier/releases)
- [Changelog](https://github.com/prettier/eslint-plugin-prettier/blob/master/CHANGELOG.md)
- [Commits](https://github.com/prettier/eslint-plugin-prettier/compare/v3.2.0...v3.3.0)

Signed-off-by: dependabot[bot] <support@github.com>
Signed-off-by: Xiang Dai <long0dai@foxmail.com>
Co-authored-by: Xiang Dai <long0dai@foxmail.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2020-12-14 14:19:29 +08:00
9cf34bb2b8 build(deps-dev): bump eslint-plugin-prettier from 3.1.4 to 3.2.0 (#136)
Bumps [eslint-plugin-prettier](https://github.com/prettier/eslint-plugin-prettier) from 3.1.4 to 3.2.0.
- [Release notes](https://github.com/prettier/eslint-plugin-prettier/releases)
- [Changelog](https://github.com/prettier/eslint-plugin-prettier/blob/master/CHANGELOG.md)
- [Commits](https://github.com/prettier/eslint-plugin-prettier/compare/v3.1.4...v3.2.0)

Signed-off-by: Xiang Dai <long0dai@foxmail.com>
Co-authored-by: Xiang Dai <long0dai@foxmail.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2020-12-07 14:12:21 +08:00
629aad184c build(deps-dev): bump @types/node from 14.14.9 to 14.14.10 (#134)
Bumps [@types/node](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/node) from 14.14.9 to 14.14.10.
- [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases)
- [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/node)

Signed-off-by: dependabot[bot] <support@github.com>
Signed-off-by: Xiang Dai <long0dai@foxmail.com>
Co-authored-by: Xiang Dai <long0dai@foxmail.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2020-11-30 14:15:03 +08:00
1bac7d9888 build(deps-dev): bump prettier from 2.1.2 to 2.2.1 (#133)
Bumps [prettier](https://github.com/prettier/prettier) from 2.1.2 to 2.2.1.
- [Release notes](https://github.com/prettier/prettier/releases)
- [Changelog](https://github.com/prettier/prettier/blob/master/CHANGELOG.md)
- [Commits](https://github.com/prettier/prettier/compare/2.1.2...2.2.1)

Signed-off-by: dependabot[bot] <support@github.com>
Signed-off-by: Xiang Dai <long0dai@foxmail.com>
Co-authored-by: Xiang Dai <long0dai@foxmail.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2020-11-30 14:14:12 +08:00
44fae30515 build(deps-dev): bump typescript from 4.0.5 to 4.1.2 (#131)
Bumps [typescript](https://github.com/Microsoft/TypeScript) from 4.0.5 to 4.1.2.
- [Release notes](https://github.com/Microsoft/TypeScript/releases)
- [Commits](https://github.com/Microsoft/TypeScript/compare/v4.0.5...v4.1.2)

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2020-11-23 18:32:03 +11:00
689e90e8a0 build(deps-dev): bump @types/node from 14.14.7 to 14.14.9 (#130)
Bumps [@types/node](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/node) from 14.14.7 to 14.14.9.
- [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases)
- [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/node)

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2020-11-23 18:31:53 +11:00
d73150ab3c build(deps-dev): bump @types/node from 14.14.6 to 14.14.7 (#124)
Bumps [@types/node](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/node) from 14.14.6 to 14.14.7.
- [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases)
- [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/node)

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2020-11-16 17:02:36 +11:00
2c3839ff26 build(deps): bump @actions/tool-cache from 1.6.0 to 1.6.1 (#125)
Bumps [@actions/tool-cache](https://github.com/actions/toolkit/tree/HEAD/packages/tool-cache) from 1.6.0 to 1.6.1.
- [Release notes](https://github.com/actions/toolkit/releases)
- [Changelog](https://github.com/actions/toolkit/blob/main/packages/tool-cache/RELEASES.md)
- [Commits](https://github.com/actions/toolkit/commits/HEAD/packages/tool-cache)

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2020-11-16 17:02:13 +11:00
f881d993a0 build(deps): bump @actions/cache from 1.0.3 to 1.0.4 (#123)
Bumps [@actions/cache](https://github.com/actions/toolkit/tree/HEAD/packages/cache) from 1.0.3 to 1.0.4.
- [Release notes](https://github.com/actions/toolkit/releases)
- [Changelog](https://github.com/actions/toolkit/blob/main/packages/cache/RELEASES.md)
- [Commits](https://github.com/actions/toolkit/commits/HEAD/packages/cache)

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2020-11-09 16:55:23 +11:00
d3f3b8adb7 build(deps-dev): bump typescript from 4.0.3 to 4.0.5 (#120)
Bumps [typescript](https://github.com/Microsoft/TypeScript) from 4.0.3 to 4.0.5.
- [Release notes](https://github.com/Microsoft/TypeScript/releases)
- [Commits](https://github.com/Microsoft/TypeScript/compare/v4.0.3...v4.0.5)

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2020-11-02 17:28:54 +11:00
e3e2a92cbd build(deps-dev): bump @types/node from 14.14.3 to 14.14.6 (#121)
Bumps [@types/node](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/node) from 14.14.3 to 14.14.6.
- [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases)
- [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/node)

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2020-11-02 17:28:31 +11:00
e1bd4355fb build(deps-dev): bump eslint-config-prettier from 6.14.0 to 6.15.0 (#122)
Bumps [eslint-config-prettier](https://github.com/prettier/eslint-config-prettier) from 6.14.0 to 6.15.0.
- [Release notes](https://github.com/prettier/eslint-config-prettier/releases)
- [Changelog](https://github.com/prettier/eslint-config-prettier/blob/master/CHANGELOG.md)
- [Commits](https://github.com/prettier/eslint-config-prettier/compare/v6.14.0...v6.15.0)

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2020-11-02 17:28:13 +11:00
345e5340e3 build(deps-dev): bump @types/node from 14.11.10 to 14.14.3 (#116)
Bumps [@types/node](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/node) from 14.11.10 to 14.14.3.
- [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases)
- [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/node)

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2020-10-26 17:21:51 +11:00
13e9e901f4 build(deps): bump @actions/cache from 1.0.2 to 1.0.3 (#117)
Bumps [@actions/cache](https://github.com/actions/toolkit/tree/HEAD/packages/cache) from 1.0.2 to 1.0.3.
- [Release notes](https://github.com/actions/toolkit/releases)
- [Changelog](https://github.com/actions/toolkit/blob/main/packages/cache/RELEASES.md)
- [Commits](https://github.com/actions/toolkit/commits/HEAD/packages/cache)

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2020-10-26 16:54:07 +11:00
771153bfbc build(deps-dev): bump eslint-config-prettier from 6.13.0 to 6.14.0 (#115)
Bumps [eslint-config-prettier](https://github.com/prettier/eslint-config-prettier) from 6.13.0 to 6.14.0.
- [Release notes](https://github.com/prettier/eslint-config-prettier/releases)
- [Changelog](https://github.com/prettier/eslint-config-prettier/blob/master/CHANGELOG.md)
- [Commits](https://github.com/prettier/eslint-config-prettier/compare/v6.13.0...v6.14.0)

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2020-10-26 16:53:40 +11:00
e868220d9f build(deps-dev): bump @types/node from 14.11.8 to 14.11.10 (#114)
Bumps [@types/node](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/node) from 14.11.8 to 14.11.10.
- [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases)
- [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/node)

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2020-10-19 16:56:46 +11:00
0348c21999 build(deps-dev): bump eslint-config-prettier from 6.12.0 to 6.13.0 (#113)
Bumps [eslint-config-prettier](https://github.com/prettier/eslint-config-prettier) from 6.12.0 to 6.13.0.
- [Release notes](https://github.com/prettier/eslint-config-prettier/releases)
- [Changelog](https://github.com/prettier/eslint-config-prettier/blob/master/CHANGELOG.md)
- [Commits](https://github.com/prettier/eslint-config-prettier/compare/v6.12.0...v6.13.0)

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2020-10-19 16:56:32 +11:00
a1c5369c06 feat(version): Support for patch verison (#101)
This commit is to support X.Y.Z version in config.

- if X.Y.Z version is passed, honour it 👍
- if X.Y version is passed, keep the same behaviour
as it is right now.

Closes #98

Signed-off-by: Tam Mach <sayboras@yahoo.com>
2020-10-17 16:52:51 +08:00
90fbd40fc4 ci(codql): Add codeQL from github (#100)
This commit is to add codeQL scanning, which was recently introduced by github

Signed-off-by: Tam Mach <sayboras@yahoo.com>
2020-10-16 20:09:27 +11:00
3d2a5790a3 build(deps-dev): bump @types/node from 14.11.2 to 14.11.8 (#107)
Bumps [@types/node](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/node) from 14.11.2 to 14.11.8.
- [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases)
- [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/node)

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2020-10-12 16:49:37 +11:00
54a84d46fb chore(dist): Update dist directory after few dependent bot PRs (#99)
This commit is to update dist directory after few dependent bot PRs

Signed-off-by: Tam Mach <sayboras@yahoo.com>
2020-10-11 20:39:48 +03:00
ba0e91ca3a Add main to list of branches in README example (#104) 2020-10-08 12:37:20 +02:00
4957db1776 build(deps): bump setup-go from v2.1.2 to v2.1.3 (#102)
Bumps [setup-go](https://github.com/actions/setup-go) from v2.1.2 to v2.1.3.
- [Release notes](https://github.com/actions/setup-go/releases)
- [Commits](8a3a76c217...37335c7bb2)

Signed-off-by: dependabot[bot] <support@github.com>
Signed-off-by: Xiang Dai <long0dai@foxmail.com>
Co-authored-by: Xiang Dai <long0dai@foxmail.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2020-10-07 10:33:57 +08:00
2ea701ccbd build(deps-dev): bump eslint-plugin-import from 2.22.0 to 2.22.1 (#94)
Bumps [eslint-plugin-import](https://github.com/benmosher/eslint-plugin-import) from 2.22.0 to 2.22.1.
- [Release notes](https://github.com/benmosher/eslint-plugin-import/releases)
- [Changelog](https://github.com/benmosher/eslint-plugin-import/blob/master/CHANGELOG.md)
- [Commits](https://github.com/benmosher/eslint-plugin-import/compare/v2.22.0...v2.22.1)

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2020-10-03 22:31:52 +10:00
b6429a6771 build(deps-dev): bump eslint-config-prettier from 6.11.0 to 6.12.0 (#95)
Bumps [eslint-config-prettier](https://github.com/prettier/eslint-config-prettier) from 6.11.0 to 6.12.0.
- [Release notes](https://github.com/prettier/eslint-config-prettier/releases)
- [Changelog](https://github.com/prettier/eslint-config-prettier/blob/master/CHANGELOG.md)
- [Commits](https://github.com/prettier/eslint-config-prettier/compare/v6.11.0...v6.12.0)

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2020-10-03 21:31:21 +10:00
7ba2fe0d4d build(deps-dev): bump @types/node from 14.11.1 to 14.11.2 (#97)
Bumps [@types/node](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/node) from 14.11.1 to 14.11.2.
- [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases)
- [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/node)

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2020-10-03 21:31:13 +10:00
b248ff60d3 build(deps-dev): bump prettier from 2.1.1 to 2.1.2 (#92)
Bumps [prettier](https://github.com/prettier/prettier) from 2.1.1 to 2.1.2.
- [Release notes](https://github.com/prettier/prettier/releases)
- [Changelog](https://github.com/prettier/prettier/blob/master/CHANGELOG.md)
- [Commits](https://github.com/prettier/prettier/compare/2.1.1...2.1.2)

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2020-10-03 21:30:49 +10:00
0f7d62b0dc build(deps): bump @actions/core from 1.2.5 to 1.2.6 (#96)
Bumps [@actions/core](https://github.com/actions/toolkit/tree/HEAD/packages/core) from 1.2.5 to 1.2.6.
- [Release notes](https://github.com/actions/toolkit/releases)
- [Changelog](https://github.com/actions/toolkit/blob/main/packages/core/RELEASES.md)
- [Commits](https://github.com/actions/toolkit/commits/HEAD/packages/core)

Signed-off-by: dependabot[bot] <support@github.com>
Signed-off-by: Xiang Dai <long0dai@foxmail.com>
Co-authored-by: Xiang Dai <long0dai@foxmail.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2020-09-28 14:47:34 +08:00
f16cd8cd00 build(deps-dev): bump typescript from 4.0.2 to 4.0.3 (#90)
Bumps [typescript](https://github.com/Microsoft/TypeScript) from 4.0.2 to 4.0.3.
- [Release notes](https://github.com/Microsoft/TypeScript/releases)
- [Commits](https://github.com/Microsoft/TypeScript/compare/v4.0.2...v4.0.3)

Signed-off-by: dependabot[bot] <support@github.com>
Signed-off-by: Xiang Dai <long0dai@foxmail.com>
Co-authored-by: Xiang Dai <long0dai@foxmail.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2020-09-21 15:01:01 +08:00
f745d2bb6b build(deps): bump @types/semver from 7.3.3 to 7.3.4 (#91)
Bumps [@types/semver](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/semver) from 7.3.3 to 7.3.4.
- [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases)
- [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/semver)

Signed-off-by: dependabot[bot] <support@github.com>
Signed-off-by: Xiang Dai <long0dai@foxmail.com>
Co-authored-by: Xiang Dai <long0dai@foxmail.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2020-09-21 14:42:02 +08:00
9bf04a21dc build(deps-dev): bump @types/node from 14.10.1 to 14.11.1 (#93)
Bumps [@types/node](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/node) from 14.10.1 to 14.11.1.
- [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases)
- [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/node)

Signed-off-by: dependabot[bot] <support@github.com>
Signed-off-by: Xiang Dai <long0dai@foxmail.com>
Co-authored-by: Xiang Dai <long0dai@foxmail.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2020-09-21 14:41:50 +08:00
273fa7ab10 build(deps-dev): bump @types/node from 14.6.4 to 14.10.1 (#89)
Bumps [@types/node](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/node) from 14.6.4 to 14.10.1.
- [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases)
- [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/node)

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2020-09-14 17:34:17 +10:00
18087a51d1 build(deps): bump node-fetch from 2.6.0 to 2.6.1 (#88)
Bumps [node-fetch](https://github.com/bitinn/node-fetch) from 2.6.0 to 2.6.1.
- [Release notes](https://github.com/bitinn/node-fetch/releases)
- [Changelog](https://github.com/node-fetch/node-fetch/blob/master/docs/CHANGELOG.md)
- [Commits](https://github.com/bitinn/node-fetch/compare/v2.6.0...v2.6.1)

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2020-09-13 08:00:06 +10:00
37037d32f2 Add instructions for multi-os linting (#86)
* Add instructions for multi-os linting

Added a matrix to show how to do multi-os lint builds.  This is specifically needed if you have files like `_darwin.go` or `_windows.go`, etc.  If you don't lint on that specific OS, then those files will NOT be linted.

I also added a note about `.gitattributes` needing to have the line endings correctly checked out, otherwise linting will fail for formatting as well.
2020-09-08 14:51:55 -05:00
9d250b4a7c build(deps-dev): bump @types/node from 14.6.2 to 14.6.4 (#85)
Bumps [@types/node](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/node) from 14.6.2 to 14.6.4.
- [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases)
- [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/node)

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2020-09-07 08:17:26 +02:00
e820a262b2 build(deps-dev): bump prettier from 2.0.5 to 2.1.1 (#79)
Bumps [prettier](https://github.com/prettier/prettier) from 2.0.5 to 2.1.1.
- [Release notes](https://github.com/prettier/prettier/releases)
- [Changelog](https://github.com/prettier/prettier/blob/master/CHANGELOG.md)
- [Commits](https://github.com/prettier/prettier/compare/2.0.5...2.1.1)

Signed-off-by: dependabot[bot] <support@github.com>
Signed-off-by: Xiang Dai <long0dai@foxmail.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2020-08-31 14:58:44 +08:00
3b7ba9cb59 build(deps): bump @actions/core from 1.2.4 to 1.2.5 (#78)
Bumps [@actions/core](https://github.com/actions/toolkit/tree/HEAD/packages/core) from 1.2.4 to 1.2.5.
- [Release notes](https://github.com/actions/toolkit/releases)
- [Changelog](https://github.com/actions/toolkit/blob/main/packages/core/RELEASES.md)
- [Commits](https://github.com/actions/toolkit/commits/HEAD/packages/core)

Signed-off-by: dependabot[bot] <support@github.com>
Signed-off-by: Xiang Dai <long0dai@foxmail.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2020-08-31 14:58:33 +08:00
2efd4a3be8 build(deps-dev): bump @types/node from 14.6.0 to 14.6.2 (#80)
Bumps [@types/node](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/node) from 14.6.0 to 14.6.2.
- [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases)
- [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/node)

Signed-off-by: dependabot[bot] <support@github.com>
Signed-off-by: Xiang Dai <long0dai@foxmail.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2020-08-31 14:58:15 +08:00
0098fd17c9 build(deps-dev): bump typescript from 3.9.7 to 4.0.2 (#77)
Bumps [typescript](https://github.com/Microsoft/TypeScript) from 3.9.7 to 4.0.2.
- [Release notes](https://github.com/Microsoft/TypeScript/releases)
- [Commits](https://github.com/Microsoft/TypeScript/compare/v3.9.7...v4.0.2)

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2020-08-24 13:11:36 -05:00
863caeb194 build(deps-dev): bump @types/node from 14.0.27 to 14.6.0 (#76)
Bumps [@types/node](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/node) from 14.0.27 to 14.6.0.
- [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases)
- [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/node)

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2020-08-24 13:11:27 -05:00
1d3f25bff9 build(deps): bump @types/semver from 7.3.2 to 7.3.3 (#72)
Bumps [@types/semver](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/semver) from 7.3.2 to 7.3.3.
- [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases)
- [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/semver)

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2020-08-17 16:36:34 -05:00
62252c6349 build(deps): bump @types/semver from 7.3.1 to 7.3.2 (#69)
Bumps [@types/semver](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/semver) from 7.3.1 to 7.3.2.
- [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases)
- [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/semver)

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2020-08-17 16:34:03 -05:00
9535745fa5 build(deps-dev): bump @types/uuid from 8.0.1 to 8.3.0 (#70)
Bumps [@types/uuid](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/uuid) from 8.0.1 to 8.3.0.
- [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases)
- [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/uuid)

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2020-08-17 16:33:49 -05:00
dc87c27dac build(deps): bump setup-go from v2.1.1 to v2.1.2 (#71)
Bumps [setup-go](https://github.com/actions/setup-go) from v2.1.1 to v2.1.2.
- [Release notes](https://github.com/actions/setup-go/releases)
- [Commits](d0c5defdf3...8a3a76c217)

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2020-08-17 16:33:30 -05:00
87260465c1 Update dist after dependabot PRs (#68) 2020-08-10 07:04:21 -05:00
014f5e25d2 build(deps-dev): bump @types/uuid from 8.0.0 to 8.0.1 (#67)
Bumps [@types/uuid](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/uuid) from 8.0.0 to 8.0.1.
- [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases)
- [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/uuid)

Signed-off-by: Xiang Dai <long0dai@foxmail.com>
Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2020-08-10 14:43:07 +08:00
a520c23e6f build(deps): bump @actions/cache from 1.0.1 to 1.0.2 (#66)
Bumps [@actions/cache](https://github.com/actions/toolkit/tree/HEAD/packages/cache) from 1.0.1 to 1.0.2.
- [Release notes](https://github.com/actions/toolkit/releases)
- [Changelog](https://github.com/actions/toolkit/blob/main/packages/cache/RELEASES.md)
- [Commits](https://github.com/actions/toolkit/commits/HEAD/packages/cache)

Signed-off-by: dependabot[bot] <support@github.com>
Signed-off-by: Xiang Dai <long0dai@foxmail.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2020-08-10 14:41:59 +08:00
6317259e28 Run action on different platforms (#65) 2020-08-03 17:35:08 +03:00
809d3b078b Support latest tag for golangci-lint version (#64) 2020-08-02 11:04:32 -05:00
b026646c83 build(deps): bump @actions/github from 2.1.1 to 4.0.0 (#45)
* build(deps): bump @actions/github from 2.1.1 to 4.0.0

Bumps [@actions/github](https://github.com/actions/toolkit/tree/HEAD/packages/github) from 2.1.1 to 4.0.0.
- [Release notes](https://github.com/actions/toolkit/releases)
- [Changelog](https://github.com/actions/toolkit/blob/master/packages/github/RELEASES.md)
- [Commits](https://github.com/actions/toolkit/commits/HEAD/packages/github)

Signed-off-by: dependabot[bot] <support@github.com>

* Fix usage of github action

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Sergey Vilgelm <sergey.vilgelm@ibm.com>
2020-08-02 06:08:36 -05:00
c598686db1 Update dist after the dependabot PRs (#62) 2020-08-01 09:09:28 -05:00
25d72af787 build(deps): bump @actions/tool-cache from 1.5.5 to 1.6.0 (#61)
Bumps [@actions/tool-cache](https://github.com/actions/toolkit/tree/HEAD/packages/tool-cache) from 1.5.5 to 1.6.0.
- [Release notes](https://github.com/actions/toolkit/releases)
- [Changelog](https://github.com/actions/toolkit/blob/main/packages/tool-cache/RELEASES.md)
- [Commits](https://github.com/actions/toolkit/commits/HEAD/packages/tool-cache)

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2020-07-27 06:17:57 -05:00
79f232513c build(deps-dev): bump @types/node from 14.0.23 to 14.0.26 (#60)
Bumps [@types/node](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/node) from 14.0.23 to 14.0.26.
- [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases)
- [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/node)

Signed-off-by: dependabot[bot] <support@github.com>
Signed-off-by: Xiang Dai <long0dai@foxmail.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2020-07-27 15:09:32 +08:00
f7f5eff206 build(deps): bump @actions/cache from 0.2.1 to 1.0.1 (#59)
Bumps [@actions/cache](https://github.com/actions/toolkit/tree/HEAD/packages/cache) from 0.2.1 to 1.0.1.
- [Release notes](https://github.com/actions/toolkit/releases)
- [Changelog](https://github.com/actions/toolkit/blob/main/packages/cache/RELEASES.md)
- [Commits](https://github.com/actions/toolkit/commits/@actions/io@1.0.1/packages/cache)

Signed-off-by: dependabot[bot] <support@github.com>
Signed-off-by: Xiang Dai <long0dai@foxmail.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2020-07-27 15:08:57 +08:00
485c6a047e build(deps-dev): bump typescript from 3.9.6 to 3.9.7 (#57)
Bumps [typescript](https://github.com/Microsoft/TypeScript) from 3.9.6 to 3.9.7.
- [Release notes](https://github.com/Microsoft/TypeScript/releases)
- [Commits](https://github.com/Microsoft/TypeScript/compare/v3.9.6...v3.9.7)

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2020-07-27 15:08:12 +08:00
e2ff3f296a build(deps): bump setup-go from v2.1.0 to v2.1.1 (#58)
Bumps [setup-go](https://github.com/actions/setup-go) from v2.1.0 to v2.1.1.
- [Release notes](https://github.com/actions/setup-go/releases)
- [Commits](1616116e1b...d0c5defdf3)

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2020-07-27 15:08:03 +08:00
294f27a519 Update README and test action to use v1.29 (#56) 2020-07-23 11:01:52 +08:00
c238b72278 Prepare v2.0.0 (#40) 2020-07-15 12:18:02 -05:00
ba40dc6b1d Run the build after dependabot PRs (#54) 2020-07-15 09:15:21 +10:00
65dc624d8b build(deps-dev): bump prettier from 1.19.1 to 2.0.5 (#52)
* build(deps-dev): bump prettier from 1.19.1 to 2.0.5

Bumps [prettier](https://github.com/prettier/prettier) from 1.19.1 to 2.0.5.
- [Release notes](https://github.com/prettier/prettier/releases)
- [Changelog](https://github.com/prettier/prettier/blob/master/CHANGELOG.md)
- [Commits](https://github.com/prettier/prettier/compare/1.19.1...2.0.5)

Signed-off-by: dependabot[bot] <support@github.com>

* Fix prettier

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Sergey Vilgelm <sergey.vilgelm@ibm.com>
2020-07-14 09:25:11 -05:00
466abb7dfd build(deps-dev): bump @typescript-eslint/parser from 2.30.0 to 2.34.0 (#53)
Bumps [@typescript-eslint/parser](https://github.com/typescript-eslint/typescript-eslint/tree/HEAD/packages/parser) from 2.30.0 to 2.34.0.
- [Release notes](https://github.com/typescript-eslint/typescript-eslint/releases)
- [Changelog](https://github.com/typescript-eslint/typescript-eslint/blob/master/packages/parser/CHANGELOG.md)
- [Commits](https://github.com/typescript-eslint/typescript-eslint/commits/v2.34.0/packages/parser)

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2020-07-14 09:10:40 -05:00
5c7c749f16 build(deps-dev): bump typescript from 3.8.3 to 3.9.6 (#51)
Bumps [typescript](https://github.com/Microsoft/TypeScript) from 3.8.3 to 3.9.6.
- [Release notes](https://github.com/Microsoft/TypeScript/releases)
- [Commits](https://github.com/Microsoft/TypeScript/compare/v3.8.3...v3.9.6)

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2020-07-14 09:05:15 -05:00
2f458de87f build(deps-dev): bump @types/node from 12.12.37 to 14.0.23 (#47)
Bumps [@types/node](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/node) from 12.12.37 to 14.0.23.
- [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases)
- [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/node)

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2020-07-14 09:00:15 -05:00
94d029dd63 build(deps): bump @types/semver from 7.1.0 to 7.3.1 (#48)
Bumps [@types/semver](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/semver) from 7.1.0 to 7.3.1.
- [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases)
- [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/semver)

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2020-07-14 08:57:44 -05:00
a5502f9224 build(deps-dev): bump eslint-plugin-import from 2.20.2 to 2.22.0 (#49)
Bumps [eslint-plugin-import](https://github.com/benmosher/eslint-plugin-import) from 2.20.2 to 2.22.0.
- [Release notes](https://github.com/benmosher/eslint-plugin-import/releases)
- [Changelog](https://github.com/benmosher/eslint-plugin-import/blob/master/CHANGELOG.md)
- [Commits](https://github.com/benmosher/eslint-plugin-import/compare/v2.20.2...v2.22.0)

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2020-07-14 08:55:26 -05:00
fa6ef09daf build(deps-dev): bump @types/uuid from 3.4.9 to 8.0.0 (#50)
Bumps [@types/uuid](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/uuid) from 3.4.9 to 8.0.0.
- [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases)
- [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/uuid)

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2020-07-14 08:51:27 -05:00
2effa0b58a build(deps-dev): bump @typescript-eslint/eslint-plugin (#44)
Bumps [@typescript-eslint/eslint-plugin](https://github.com/typescript-eslint/typescript-eslint/tree/HEAD/packages/eslint-plugin) from 2.30.0 to 2.34.0.
- [Release notes](https://github.com/typescript-eslint/typescript-eslint/releases)
- [Changelog](https://github.com/typescript-eslint/typescript-eslint/blob/master/packages/eslint-plugin/CHANGELOG.md)
- [Commits](https://github.com/typescript-eslint/typescript-eslint/commits/v2.34.0/packages/eslint-plugin)

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2020-07-14 08:43:50 -05:00
3b01eb9dce build(deps-dev): bump eslint-plugin-prettier from 3.1.3 to 3.1.4 (#43)
Bumps [eslint-plugin-prettier](https://github.com/prettier/eslint-plugin-prettier) from 3.1.3 to 3.1.4.
- [Release notes](https://github.com/prettier/eslint-plugin-prettier/releases)
- [Changelog](https://github.com/prettier/eslint-plugin-prettier/blob/master/CHANGELOG.md)
- [Commits](https://github.com/prettier/eslint-plugin-prettier/compare/v3.1.3...v3.1.4)

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2020-07-14 08:40:43 -05:00
0d019f3dae build(deps-dev): bump @zeit/ncc from 0.20.5 to 0.22.3 (#42)
Bumps [@zeit/ncc](https://github.com/zeit/ncc) from 0.20.5 to 0.22.3.
- [Release notes](https://github.com/zeit/ncc/releases)
- [Commits](https://github.com/zeit/ncc/compare/0.20.5...0.22.3)

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2020-07-14 08:36:34 -05:00
48e7180822 build(deps): bump @actions/tool-cache from 1.3.4 to 1.5.5 (#46)
Bumps [@actions/tool-cache](https://github.com/actions/toolkit/tree/HEAD/packages/tool-cache) from 1.3.4 to 1.5.5.
- [Release notes](https://github.com/actions/toolkit/releases)
- [Changelog](https://github.com/actions/toolkit/blob/master/packages/tool-cache/RELEASES.md)
- [Commits](https://github.com/actions/toolkit/commits/HEAD/packages/tool-cache)

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2020-07-14 08:30:27 -05:00
8577a0ee23 Enable dependabot (#41) 2020-07-14 08:26:47 -05:00
cf72500b28 Add path prefix if working director specified (#34) 2020-07-10 19:20:33 +00:00
d737e6d962 Fix misleading version input description (#33)
* Fix misleading version input description

Signed-off-by: Tam Mach <sayboras@yahoo.com>

* Run npm run all

* Update dep to fix CI

* Update dep to fix CI

* Bump to 1.28

* Locked down setup-go version
2020-07-06 06:17:53 +02:00
8870cfbcd4 remove output setting (#22)
Relates: #21
2020-05-23 12:34:30 +03:00
3395f777a4 Replace forked cache by official npm (#21)
* Replace forked cache by official npm

* Follow the same validation as @action/cache

* Remove debug log
2020-05-23 12:25:16 +03:00
16 changed files with 112091 additions and 47948 deletions

View File

@ -1,7 +1,13 @@
{
"env": { "node": true, "jest": true },
"env": {
"node": true,
"jest": true
},
"parser": "@typescript-eslint/parser",
"parserOptions": { "ecmaVersion": 2020, "sourceType": "module" },
"parserOptions": {
"ecmaVersion": 2020,
"sourceType": "module"
},
"extends": [
"eslint:recommended",
"plugin:@typescript-eslint/eslint-recommended",
@ -12,12 +18,16 @@
"plugin:prettier/recommended",
"prettier/@typescript-eslint"
],
"plugins": ["@typescript-eslint", "simple-import-sort"],
"plugins": [
"@typescript-eslint",
"simple-import-sort"
],
"rules": {
"import/first": "error",
"import/newline-after-import": "error",
"import/no-duplicates": "error",
"simple-import-sort/sort": "error",
"simple-import-sort/imports": "error",
"simple-import-sort/exports": "error",
"sort-imports": "off"
}
}
}

14
.github/dependabot.yml vendored Normal file
View File

@ -0,0 +1,14 @@
version: 2
updates:
- package-ecosystem: github-actions
directory: "/"
schedule:
interval: weekly
reviewers:
- "golangci/team"
- package-ecosystem: npm
directory: "/"
schedule:
interval: weekly
reviewers:
- "golangci/team"

44
.github/workflows/codeql.yaml vendored Normal file
View File

@ -0,0 +1,44 @@
name: "Code Scanning - Action"
on:
push:
branches: [ master ]
pull_request:
# The branches below must be a subset of the branches above
branches: [ master ]
schedule:
- cron: '0 17 * * 5'
jobs:
codeQL:
# CodeQL runs on ubuntu-latest, windows-latest, and macos-latest
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v2
with:
# Must fetch at least the immediate parents so that if this is
# a pull request then we can checkout the head of the pull request.
# Only include this option if you are running this workflow on pull requests.
fetch-depth: 2
# If this run was triggered by a pull request event then checkout
# the head of the pull request instead of the merge commit.
# Only include this step if you are running this workflow on pull requests.
- run: git checkout HEAD^2
if: ${{ github.event_name == 'pull_request' }}
# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
uses: github/codeql-action/init@v1
# Override language selection by uncommenting this and choosing your languages
with:
language: 'javascript'
- run: |
npm install
npm run all
- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v1

View File

@ -4,23 +4,45 @@ on: # rebuild any PRs and main branch changes
push:
branches:
- master
- 'releases/*'
- "releases/*"
jobs:
build: # make sure build/ci work properly
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- run: |
npm install
npm run prepare-deps
npm run all
- uses: actions/checkout@v2
- run: |
npm install
npm run all
test: # make sure the action works on a clean machine without building
runs-on: ubuntu-latest
strategy:
matrix:
os:
- ubuntu-latest
- macos-latest
- windows-latest
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v1
- uses: ./
with:
version: v1.26
args: --issues-exit-code=0 ./sample/...
only-new-issues: true
- uses: actions/checkout@v2
- uses: ./
with:
version: latest
args: --issues-exit-code=0 ./sample/...
only-new-issues: true
# Test with full version vX.Y.Z
test-full-version:
strategy:
matrix:
os:
- ubuntu-latest
- macos-latest
- windows-latest
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v2
- uses: ./
with:
version: v1.28.3
args: --issues-exit-code=0 ./sample/...
only-new-issues: true

View File

@ -2,11 +2,17 @@
[![Build Status](https://github.com/golangci/golangci-lint-action/workflows/build-and-test/badge.svg)](https://github.com/golangci/golangci-lint-action/actions)
It's the official GitHub action for [golangci-lint](https://github.com/golangci/golangci-lint) from it's authors.
It's the official GitHub action for [golangci-lint](https://github.com/golangci/golangci-lint) from its authors.
The action runs [golangci-lint](https://github.com/golangci/golangci-lint) and reports issues from linters.
![GitHub Annotations](./static/annotations.png)
## Compatibility
* `v2.0.0+` works with `golangci-lint` version >= `v1.28.3`
* `v1.2.2` is deprecated due to we forgot to change the minimum version of `golangci-lint` to `v1.28.3` ([issue](https://github.com/golangci/golangci-lint-action/issues/39))
* `v1.2.1` works with `golangci-lint` version >= `v1.14.0` ([issue](https://github.com/golangci/golangci-lint-action/issues/39))
## How to use
Add `.github/workflows/golangci-lint.yml` with the following contents:
@ -19,6 +25,7 @@ on:
- v*
branches:
- master
- main
pull_request:
jobs:
golangci:
@ -27,11 +34,62 @@ jobs:
steps:
- uses: actions/checkout@v2
- name: golangci-lint
uses: golangci/golangci-lint-action@v1
uses: golangci/golangci-lint-action@v2
with:
# Required: the version of golangci-lint is required and must be specified without patch version: we always use the latest patch version.
version: v1.26
version: v1.29
# Optional: working directory, useful for monorepos
# working-directory: somedir
# Optional: golangci-lint command line arguments.
# args: --issues-exit-code=0
# Optional: show only new issues if it's a pull request. The default value is `false`.
# only-new-issues: true
# Optional: if set to true then the action will use pre-installed Go.
# skip-go-installation: true
# Optional: if set to true then the action don't cache or restore ~/go/pkg.
# skip-pkg-cache: true
# Optional: if set to true then the action don't cache or restore ~/.cache/go-build.
# skip-build-cache: true
```
We recommend running this action in a job separate from other jobs (`go test`, etc)
because different jobs [run in parallel](https://help.github.com/en/actions/getting-started-with-github-actions/core-concepts-for-github-actions#job).
### Multiple OS Support
If you need to run linters for specific operating systems, you will need to use `v2` of the action. Here is a sample configuration file:
```yaml
name: golangci-lint
on:
push:
tags:
- v*
branches:
- master
- main
pull_request:
jobs:
golangci:
strategy:
matrix:
go-version: [1.15.x]
os: [macos-latest, windows-latest]
name: lint
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v2
- name: golangci-lint
uses: golangci/golangci-lint-action@v2
with:
# Required: the version of golangci-lint is required and must be specified without patch version: we always use the latest patch version.
version: v1.29
# Optional: working directory, useful for monorepos
# working-directory: somedir
@ -42,8 +100,11 @@ jobs:
# only-new-issues: true
```
We recommend running this action in a job separate from other jobs (`go test`, etc)
because different jobs [run in parallel](https://help.github.com/en/actions/getting-started-with-github-actions/core-concepts-for-github-actions#job).
You will also likely need to add the following `.gitattributes` file to ensure that line endings for windows builds are properly formatted:
```.gitattributes
*.go text eol=lf
```
## Comments and Annotations
@ -58,7 +119,7 @@ The restrictions of annotations are the following:
The action was implemented with performance in mind:
1. We cache data by [@actions/cache](https://github.com/actions/cache) between builds: Go build cache, Go modules cache, golangci-lint analysis cache.
1. We cache data by [@actions/cache](https://github.com/actions/toolkit/tree/master/packages/cache) between builds: Go build cache, Go modules cache, golangci-lint analysis cache.
2. We don't use Docker because image pulling is slow.
3. We do as much as we can in parallel, e.g. we download cache, go and golangci-lint binary in parallel.
@ -74,7 +135,9 @@ For example, in a repository of [golangci-lint](https://github.com/golangci/gola
We use JavaScript-based action. We don't use Docker-based action because:
1. docker pulling is slow currently
2. it's easier to use caching from [@actions/cache](https://github.com/actions/cache) until GitHub team hasn't supported reusing actions from actions
2. it's easier to use caching from [@actions/cache](https://github.com/actions/toolkit/tree/master/packages/cache)
We support different platforms, such as `ubuntu`, `macos` and `windows` with `x32` and `x64` archs.
Inside our action we perform 3 steps:
@ -89,7 +152,7 @@ Inside our action we perform 3 steps:
### Caching internals
1. We save and restore the following directories: `~/.cache/golangci-lint`, `~/.cache/go-build`, `~/go/pkg`.
2. The primary caching key looks like `golangci-lint.cache-{interval_number}-{go.mod_hash}`. Interval number ensures that we periodically invalidate
2. The primary caching key looks like `golangci-lint.cache-{platform-arch}-{interval_number}-{go.mod_hash}`. Interval number ensures that we periodically invalidate
our cache (every 7 days). `go.mod` hash ensures that we invalidate the cache early - as soon as dependencies have changed.
3. We use [restore keys](https://help.github.com/en/actions/configuring-and-managing-workflows/caching-dependencies-to-speed-up-workflows#matching-a-cache-key): `golangci-lint.cache-{interval_number}-`, `golangci-lint.cache-`. GitHub matches keys by prefix if we have no exact match for the primary cache.

View File

@ -1,31 +1,41 @@
---
name: 'Run golangci-lint'
description: 'Official golangci-lint action with line-attached annotations for found issues, caching and parallel execution.'
author: 'golangci'
name: "Run golangci-lint"
description: "Official golangci-lint action with line-attached annotations for found issues, caching and parallel execution."
author: "golangci"
inputs:
version:
description: 'version of golangci-lint to use in form of v1.2.3'
required: true
description: "version of golangci-lint to use in form of v1.2 or v1.2.3 or `latest` to use the latest version"
required: false
args:
description: 'golangci-lint command line arguments'
default: ''
description: "golangci-lint command line arguments"
default: ""
required: false
working-directory:
description: 'golangci-lint working directory, default is project root'
description: "golangci-lint working directory, default is project root"
required: false
github-token:
description: 'the token is used for fetching patch of a pull request to show only new issues'
description: "the token is used for fetching patch of a pull request to show only new issues"
default: ${{ github.token }}
required: true
only-new-issues:
description: 'if set to true and the action runs on a pull request - the action outputs only newly found issues'
description: "if set to true and the action runs on a pull request - the action outputs only newly found issues"
default: false
required: true
skip-go-installation:
description: "if set to true then action uses pre-installed Go"
default: false
required: true
skip-pkg-cache:
description: "if set to true then the action don't cache or restore ~/go/pkg."
default: false
required: true
skip-build-cache:
description: "if set to true then the action don't cache or restore ~/.cache/go-build."
default: false
required: true
runs:
using: 'node12'
main: 'dist/run/index.js'
post: 'dist/post_run/index.js'
using: "node12"
main: "dist/run/index.js"
post: "dist/post_run/index.js"
branding:
icon: 'shield'
color: 'yellow'
icon: "shield"
color: "yellow"

77716
dist/post_run/index.js vendored

File diff suppressed because one or more lines are too long

77718
dist/run/index.js vendored

File diff suppressed because one or more lines are too long

4025
package-lock.json generated

File diff suppressed because it is too large Load Diff

View File

@ -1,13 +1,12 @@
{
"name": "golanci-lint-action",
"version": "1.1.2",
"version": "2.0.0",
"private": true,
"description": "golangci-lint github action",
"main": "dist/main.js",
"scripts": {
"prepare-setup-go": "cd node_modules/setup-go && npm run build",
"prepare-cache": "cd node_modules/cache && npm run build",
"prepare-deps": "npm run prepare-setup-go && npm run prepare-cache",
"prepare-deps": "npm run prepare-setup-go",
"build": "tsc && ncc build -o dist/run/ src/main.ts && ncc build -o dist/post_run/ src/post_main.ts",
"watched_build_main": "tsc && ncc build -w -o dist/run/ src/main.ts",
"watched_build_post_main": "tsc && ncc build -w -o dist/post_run/ src/post_main.ts",
@ -16,38 +15,39 @@
"lint-fix": "eslint **/*.ts --cache --fix",
"format": "prettier --write **/*.ts",
"format-check": "prettier --check **/*.ts",
"all": "npm run build && npm run format-check && npm run lint",
"local": "npm run build && act -j test -b"
"all": "npm run prepare-deps && npm run build && npm run format-check && npm run lint",
"local": "npm run build && act -j test -b",
"local-full-version": "npm run build && act -j test-full-version -b"
},
"repository": {
"type": "git",
"url": "git+https://github.com/golangci/golangci-lint-action.git"
},
"author": "GitHub",
"author": "golangci",
"license": "MIT",
"dependencies": {
"@actions/core": "^1.2.0",
"@actions/cache": "^1.0.6",
"@actions/core": "^1.2.6",
"@actions/exec": "^1.0.1",
"@actions/github": "^2.1.1",
"@actions/tool-cache": "^1.3.4",
"@types/semver": "^7.1.0",
"@actions/github": "^4.0.0",
"@actions/tool-cache": "^1.6.1",
"@types/semver": "^7.3.4",
"@types/tmp": "^0.2.0",
"cache": "git+https://github.com/golangci/cache.git",
"setup-go": "git+https://github.com/actions/setup-go.git",
"setup-go": "git+https://github.com/actions/setup-go.git#v2.1.3",
"tmp": "^0.2.1"
},
"devDependencies": {
"@types/node": "^12.0.4",
"@types/uuid": "^3.4.5",
"@typescript-eslint/eslint-plugin": "^2.7.0",
"@typescript-eslint/parser": "^2.7.0",
"@zeit/ncc": "^0.20.5",
"@types/node": "^14.14.25",
"@types/uuid": "^8.3.0",
"@typescript-eslint/eslint-plugin": "^2.34.0",
"@typescript-eslint/parser": "^2.34.0",
"@zeit/ncc": "^0.22.3",
"eslint": "^6.6.0",
"eslint-config-prettier": "^6.5.0",
"eslint-plugin-import": "^2.18.2",
"eslint-plugin-prettier": "^3.1.1",
"eslint-plugin-simple-import-sort": "^5.0.2",
"prettier": "^1.19.1",
"typescript": "^3.8.3"
"eslint-config-prettier": "^6.15.0",
"eslint-plugin-import": "^2.22.1",
"eslint-plugin-prettier": "^3.3.1",
"eslint-plugin-simple-import-sort": "^7.0.0",
"prettier": "^2.2.1",
"typescript": "^4.1.3"
}
}

View File

@ -1,26 +1,46 @@
import * as cache from "@actions/cache"
import * as core from "@actions/core"
import restore from "cache/lib/restore"
import save from "cache/lib/save"
import * as crypto from "crypto"
import * as fs from "fs"
import path from "path"
import { Events, State } from "./constants"
import * as utils from "./utils/actionUtils"
function checksumFile(hashName: string, path: string): Promise<string> {
return new Promise((resolve, reject) => {
const hash = crypto.createHash(hashName)
const stream = fs.createReadStream(path)
stream.on("error", err => reject(err))
stream.on("data", chunk => hash.update(chunk))
stream.on("error", (err) => reject(err))
stream.on("data", (chunk) => hash.update(chunk))
stream.on("end", () => resolve(hash.digest("hex")))
})
}
const pathExists = async (path: string): Promise<boolean> => !!(await fs.promises.stat(path).catch(() => false))
const getLintCacheDir = (): string => `${process.env.HOME}/.cache/golangci-lint`
const getLintCacheDir = (): string => {
return path.resolve(`${process.env.HOME}/.cache/golangci-lint`)
}
const getCacheDirs = (): string[] => {
// Not existing dirs are ok here: it works.
return [getLintCacheDir(), `${process.env.HOME}/.cache/go-build`, `${process.env.HOME}/go/pkg`]
const skipPkgCache = core.getInput(`skip-pkg-cache`, { required: true }).trim()
const skipBuildCache = core.getInput(`skip-build-cache`, { required: true }).trim()
const dirs = [getLintCacheDir()]
if (skipBuildCache.toLowerCase() == "true") {
core.info(`Omitting ~/.cache/go-build from cache directories`)
} else {
dirs.push(path.resolve(`${process.env.HOME}/.cache/go-build`))
}
if (skipPkgCache.toLowerCase() == "true") {
core.info(`Omitting ~/go/pkg from cache directories`)
} else {
dirs.push(path.resolve(`${process.env.HOME}/go/pkg`))
}
return dirs
}
const getIntervalKey = (invalidationIntervalDays: number): string => {
@ -52,30 +72,80 @@ async function buildCacheKeys(): Promise<string[]> {
}
export async function restoreCache(): Promise<void> {
if (!utils.isValidEvent()) {
utils.logWarning(
`Event Validation Error: The event type ${process.env[Events.Key]} is not supported because it's not tied to a branch or tag ref.`
)
return
}
const startedAt = Date.now()
const keys = await buildCacheKeys()
const primaryKey = keys.pop()
const restoreKeys = keys.reverse()
core.info(`Primary analysis cache key is '${primaryKey}', restore keys are '${restoreKeys.join(` | `)}'`)
process.env[`INPUT_RESTORE-KEYS`] = restoreKeys.join(`\n`)
process.env.INPUT_KEY = primaryKey
process.env.INPUT_PATH = getCacheDirs().join(`\n`)
// Tell golangci-lint to use our cache directory.
process.env.GOLANGCI_LINT_CACHE = getLintCacheDir()
await restore()
core.info(`Restored cache for golangci-lint from key '${primaryKey}' in ${Date.now() - startedAt}ms`)
if (!primaryKey) {
utils.logWarning(`Invalid primary key`)
return
}
core.saveState(State.CachePrimaryKey, primaryKey)
try {
const cacheKey = await cache.restoreCache(getCacheDirs(), primaryKey, restoreKeys)
if (!cacheKey) {
core.info(`Cache not found for input keys: ${[primaryKey, ...restoreKeys].join(", ")}`)
return
}
// Store the matched cache key
utils.setCacheState(cacheKey)
core.info(`Restored cache for golangci-lint from key '${primaryKey}' in ${Date.now() - startedAt}ms`)
} catch (error) {
if (error.name === cache.ValidationError.name) {
throw error
} else {
core.warning(error.message)
}
}
}
export async function saveCache(): Promise<void> {
// Validate inputs, this can cause task failure
if (!utils.isValidEvent()) {
utils.logWarning(
`Event Validation Error: The event type ${process.env[Events.Key]} is not supported because it's not tied to a branch or tag ref.`
)
return
}
const startedAt = Date.now()
const cacheDirs = getCacheDirs()
process.env.INPUT_PATH = cacheDirs.join(`\n`)
const primaryKey = core.getState(State.CachePrimaryKey)
if (!primaryKey) {
utils.logWarning(`Error retrieving key from state.`)
return
}
await save()
core.info(`Saved cache for golangci-lint from paths '${cacheDirs.join(`, `)}' in ${Date.now() - startedAt}ms`)
const state = utils.getCacheState()
if (utils.isExactKeyMatch(primaryKey, state)) {
core.info(`Cache hit occurred on the primary key ${primaryKey}, not saving cache.`)
return
}
try {
await cache.saveCache(cacheDirs, primaryKey)
core.info(`Saved cache for golangci-lint from paths '${cacheDirs.join(`, `)}' in ${Date.now() - startedAt}ms`)
} catch (error) {
if (error.name === cache.ValidationError.name) {
throw error
} else if (error.name === cache.ReserveCacheError.name) {
core.info(error.message)
} else {
core.info(`[warning] ${error.message}`)
}
}
}

18
src/constants.ts Normal file
View File

@ -0,0 +1,18 @@
export enum Inputs {
Key = "key",
Path = "path",
RestoreKeys = "restore-keys",
}
export enum State {
CachePrimaryKey = "CACHE_KEY",
CacheMatchedKey = "CACHE_RESULT",
}
export enum Events {
Key = "GITHUB_EVENT_NAME",
Push = "push",
PullRequest = "pull_request",
}
export const RefKey = "GITHUB_REF"

View File

@ -1,27 +1,67 @@
import * as core from "@actions/core"
import * as tc from "@actions/tool-cache"
import os from "os"
import path from "path"
import { run as setupGo } from "setup-go/lib/main"
import { VersionConfig } from "./version"
const downloadURL = "https://github.com/golangci/golangci-lint/releases/download"
const getAssetURL = (versionConfig: VersionConfig): string => {
let ext = "tar.gz"
let platform = os.platform().toString()
switch (platform) {
case "win32":
platform = "windows"
ext = "zip"
break
}
let arch = os.arch()
switch (arch) {
case "x64":
arch = "amd64"
break
case "x32":
case "ia32":
arch = "386"
break
}
const noPrefix = versionConfig.TargetVersion.slice(1)
return `${downloadURL}/${versionConfig.TargetVersion}/golangci-lint-${noPrefix}-${platform}-${arch}.${ext}`
}
// The installLint returns path to installed binary of golangci-lint.
export async function installLint(versionConfig: VersionConfig): Promise<string> {
core.info(`Installing golangci-lint ${versionConfig.TargetVersion}...`)
const startedAt = Date.now()
const assetURL = getAssetURL(versionConfig)
core.info(`Downloading ${assetURL} ...`)
const archivePath = await tc.downloadTool(assetURL)
let extractedDir = ""
let repl = /\.tar\.gz$/
if (assetURL.endsWith("zip")) {
extractedDir = await tc.extractZip(archivePath, process.env.HOME)
repl = /\.zip$/
} else {
extractedDir = await tc.extractTar(archivePath, process.env.HOME)
}
core.info(`Downloading ${versionConfig.AssetURL} ...`)
const tarGzPath = await tc.downloadTool(versionConfig.AssetURL)
const extractedDir = await tc.extractTar(tarGzPath, process.env.HOME)
const urlParts = versionConfig.AssetURL.split(`/`)
const dirName = urlParts[urlParts.length - 1].replace(/\.tar\.gz$/, ``)
const urlParts = assetURL.split(`/`)
const dirName = urlParts[urlParts.length - 1].replace(repl, ``)
const lintPath = path.join(extractedDir, dirName, `golangci-lint`)
core.info(`Installed golangci-lint into ${lintPath} in ${Date.now() - startedAt}ms`)
return lintPath
}
export async function installGo(): Promise<void> {
const skipGoInstallation = core.getInput(`skip-go-installation`, { required: true }).trim()
if (skipGoInstallation.toLowerCase() == "true") {
core.info(`Skipping the installation of Go`)
return
}
const startedAt = Date.now()
process.env[`INPUT_GO-VERSION`] = `1`
await setupGo()

View File

@ -38,8 +38,7 @@ async function fetchPatch(): Promise<string> {
core.warning(`No pull request in context`)
return ``
}
const octokit = new github.GitHub(core.getInput(`github-token`, { required: true }))
const octokit = github.getOctokit(core.getInput(`github-token`, { required: true }))
let patch: string
try {
const patchResp = await octokit.pulls.get({
@ -125,9 +124,9 @@ async function runLint(lintPath: string, patchPath: string): Promise<void> {
const userArgNames = new Set<string>()
userArgs
.split(/\s/)
.map(arg => arg.split(`=`)[0])
.filter(arg => arg.startsWith(`-`))
.forEach(arg => {
.map((arg) => arg.split(`=`)[0])
.filter((arg) => arg.startsWith(`-`))
.forEach((arg) => {
userArgNames.add(arg.replace(`-`, ``))
})
@ -157,7 +156,9 @@ async function runLint(lintPath: string, patchPath: string): Promise<void> {
if (!fs.existsSync(workingDirectory) || !fs.lstatSync(workingDirectory).isDirectory()) {
throw new Error(`working-directory (${workingDirectory}) was not a path`)
}
if (!userArgNames.has(`path-prefix`)) {
addedArgs.push(`--path-prefix=${workingDirectory}`)
}
cmdArgs.cwd = path.resolve(workingDirectory)
}
@ -186,6 +187,7 @@ async function runLint(lintPath: string, patchPath: string): Promise<void> {
export async function run(): Promise<void> {
try {
const { lintPath, patchPath } = await core.group(`prepare environment`, prepareEnv)
core.addPath(path.dirname(lintPath))
await core.group(`run golangci-lint`, () => runLint(lintPath, patchPath))
} catch (error) {
core.error(`Failed to run: ${error}, ${error.stack}`)

37
src/utils/actionUtils.ts Normal file
View File

@ -0,0 +1,37 @@
import * as core from "@actions/core"
import { RefKey, State } from "../constants"
export function isExactKeyMatch(key: string, cacheKey?: string): boolean {
return !!(
cacheKey &&
cacheKey.localeCompare(key, undefined, {
sensitivity: "accent",
}) === 0
)
}
export function setCacheState(state: string): void {
core.saveState(State.CacheMatchedKey, state)
}
export function getCacheState(): string | undefined {
const cacheKey = core.getState(State.CacheMatchedKey)
if (cacheKey) {
core.debug(`Cache state/key: ${cacheKey}`)
return cacheKey
}
return undefined
}
export function logWarning(message: string): void {
const warningPrefix = "[warning]"
core.info(`${warningPrefix}${message}`)
}
// Cache token authorized for all events that are tied to a ref
// See GitHub Context https://help.github.com/actions/automating-your-workflow-with-github-actions/contexts-and-expression-syntax-for-github-actions#github-context
export function isValidEvent(): boolean {
return RefKey in process.env && Boolean(process.env[RefKey])
}

View File

@ -6,11 +6,14 @@ export type Version = {
major: number
minor: number
patch: number | null
}
} | null
const versionRe = /^v(\d+)\.(\d+)(?:\.(\d+))?$/
const parseVersion = (s: string): Version => {
if (s == "latest" || s == "") {
return null
}
const match = s.match(versionRe)
if (!match) {
throw new Error(`invalid version string '${s}', expected format v1.2 or v1.2.3`)
@ -23,37 +26,40 @@ const parseVersion = (s: string): Version => {
}
}
export const stringifyVersion = (v: Version): string => `v${v.major}.${v.minor}${v.patch !== null ? `.${v.patch}` : ``}`
export const stringifyVersion = (v: Version): string => {
if (v == null) {
return "latest"
}
return `v${v.major}.${v.minor}${v.patch !== null ? `.${v.patch}` : ``}`
}
const minVersion = {
major: 1,
minor: 14,
patch: 0,
minor: 28,
patch: 3,
}
const isLessVersion = (a: Version, b: Version): boolean => {
if (a == null) {
return true
}
if (b == null) {
return false
}
if (a.major != b.major) {
return a.major < b.major
}
if (a.minor != b.minor) {
return a.minor < b.minor
}
if (a.patch === null || b.patch === null) {
return true
}
return a.patch < b.patch
// Do not compare patch parts because if the min version has a non zero value
// then it returns false, since the patch version of requested is always zero
return a.minor < b.minor
}
const getRequestedLintVersion = (): Version => {
const requestedLintVersion = core.getInput(`version`, { required: true })
const requestedLintVersion = core.getInput(`version`)
const parsedRequestedLintVersion = parseVersion(requestedLintVersion)
if (parsedRequestedLintVersion.patch !== null) {
throw new Error(
`requested golangci-lint version '${requestedLintVersion}' was specified with the patch version, need specify only minor version`
)
if (parsedRequestedLintVersion == null) {
return null
}
if (isLessVersion(parsedRequestedLintVersion, minVersion)) {
throw new Error(
@ -98,11 +104,20 @@ const getConfig = async (): Promise<Config> => {
export async function findLintVersion(): Promise<VersionConfig> {
core.info(`Finding needed golangci-lint version...`)
const startedAt = Date.now()
const reqLintVersion = getRequestedLintVersion()
// if the patched version is passed, just use it
if (reqLintVersion?.major !== null && reqLintVersion?.minor != null && reqLintVersion?.patch !== null) {
return new Promise((resolve) => {
const versionWithoutV = `${reqLintVersion.major}.${reqLintVersion.minor}.${reqLintVersion.patch}`
resolve({
TargetVersion: `v${versionWithoutV}`,
AssetURL: `https://github.com/golangci/golangci-lint/releases/download/v${versionWithoutV}/golangci-lint-${versionWithoutV}-linux-amd64.tar.gz`,
})
})
}
const startedAt = Date.now()
const config = await getConfig()
if (!config.MinorVersionToConfig) {
core.warning(JSON.stringify(config))
throw new Error(`invalid config: no MinorVersionToConfig field`)
@ -118,8 +133,9 @@ export async function findLintVersion(): Promise<VersionConfig> {
}
core.info(
`Requested golangci-lint '${stringifyVersion(reqLintVersion)}', using '${versionConfig.TargetVersion}', calculation took ${Date.now() -
startedAt}ms`
`Requested golangci-lint '${stringifyVersion(reqLintVersion)}', using '${versionConfig.TargetVersion}', calculation took ${
Date.now() - startedAt
}ms`
)
return versionConfig
}