manioctypechecker

package module
v0.0.0-...-9e1ef3f Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 16, 2022 License: MIT Imports: 8 Imported by: 0

README

manioctypechecker

A static type checker for manioc.

Screenshot

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

Setup

With go vet
  1. Build a vettool binary.:
    $ cd /usr/local/src
    $ git clone --depth=1 https://github.com/fuzmish/manioc
    $ cd manioc/linter/manioctypechecker
    $ make build-vettool
    $ ls bin
    manioctypechecker
    
  2. Move to your project, then run:
    $ go vet -vettool=/usr/local/src/manioc/linter/manioctypechecker/bin/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 to the environment variable GOLANGCI_LINT_TARGET_VERSION if needed:
    $ cd /usr/local/src
    $ git clone --depth=1 https://github.com/fuzmish/manioc
    $ cd manioc/linter/manioctypechecker
    $ GOLANGCI_LINT_TARGET_VERSION=v1.46.2 make build-golangci-plugin
    $ 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/manioc/linter/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

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Analyzer = &analysis.Analyzer{
	Name: "manioctypechecker",
	Doc:  doc,
	Run:  run,
	Requires: []*analysis.Analyzer{
		inspect.Analyzer,
	},
}

Functions

This section is empty.

Types

This section is empty.

Directories

Path Synopsis
cmd

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL