aboutsummaryrefslogtreecommitdiffstats
path: root/vendor/github.com/macabu/inamedparam/README.md
blob: 3336cb9504da429f2f11263d24225ced6f2415a1 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
# inamedparam

A linter that reports interfaces with unnamed method parameters.

## Flags/Config
```sh
-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:
```sh
$ 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:
```sh
$ 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:
```yaml
run:
  deadline: 30s 

linters:
  disable-all: true
  enable:
    - inamedparam
```