Skip to content

Setup golangci-lint  #33

@Sean-Der

Description

@Sean-Der

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"

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions