inamedparam

package module
v0.1.3 Latest Latest
Warning

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

Go to latest
Published: Dec 17, 2023 License: MIT Imports: 5 Imported by: 2

README

inamedparam

A linter that reports interfaces with unnamed method parameters.

Flags/Config

-skip-single-param
    skip interfaces with a single unnamed parameter

Usage

Standalone

You can run it standalone through go vet.

You must install the binary to your $GOBIN folder like so:

$ go install github.com/macabu/inamedparam/cmd/inamedparam

And then navigate to your Go project's root folder, where can run go vet in the following way:

$ go vet -vettool=$(which inamedparam) ./...
golangci-lint

inamedparam was added as a linter to golangci-lint on version v1.55.0. It is disabled by default.

To enable it, you can add it to your .golangci.yml file, as such:

run:
  deadline: 30s 

linters:
  disable-all: true
  enable:
    - inamedparam

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Analyzer = &analysis.Analyzer{
	Name:  analyzerName,
	Doc:   "reports interfaces with unnamed method parameters",
	Run:   run,
	Flags: flags(),
	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