1
0
mirror of https://github.com/mgechev/revive.git synced 2025-01-08 03:13:27 +02:00

Update formatting

This commit is contained in:
mgechev 2018-05-26 16:16:35 -07:00
parent 0718cc9358
commit 2a294dcca2
No known key found for this signature in database
GPG Key ID: 3C44F5A2A289C6BB

View File

@ -98,31 +98,31 @@ This will use `config.toml`, the `friendly` formatter, and will run linting over
List of all available rules. The rules ported from `golint` are left unchanged and indicated in the `golit` column.
| Name | Config | Description | `golint` |
| --------------------- | :----: | :--------------------------------------------------------------: | :------: |
| `blank-imports` | N/A | Disallows blank imports | yes |
| `context-arguments` | N/A | `context.Context` should be the first argument of a function. | yes |
| `context-key-type` | N/A | Disallows the usage of basic types in `context.WithValue`. | yes |
| `dot-imports` | N/A | Forbids `.` imports. | yes |
| `error-return` | N/A | The error return parameter should be last. | yes |
| `error-strings` | N/A | Conventions around error strings. | yes |
| `errors` | N/A | Naming of error variables. | yes |
| `exported` | N/A | Naming and commenting conventions on exported symbols. | yes |
| `if-return` | N/A | Redundant if when returning an error. | yes |
| `increment-decrement` | N/A | Use `i++` and `i--` instead of `i += 1` and `i -= 1`. | yes |
| `names` | N/A | Naming rules. | yes |
| `package-comments` | N/A | Package commenting conventions. | yes |
| `range` | N/A | Prevents redundant variables when iterating over a collection. | yes |
| `receiver-name` | N/A | Conventions around the naming of receivers. | yes |
| `time-name` | N/A | Conventions around the naming of time variables. | yes |
| `unexpected-return` | N/A | Warns when a public return is from unexported type. | yes |
| `unexpected-return` | N/A | Conventions around variable declarations. | yes |
| `indent-error-flow` | N/A | Prevents redundant else statements. | yes |
| Name | Config | Description | `golint` |
| --------------------- | :----: | :--------------------------------------------------------------- | :------: |
| `blank-imports` | N/A | Disallows blank imports | yes |
| `context-arguments` | N/A | `context.Context` should be the first argument of a function. | yes |
| `context-key-type` | N/A | Disallows the usage of basic types in `context.WithValue`. | yes |
| `dot-imports` | N/A | Forbids `.` imports. | yes |
| `error-return` | N/A | The error return parameter should be last. | yes |
| `error-strings` | N/A | Conventions around error strings. | yes |
| `errors` | N/A | Naming of error variables. | yes |
| `exported` | N/A | Naming and commenting conventions on exported symbols. | yes |
| `if-return` | N/A | Redundant if when returning an error. | yes |
| `increment-decrement` | N/A | Use `i++` and `i--` instead of `i += 1` and `i -= 1`. | yes |
| `names` | N/A | Naming rules. | yes |
| `package-comments` | N/A | Package commenting conventions. | yes |
| `range` | N/A | Prevents redundant variables when iterating over a collection. | yes |
| `receiver-name` | N/A | Conventions around the naming of receivers. | yes |
| `time-name` | N/A | Conventions around the naming of time variables. | yes |
| `unexpected-return` | N/A | Warns when a public return is from unexported type. | yes |
| `unexpected-return` | N/A | Conventions around variable declarations. | yes |
| `indent-error-flow` | N/A | Prevents redundant else statements. | yes |
| `errorf` | N/A | Should replace `error.New(fmt.Sprintf())` with `error.Errorf()` | yes |
| `argument-limit` | int | Specifies the maximum number of arguments a function can receive | no |
| `cyclomatic` | int | Sets restriction for maximum Cyclomatic complexity. | no |
| `max-public-structs` | int | The maximum number of public structs in a file. | no |
| `file-header` | string | Header which each file should have. | no |
| `cyclomatic` | int | Sets restriction for maximum Cyclomatic complexity. | no |
| `max-public-structs` | int | The maximum number of public structs in a file. | no |
| `file-header` | string | Header which each file should have. | no |
## Available Formatters