Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Setup golangci-lint #33

Open
Sean-Der opened this issue Jan 1, 2021 · 0 comments
Open

Setup golangci-lint #33

Sean-Der opened this issue Jan 1, 2021 · 0 comments

Comments

@Sean-Der
Copy link
Collaborator

Sean-Der commented Jan 1, 2021

We can use the Github Action and inserts the errors right into the UI.

      - name: golangci-lint
        uses: golangci/golangci-lint-action@v2
        with:
          version: v1.31

Currently it can't be run because the code base has a mix of WASM/non-wasm code. I think we just need exclude the js code with build tags?

sean@SeanLaptop:~/go/src/github.com/maxmcd/webtty$ golangci-lint run
WARN [runner] Can't run linter goanalysis_metalinter: S1031: failed prerequisites: [(inspect@github.com/maxmcd/webtty/web-client/src, isgenerated@github.com/maxmcd/webtty/web-client/src): analysis skipped: errors in package: [/home/sean/go/src/github.com/maxmcd/webtty/web-client/src/main.go:4:2: could not import syscall/js (-: build constraints exclude all Go files in /opt/go/src/syscall/js)]]
WARN [runner] Can't run linter unused: buildir: failed to load package : could not load export data: no export data for "syscall/js"
ERRO Running error: buildir: failed to load package : could not load export data: no export data for "syscall/js"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant