manioctypechecker

A static type checker for manioc. For more details, see manioc README.

Screenshot

You can integrate this linter into VSCode using golangci-lint and Go Extension: screenshot.png

Setup

With go vet

  1. Install:
    $ go install github.com/fuzmish/manioctypechecker/cmd/[email protected]
  2. Move to your project, then run:
    $ go vet -vettool=$(which manioctypechecker) ./...

With golangci-lint

  1. Make sure your golangci-lint has been installed from source. Verify its version:

    $ golangci-lint --version
    golangci-lint has version v1.46.2 built from (unknown, mod sum: "...") on (unknown)
  2. Build a plugin binary. Set the version of golangci-lint via GOLANGCI_LINT_TARGET_VERSION:

    $ cd /usr/local/src
    $ git clone https://github.com/fuzmish/manioctypechecker
    $ cd manioctypechecker
    $ make build-golangci-plugin -e GOLANGCI_LINT_TARGET_VERSION=v1.46.2
    $ ls bin
    manioctypechecker.so
  3. Move to your project, then configure your .golangci.yml:

    linters-settings:
      custom:
        manioctypechecker:
          # the path to the plugin binary
          path: /usr/local/src/manioctypechecker/bin/manioctypechecker.so
          description: A static type checker for github.com/fuzmish/manioc
          original-url: github.com/fuzmish/manioctypechecker
    linters:
      enable:
        # then enable it
        - manioctypechecker
  4. Run:
    $ golangci-lint run --disable-all -E govet,manioctypechecker

References

GitHub

View Github