1
0
mirror of https://github.com/mgechev/revive.git synced 2025-01-24 03:47:45 +02:00

Fix rule name in README, and format code.

This commit is contained in:
xuri 2018-10-03 14:12:19 +08:00
parent cd6459542b
commit c781c8b090
No known key found for this signature in database
GPG Key ID: BA5E5BB1C948EDF7
3 changed files with 4 additions and 2 deletions

View File

@ -272,7 +272,7 @@ List of all available rules. The rules ported from `golint` are left unchanged a
| `function-result-limit` | int | Specifies the maximum number of results a function can return | no | no | | `function-result-limit` | int | Specifies the maximum number of results a function can return | no | no |
| `imports-blacklist` | []string | Disallows importing the specified packages | no | no | | `imports-blacklist` | []string | Disallows importing the specified packages | no | no |
| `range-val-in-closure`| n/a | Warns if range value is used in a closure dispatched as goroutine| no | no | | `range-val-in-closure`| n/a | Warns if range value is used in a closure dispatched as goroutine| no | no |
| `waitgroup-by-value `| n/a | Warns on functions taking sync.WaitGroup as a by-value parameter | no | no | | `waitgroup-by-copy` | n/a | Warns on functions taking sync.WaitGroup as a by-copy parameter | no | no |
| `atomic` | n/a | Check for common mistaken usages of the `sync/atomic` package | no | no | | `atomic` | n/a | Check for common mistaken usages of the `sync/atomic` package | no | no |
## Configurable rules ## Configurable rules

View File

@ -69,7 +69,7 @@ var allRules = append([]lint.Rule{
&rule.MaxPublicStructsRule{}, &rule.MaxPublicStructsRule{},
&rule.RangeValInClosureRule{}, &rule.RangeValInClosureRule{},
&rule.WaitGroupByCopyRule{}, &rule.WaitGroupByCopyRule{},
&rule.AtomicRule{}, &rule.AtomicRule{},
}, defaultRules...) }, defaultRules...)
var allFormatters = []lint.Formatter{ var allFormatters = []lint.Formatter{

View File

@ -14,3 +14,5 @@
[rule.indent-error-flow] [rule.indent-error-flow]
[rule.empty-block] [rule.empty-block]
[rule.range-val-in-closure] [rule.range-val-in-closure]
[rule.waitgroup-by-copy]
[rule.atomic]