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
5bbdabb test/integration/goTest: log suspicious tests
6d4d3bf src/goInstallTools: use `go install -v` instead of `go install -x`
dbf1440 goDeveloperSurvey: update link and start/end date
9a0cabf settings: update for gopls/v0.7.3
ee7c340 goLanguageServer: print out all GOPATHs when there are multiple
656865d src/goInstallTools: use `go install` for go1.16+
af8377d goSurvey: update language in Go Developer survey prompt
8ac427b test: fix broken debugger tests
bdb0b61 src/goTest: visualize profiles
1f4e83b package.json: update mocha & run npm audit fix
4e2e945 src/goDebugConfiguration: handle directory with '.' in its name
337e533 src/goTest: show test output on run
1f8bf32 src/goTest: add single-test debugging
afc7d07 goSurvey: add a setting to disable all survey prompts
a90d590 src/goTest: update go.tests after resolving tests
e01db48 goDeveloperSurvey: prompt vscode-go users for the Go dev survey
5691e02 src/goDebugFactory: add program filepath to program error message
9b3e92e CHANGELOG.md: v0.28.1 note
5ecabf9 src/goTest: populate tests for open docs on start
079e752 src/goTest: ensure that cursorOrPrevious always saves
11afec4 src/goInstallTools: bugfix for grammar
bf9a5a1 src/goImpl: allow `-` as an acceptable char for interface names (package/variable)
cfee3e1 src/goDebugConfiguration: take program verbatim with external adapter
022e403 package.json: add showLog/logOutput/dlvFlags to go.delveConfig setting
6f98706 src/goTest: add view for profiles
b82ed6c package.json: start v0.29.0-dev
0f196ff package.json: support testAtCursor (and co.) despite codelenses
Change-Id: I36daf79425451ef500ad5a45301c9f2631700fa0
Delve settings that applies to all debugging sessions. Debug configuration in the launch.json file will override these values.
143
143
| Properties | Description |
144
144
| --- | --- |
145
-
|`apiVersion`| Delve Api Version to use. Default value is 2. <br/> Allowed Options: `1`, `2` <br/> Default: `2`|
145
+
|`apiVersion`| Delve Api Version to use. Default value is 2. This applies only when using the 'legacy' debug adapter. <br/> Allowed Options: `1`, `2` <br/> Default: `2`|
146
146
|`debugAdapter`| Select which debug adapter to use by default. This is also used for choosing which debug adapter to use when no launch.json is present and with codelenses. <br/> Allowed Options: `legacy`, `dlv-dap` <br/> Default: `"dlv-dap"`|
147
+
|`dlvFlags`| Extra flags for `dlv`. See `dlv help` for the full list of supported. Flags such as `--log-output`, `--log`, `--log-dest`, `--api-version`, `--output`, `--backend` already have corresponding properties in the debug configuration, and flags such as `--listen` and `--headless` are used internally. If they are specified in `dlvFlags`, they may be ignored or cause an error. |
147
148
|`dlvLoadConfig`| LoadConfig describes to delve, how to load values from target's memory. Ignored by 'dlv-dap'. <br/> Default: ``` { <pre>"followPointers" : true,<br/>"maxArrayValues" : 64,<br/>"maxStringLen" : 64,<br/>"maxStructFields" : -1,<br/>"maxVariableRecurse" : 1,</pre>} ```|
149
+
|`logOutput`| Comma separated list of components that should produce debug output. Maps to dlv's `--log-output` flag. Check `dlv log` for details. <br/> Allowed Options: `debugger`, `gdbwire`, `lldbout`, `debuglineerr`, `rpc`, `dap` <br/> Default: `"debugger"`|
148
150
|`showGlobalVariables`| Boolean value to indicate whether global package variables should be shown in the variables pane or not. <br/> Default: `false`|
151
+
|`showLog`| Show log output from the delve debugger. Maps to dlv's `--log` flag. <br/> Default: `false`|
149
152
|`substitutePath`| An array of mappings from a local path to the remote path that is used by the debuggee. The debug adapter will replace the local path with the remote path in all of the calls. Overriden by `remotePath` (in attach request). |
150
-
151
-
Default:
152
-
```
153
-
{
154
-
"apiVersion" : 2,
155
-
"debugAdapter" : "legacy",
156
-
"dlvLoadConfig" : {
157
-
"followPointers" : true,
158
-
"maxArrayValues" : 64,
159
-
"maxStringLen" : 64,
160
-
"maxStructFields" : -1,
161
-
"maxVariableRecurse" : 1,
162
-
},
163
-
"showGlobalVariables" : false,
164
-
"substitutePath" : [],
165
-
}
166
-
```
167
153
### `go.disableConcurrentTests`
168
154
169
155
If true, tests will not run concurrently. When a new test run is started, the previous will be cancelled.
@@ -182,15 +168,15 @@ Experimental Feature: Enable/Disable entries from the context menu in the editor
182
168
| --- | --- |
183
169
|`addImport`| If true, adds command to import a package to the editor context menu <br/> Default: `true`|
184
170
|`addTags`| If true, adds command to add configured tags from struct fields to the editor context menu <br/> Default: `true`|
185
-
|`benchmarkAtCursor`| If true, adds command to benchmark the test under the cursor to the editor context menu <br/> Default: `true`|
186
-
|`debugTestAtCursor`| If true, adds command to debug the test under the cursor to the editor context menu <br/> Default: `true`|
171
+
|`benchmarkAtCursor`| If true, adds command to benchmark the test under the cursor to the editor context menu <br/> Default: `false`|
172
+
|`debugTestAtCursor`| If true, adds command to debug the test under the cursor to the editor context menu <br/> Default: `false`|
187
173
|`fillStruct`| If true, adds command to fill struct literal with default values to the editor context menu <br/> Default: `true`|
188
174
|`generateTestForFile`| If true, adds command to generate unit tests for current file to the editor context menu <br/> Default: `true`|
189
175
|`generateTestForFunction`| If true, adds command to generate unit tests for function under the cursor to the editor context menu <br/> Default: `true`|
190
176
|`generateTestForPackage`| If true, adds command to generate unit tests for currnt package to the editor context menu <br/> Default: `true`|
191
177
|`playground`| If true, adds command to upload the current file or selection to the Go Playground <br/> Default: `true`|
192
178
|`removeTags`| If true, adds command to remove configured tags from struct fields to the editor context menu <br/> Default: `true`|
193
-
|`testAtCursor`| If true, adds command to run the test under the cursor to the editor context menu <br/> Default: `true`|
179
+
|`testAtCursor`| If true, adds command to run the test under the cursor to the editor context menu <br/> Default: `false`|
194
180
|`testCoverage`| If true, adds command to run test coverage to the editor context menu <br/> Default: `true`|
195
181
|`testFile`| If true, adds command to run all tests in the current file to the editor context menu <br/> Default: `true`|
196
182
|`testPackage`| If true, adds command to run all tests in the current package to the editor context menu <br/> Default: `true`|
@@ -382,6 +368,11 @@ Default:
382
368
"tags" : "",
383
369
}
384
370
```
371
+
### `go.survey.prompt`
372
+
373
+
Prompt for surveys, including the gopls survey and the Go developer survey.
374
+
375
+
Default: `true`
385
376
### `go.terminal.activateEnvironment`
386
377
387
378
Apply the Go & PATH environment variables used by the extension to all integrated terminals.
@@ -419,6 +410,11 @@ Default: `"flat"`
419
410
Set the source location of dynamically discovered subtests to the location of the containing function. As a result, dynamically discovered subtests will be added to the gutter test widget of the containing function.
420
411
421
412
Default: `false`
413
+
### `go.testExplorer.showOutput`
414
+
415
+
Open the test output terminal when a test run is started.
416
+
417
+
Default: `true`
422
418
### `go.testFlags`
423
419
424
420
Flags to pass to `go test`. If null, then buildFlags will be used. This is not propagated to the language server.
@@ -641,7 +637,7 @@ Example Usage:
641
637
```json5
642
638
"gopls": {
643
639
...
644
-
"codelens": {
640
+
"codelenses": {
645
641
"generate":false, // Don't show the `go generate` lens.
646
642
"gc_details":true// Show a code lens toggling the display of gc's choices.
647
643
}
@@ -726,6 +722,7 @@ Example Usage:
726
722
|`fillstruct`| note incomplete struct initializations <br/> This analyzer provides diagnostics for any struct literals that do not have any fields initialized. Because the suggested fix for this analysis is expensive to compute, callers should compute it separately, using the SuggestedFix function below. <br/> <br/> Default: `true`|
727
723
|`httpresponse`| check for mistakes using HTTP responses <br/> A common mistake when using the net/http package is to defer a function call to close the http.Response Body before checking the error that determines whether the response is valid: <br/> <pre>resp, err := http.Head(url)<br/>defer resp.Body.Close()<br/>if err != nil {<br/> log.Fatal(err)<br/>}<br/>// (defer statement belongs here)</pre><br/> This checker helps uncover latent nil dereference bugs by reporting a diagnostic for such mistakes. <br/> Default: `true`|
728
724
|`ifaceassert`| detect impossible interface-to-interface type assertions <br/> This checker flags type assertions v.(T) and corresponding type-switch cases in which the static type V of v is an interface that cannot possibly implement the target interface T. This occurs when V and T contain methods with the same name but different signatures. Example: <br/> <pre>var v interface {<br/> Read()<br/>}<br/>_ = v.(io.Reader)</pre><br/> The Read method in v has a different signature than the Read method in io.Reader, so this assertion cannot succeed. <br/> <br/> Default: `true`|
725
+
|`infertypeargs`| check for unnecessary type arguments in call expressions <br/> Explicit type arguments may be omitted from call expressions if they can be inferred from function arguments, or from other type arguments: <br/> func f[T any](T) {} <br/> func _() { <pre>f[string]("foo") // string could be inferred</pre>} <br/> <br/> Default: `true`|
729
726
|`loopclosure`| check references to loop variables from within nested functions <br/> This analyzer checks for references to loop variables from within a function literal inside the loop body. It checks only instances where the function literal is called in a defer or go statement that is the last statement in the loop body, as otherwise we would need whole program analysis. <br/> For example: <br/> <pre>for i, v := range s {<br/> go func() {<br/> println(i, v) // not what you might expect<br/> }()<br/>}</pre><br/> See: https://golang.org/doc/go_faq.html#closures_and_goroutines <br/> Default: `true`|
730
727
|`lostcancel`| check cancel func returned by context.WithCancel is called <br/> The cancellation function returned by context.WithCancel, WithTimeout, and WithDeadline must be called or the new context will remain live until its parent context is cancelled. (The background context is never cancelled.) <br/> Default: `true`|
731
728
|`nilfunc`| check for useless comparisons between functions and nil <br/> A useless comparison is one like f == nil as opposed to f() == nil. <br/> Default: `true`|
@@ -744,13 +741,14 @@ Example Usage:
744
741
|`structtag`| check that struct field tags conform to reflect.StructTag.Get <br/> Also report certain struct tags (json, xml) used with unexported fields. <br/> Default: `true`|
745
742
|`testinggoroutine`| report calls to (*testing.T).Fatal from goroutines started by a test. <br/> Functions that abruptly terminate a test, such as the Fatal, Fatalf, FailNow, and Skip{,f,Now} methods of *testing.T, must be called from the test goroutine itself. This checker detects calls to these functions that occur within a goroutine started by the test. For example: <br/> func TestFoo(t *testing.T) { go func() { t.Fatal("oops") // error: (*T).Fatal called from non-test goroutine }() } <br/> <br/> Default: `true`|
746
743
|`tests`| check for common mistaken usages of tests and examples <br/> The tests checker walks Test, Benchmark and Example functions checking malformed names, wrong signatures and examples documenting non-existent identifiers. <br/> Please see the documentation for package testing in golang.org/pkg/testing for the conventions that are enforced for Tests, Benchmarks, and Examples. <br/> Default: `true`|
747
-
|`undeclaredname`| suggested fixes for "undeclared name: <>" <br/> This checker provides suggested fixes for type errors of the type "undeclared name: <>". It will insert a new statement: "<> := ". <br/> Default: `true`|
744
+
|`undeclaredname`| suggested fixes for "undeclared name: <>" <br/> This checker provides suggested fixes for type errors of the type "undeclared name: <>". It will either insert a new statement, such as: <br/> "<> := " <br/> or a new function declaration, such as: <br/> func <>(inferred parameters) { <pre>panic("implement me!")</pre>} <br/> <br/> Default: `true`|
748
745
|`unmarshal`| report passing non-pointer or non-interface values to unmarshal <br/> The unmarshal analysis reports calls to functions such as json.Unmarshal in which the argument type is not a pointer or an interface. <br/> Default: `true`|
749
746
|`unreachable`| check for unreachable code <br/> The unreachable analyzer finds statements that execution can never reach because they are preceded by an return statement, a call to panic, an infinite loop, or similar constructs. <br/> Default: `true`|
750
747
|`unsafeptr`| check for invalid conversions of uintptr to unsafe.Pointer <br/> The unsafeptr analyzer reports likely incorrect uses of unsafe.Pointer to convert integers to pointers. A conversion from uintptr to unsafe.Pointer is invalid if it implies that there is a uintptr-typed word in memory that holds a pointer value, because that word will be invisible to stack copying and to the garbage collector. <br/> Default: `true`|
751
748
|`unusedparams`| check for unused parameters of functions <br/> The unusedparams analyzer checks functions to see if there are any parameters that are not being used. <br/> To reduce false positives it ignores: - methods - parameters that do not have a name or are underscored - functions in test files - functions with empty bodies or those with just a return stmt <br/> Default: `false`|
752
749
|`unusedresult`| check for unused results of calls to some functions <br/> Some functions like fmt.Errorf return a result and have no side effects, so it is always a mistake to discard the result. This analyzer reports calls to certain functions in which the result of the call is ignored. <br/> The set of functions may be controlled using flags. <br/> Default: `true`|
753
750
|`unusedwrite`| checks for unused writes <br/> The analyzer reports instances of writes to struct fields and arrays that are never read. Specifically, when a struct object or an array is copied, its elements are copied implicitly by the compiler, and any element write to this copy does nothing with the original object. <br/> For example: <br/> <pre>type T struct { x int }<br/>func f(input []T) {<br/> for i, v := range input { // v is a copy<br/> v.x = i // unused write to field x<br/> }<br/>}</pre><br/> Another example is about non-pointer receiver: <br/> <pre>type T struct { x int }<br/>func (t T) f() { // t is a copy<br/> t.x = i // unused write to field x<br/>}</pre><br/> <br/> Default: `false`|
751
+
|`useany`| check for constraints that could be simplified to "any" <br/> Default: `true`|
754
752
### `ui.diagnostic.annotations`
755
753
756
754
(Experimental) annotations specifies the various kinds of optimization diagnostics
0 commit comments