@@ -28,11 +28,6 @@ go install github.com/bombsimon/wsl/v4/cmd/wsl@master
28
28
29
29
## Usage
30
30
31
- > ** Note** : This linter provides a fixer that can fix most issues with the
32
- > ` --fix ` flag. However, currently ` golangci-lint ` [ does not support suggested
33
- > fixes] ( https://github.com/golangci/golangci-lint/issues/1779 ) so the ` --fix `
34
- > flag in ` golangci-lint ` will ** not** work.
35
-
36
31
` wsl ` uses the [ analysis] ( https://pkg.go.dev/golang.org/x/tools/go/analysis )
37
32
package meaning it will operate on package level with the default analysis flags
38
33
and way of working.
@@ -47,9 +42,12 @@ wsl --allow-cuddle-declarations --fix ./...
47
42
` wsl ` is also integrated in [ ` golangci-lint ` ] ( https://golangci-lint.run )
48
43
49
44
``` sh
50
- golangci-lint run --no-config --disable-all --enable wsl
45
+ golangci-lint run --no-config --disable-all --enable wsl --fix
51
46
```
52
47
48
+ > ** Note** : If you're not sure what the diagnostic is trying to tell you, use
49
+ > any of the fix approaches to fix the code for you.
50
+
53
51
## Issues and configuration
54
52
55
53
The linter suppers a few ways to configure it to satisfy more than one kind of
@@ -62,10 +60,6 @@ documentation](doc/configuration.md).
62
60
Below are the available checklist for any hit from ` wsl ` . If you do not see any,
63
61
feel free to raise an [ issue] ( https://github.com/bombsimon/wsl/issues/new ) .
64
62
65
- > ** Note** : this linter doesn't take in consideration the issues that will be
66
- > fixed with ` go fmt -s ` so ensure that the code is properly formatted before
67
- > use.
68
-
69
63
* [ Anonymous switch statements should never be cuddled] ( doc/rules.md#anonymous-switch-statements-should-never-be-cuddled )
70
64
* [ Append only allowed to cuddle with appended value] ( doc/rules.md#append-only-allowed-to-cuddle-with-appended-value )
71
65
* [ Assignments should only be cuddled with other assignments] ( doc/rules.md#assignments-should-only-be-cuddled-with-other-assignments )
0 commit comments