diff options
author | Dan Kegel <[email protected]> | 2024-04-12 12:19:48 -0700 |
---|---|---|
committer | Ron Evans <[email protected]> | 2024-04-13 18:57:31 +0200 |
commit | 9d6e30701b98f856125e55ba3fd26fa6b8f4a280 (patch) | |
tree | 08724edc79b66fff5fe0a40ee181e90fcccd0b1c /.github | |
parent | 85b59e66da5b1741e8625655c49fcd85de379f4e (diff) | |
download | tinygo-9d6e30701b98f856125e55ba3fd26fa6b8f4a280.tar.gz tinygo-9d6e30701b98f856125e55ba3fd26fa6b8f4a280.zip |
lint: add "make lint" target, run it from ci
See https://github.com/tinygo-org/tinygo/issues/4225
Runs in both circleci and github, circleci is run on branch push, github is run on PR
Revive builds so fast, don't bother installing it; saves us wondering which one we get
Uses tools.go idiom to give control over linter versions to go.mod.
Also pacifies linter re AppendToGlobal as a token first fix.
TODO: gradually expand the number of directories that are linted,
uncomment more entries in revive.toml, and fix or suppress the
warnings lint finds.
TODO: add linters "go vet" and staticcheck
NOT TODO: don't add metalinters like golangci-lint that pull in
lots of new of dependencies; we'd rather not clutter go.mod that
much, let alone open ourselves up to the additional attack surface.
Diffstat (limited to '.github')
-rw-r--r-- | .github/workflows/linux.yml | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/.github/workflows/linux.yml b/.github/workflows/linux.yml index 978e5a123..9d9a779a9 100644 --- a/.github/workflows/linux.yml +++ b/.github/workflows/linux.yml @@ -113,6 +113,8 @@ jobs: gem install --version 4.0.7 public_suffix gem install --version 2.7.6 dotenv gem install --no-document fpm + - name: Run linter + run: make lint - name: Build TinyGo release run: | make release deb -j3 STATIC=1 |