| 1 |
--- |
| 2 |
title: "Options" |
| 3 |
description: "Explanations for all options" |
| 4 |
aliases: |
| 5 |
- /docs/options |
| 6 |
--- |
| 7 |
|
| 8 |
## checks {#checks} |
| 9 |
|
| 10 |
This option sets which [checks]({{< relref "/docs/checks" >}}) should be enabled. |
| 11 |
By default, most checks will be enabled, except for those that are too opinionated or that only apply to packages in certain domains. |
| 12 |
|
| 13 |
All supported checks can be enabled with `"all"`. |
| 14 |
Subsets of checks can be enabled via prefixes and the `*` glob; for example, `"S*"`, `"SA*"` and `"SA1*"` will |
| 15 |
enable all checks in the S, SA and SA1 subgroups respectively. |
| 16 |
Individual checks can be enabled by their full IDs. |
| 17 |
To disable checks, prefix them with a minus sign. This works on all of the previously mentioned values. |
| 18 |
|
| 19 |
Default value: `["all", "-{{< check "ST1000" >}}", "-{{< check "ST1003" >}}", "-{{< check "ST1016" >}}", "-{{< check "ST1020" >}}", "-{{< check "ST1021" >}}", "-{{< check "ST1022" >}}"]` |
| 20 |
|
| 21 |
## initialisms {#initialisms} |
| 22 |
|
| 23 |
{{< check "ST1003" >}} checks, among other |
| 24 |
things, for the correct capitalization of initialisms. The |
| 25 |
set of known initialisms can be configured with this option. |
| 26 |
|
| 27 |
Default value: `["ACL", "API", "ASCII", "CPU", "CSS", "DNS", "EOF", "GUID", "HTML", "HTTP", "HTTPS", "ID", "IP", "JSON", "QPS", "RAM", "RPC", "SLA", "SMTP", "SQL", "SSH", "TCP", "TLS", "TTL", "UDP", "UI", "GID", "UID", "UUID", "URI", "URL", "UTF8", "VM", "XML", "XMPP", "XSRF", "XSS", "SIP", "RTP", "AMQP", "DB", "TS"]` |
| 28 |
|
| 29 |
## dot_import_whitelist {#dot_import_whitelist} |
| 30 |
|
| 31 |
By default, {{< check "ST1001" >}} forbids |
| 32 |
all uses of dot imports in non-test packages. This |
| 33 |
setting allows setting a whitelist of import paths that can |
| 34 |
be dot-imported anywhere. |
| 35 |
|
| 36 |
Default value: `[]` |
| 37 |
|
| 38 |
## http_status_code_whitelist {#http_status_code_whitelist} |
| 39 |
|
| 40 |
{{< check "ST1013" >}} recommends using constants from the `net/http` package |
| 41 |
instead of hard-coding numeric HTTP status codes. This |
| 42 |
setting specifies a list of numeric status codes that this |
| 43 |
check does not complain about. |
| 44 |
|
| 45 |
Default value: `["200", "400", "404", "500"]` |