Skip to content

Commit 77f8a14

Browse files
committed
Update README.md
1 parent 32f17de commit 77f8a14

File tree

1 file changed

+1
-47
lines changed

1 file changed

+1
-47
lines changed

README.md

+1-47
Original file line numberDiff line numberDiff line change
@@ -2,52 +2,6 @@
22

33
Whitespace is a linter that checks for unnecessary newlines at the start and end of functions, if, for, etc.
44

5-
Example code:
6-
7-
```go
8-
package main
9-
10-
import "fmt"
11-
12-
func main() {
13-
14-
fmt.Println("Hello world")
15-
}
16-
```
17-
18-
Reults in:
19-
20-
```
21-
$ whitespace .
22-
main.go:6:unnecessary newline
23-
```
24-
255
## Installation guide
266

27-
```bash
28-
go get git.ultraware.nl/NiseVoid/whitespace
29-
```
30-
31-
### Gometalinter
32-
33-
You can add whitespace to gometalinter and enable it.
34-
35-
`.gometalinter.json`:
36-
37-
```json
38-
{
39-
"Linters": {
40-
"whitespace": "whitespace:PATH:LINE:MESSAGE"
41-
},
42-
43-
"Enable": [
44-
"whitespace"
45-
]
46-
}
47-
```
48-
49-
commandline:
50-
51-
```bash
52-
gometalinter --linter "whitespace:whitespace:PATH:LINE:MESSAGE" --enable "whitespace"
53-
```
7+
Whitespace is included in [https://github.com/golangci/golangci-lint/](golangci-lint). Install it and enable whitespace.

0 commit comments

Comments
 (0)