You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
[Codeac.io](https://www.codeac.io?ref=revive) - Automated code review service integrates with GitHub, Bitbucket and GitLab (even self-hosted) and helps you fight technical debt. Check your [pull-requests](https://www.codeac.io/documentation/pull-requests.html?ref=revive) with [revive](https://www.codeac.io/documentation/revive-configuration.html?ref=revive) automatically. (free for open-source projects)
130
132
133
+
### Linter aggregators
134
+
135
+
#### golangci-lint
136
+
To enable `revive` in `golangci-lint` you need to add `revive` to the list of enabled linters:
137
+
138
+
```yaml
139
+
# golangci-lint configuration file
140
+
linters:
141
+
enable:
142
+
- revive
143
+
```
144
+
Then `revive` can be configured by adding an entry to the `linters-settings` section of the configuration, for example:
145
+
146
+
```yaml
147
+
# golangci-lint configuration file
148
+
linters-settings:
149
+
revive:
150
+
ignore-generated-header: true
151
+
severity: warning
152
+
rules:
153
+
- name: atomic
154
+
- name: line-length-limit
155
+
severity: error
156
+
arguments: [80]
157
+
- name: unhandled-error
158
+
arguments : ["fmt.Printf", "myFunction"]
159
+
```
160
+
161
+
The above configuration enables three rules of `revive`: _atomic_, _line-length-limit_ and _unhandled-error_ and pass some arguments to the last two.
162
+
The [Configuration](#configuration) section of this document provides details on how to configure `revive`. Note that while `revive` configuration is in TOML, that of `golangci-lint` is in YAML.
163
+
164
+
Please notice that if no particular configuration is provided, `revive` will behave as `go-lint` does, i.e. all `go-lint` rules are enabled (the [Available Rules table](#available-rules) details what are the `go-lint` rules). When a configuration is provided, only rules in the configuration are enabled.
0 commit comments