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
Copy file name to clipboardExpand all lines: docs/settings.md
+10-10Lines changed: 10 additions & 10 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -235,7 +235,7 @@ Flags to pass to format tool (e.g. ["-s"]). Not applicable when using the langua
235
235
Not applicable when using the language server. Choosing 'goimports', 'goreturns', or 'gofumports' will add missing imports and remove unused imports.<br/>
Use gotype on the file currently being edited and report any semantic or syntactic errors found after configured delay. Not applicable when using the language server.
@@ -581,13 +581,13 @@ Example Usage:
581
581
582
582
| Properties | Description |
583
583
| --- | --- |
584
-
|`gc_details`|gc_details controls calculation of gc annotations. <br/> <br/> Default: `false`|
585
-
|`generate`|generate runs `go generate` for a given directory. <br/> <br/> Default: `true`|
Copy file name to clipboardExpand all lines: docs/tools.md
+7-6Lines changed: 7 additions & 6 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -60,13 +60,14 @@ This tool provides support for the [`Go: Generate Interface Stubs`](features.md#
60
60
61
61
This tool provides support for the [`Go: Generate Unit Tests`](features.md#generate-unit-tests) set of commands.
62
62
63
-
### [`golint`]
63
+
### [`staticcheck`]
64
64
65
-
This is the default lint tool. Other lint tools can be used by configuring the [`"go.lintTool"`](settings.md#go.lintTool) setting. Other options include:
65
+
This is the default lint tool. See the [full list of checks](https://staticcheck.io/docs/checks) that `staticcheck` provides. Other lint tools can be used by configuring the [`"go.lintTool"`](settings.md#go.lintTool) setting.
66
+
Other options include:
66
67
67
-
*[`staticcheck`]: This tool provides a great deal of useful checks that are not provided by [`golint`]. See the full list at [staticcheck.io/docs/checks](https://staticcheck.io/docs/checks). It is also officially supported by the [Go team at Google](https://staticcheck.io/sponsors).
68
-
*[`golangci-lint`]: This tool combines a number of existing lint tools, including [staticcheck](#staticcheck), into one interface.
68
+
*[`golangci-lint`]: This meta-linter combines a number of existing lint tools, including [staticcheck](#staticcheck), into one interface.
69
69
*[`revive`]: This tool is an enhancement on top of [`golint`], and it provides additional checks.
70
+
*[`golint`]: This used to be the default linter used by this extension before it was officially deprecated.
70
71
71
72
You can use the [`"go.lintFlags"`](settings.md#go.lintFlags) setting to further configure your linter of choice. Most linters can be configured via special configuration files, but you may still need to pass these command-line flags. The configuration documentation for each supported linter is listed here:
72
73
@@ -115,11 +116,11 @@ It can also be used to provide the [go to definition](features.md#go-to-definiti
115
116
116
117
*[`gogetdoc`], [`godef`], [`godoc`]: these are documentation tools used for the [go to definition](features.md#go-to-definition), [signature help](features.md#signature-help), and [quick info on hover](features.md#quick-info-on-hover) in the legacy mode. [`guru`](#guru) can also be used, but only for the [go to definition](features.md#go-to-definition) behavior. Configure this via the [`"go.docsTool"`](settings.md#go.docsTool) setting.
117
118
118
-
*[`goreturns`], [`gofmt`], [`goimports`]: Formatting tools are used by the [formatting and import organization](features.md#format-and-organize-imports) features. [`goreturns`] is used by default in the legacy mode. It formats the file according to the industry standard [`gofmt`] style, organizes imports, and fills in default return values for functions. Other tools can be used for formatting instead; this can be configured with the [`"go.go.formatTool"`](settings.md#formatTool) setting. Note that [`goreturns`] does not have support for Go modules.
119
+
*[`goimports`], [`gofmt`]: Formatting tools are used by the [formatting and import organization](features.md#format-and-organize-imports) features. [`goreturns`] is used by default in the legacy mode. It formats the file according to the industry standard [`gofmt`] style, organizes imports, and fills in default return values for functions. Other tools can be used for formatting instead; this can be configured with the [`"go.go.formatTool"`](settings.md#formatTool) setting.
119
120
120
-
*[`goimports`], which applies the default `gofmt` style and organizes imports, but without the behavior of filling in default return values
121
121
*[`gofmt`] only formats the file, without import organization or filling in return values
122
122
*[`goformat`] is a configurable version of [`gofmt`]
123
+
*[`goreturns`] fills in default return values for functions, in addition to applying `goimports`-style formatting. This tool does not have support for Go modules.
123
124
124
125
* Diagnostics tools: By default, [`gotype-live`], [`go vet`], and [`golint`] are used to provide [build](features.md#build-errors), [vet](features.md#vet-errors), and [lint](features.md#lint-errors) errors. [`gotype-live`] provides build errors as you type, while `go build` can be used to show build errors only on save. [`gotype-live`] does not work with modules.
0 commit comments