mirror of
				https://github.com/mgechev/revive.git
				synced 2025-10-30 23:37:49 +02:00 
			
		
		
		
	Fix rule name in README, and format code.
This commit is contained in:
		| @@ -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 | ||||||
|   | |||||||
| @@ -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{ | ||||||
|   | |||||||
| @@ -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] | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user