golang.org/x/tools/gopls@v0.15.3/internal/settings/api_json.go (about)

     1  // Code generated by "golang.org/x/tools/gopls/doc/generate"; DO NOT EDIT.
     2  
     3  package settings
     4  
     5  var GeneratedAPIJSON = &APIJSON{
     6  	Options: map[string][]*OptionJSON{
     7  		"User": {
     8  			{
     9  				Name:      "buildFlags",
    10  				Type:      "[]string",
    11  				Doc:       "buildFlags is the set of flags passed on to the build system when invoked.\nIt is applied to queries like `go list`, which is used when discovering files.\nThe most common use is to set `-tags`.\n",
    12  				Default:   "[]",
    13  				Hierarchy: "build",
    14  			},
    15  			{
    16  				Name:      "env",
    17  				Type:      "map[string]string",
    18  				Doc:       "env adds environment variables to external commands run by `gopls`, most notably `go list`.\n",
    19  				Default:   "{}",
    20  				Hierarchy: "build",
    21  			},
    22  			{
    23  				Name:      "directoryFilters",
    24  				Type:      "[]string",
    25  				Doc:       "directoryFilters can be used to exclude unwanted directories from the\nworkspace. By default, all directories are included. Filters are an\noperator, `+` to include and `-` to exclude, followed by a path prefix\nrelative to the workspace folder. They are evaluated in order, and\nthe last filter that applies to a path controls whether it is included.\nThe path prefix can be empty, so an initial `-` excludes everything.\n\nDirectoryFilters also supports the `**` operator to match 0 or more directories.\n\nExamples:\n\nExclude node_modules at current depth: `-node_modules`\n\nExclude node_modules at any depth: `-**/node_modules`\n\nInclude only project_a: `-` (exclude everything), `+project_a`\n\nInclude only project_a, but not node_modules inside it: `-`, `+project_a`, `-project_a/node_modules`\n",
    26  				Default:   "[\"-**/node_modules\"]",
    27  				Hierarchy: "build",
    28  			},
    29  			{
    30  				Name:      "templateExtensions",
    31  				Type:      "[]string",
    32  				Doc:       "templateExtensions gives the extensions of file names that are treateed\nas template files. (The extension\nis the part of the file name after the final dot.)\n",
    33  				Default:   "[]",
    34  				Hierarchy: "build",
    35  			},
    36  			{
    37  				Name:      "memoryMode",
    38  				Type:      "string",
    39  				Doc:       "obsolete, no effect\n",
    40  				Default:   "\"\"",
    41  				Status:    "experimental",
    42  				Hierarchy: "build",
    43  			},
    44  			{
    45  				Name:      "expandWorkspaceToModule",
    46  				Type:      "bool",
    47  				Doc:       "expandWorkspaceToModule determines which packages are considered\n\"workspace packages\" when the workspace is using modules.\n\nWorkspace packages affect the scope of workspace-wide operations. Notably,\ngopls diagnoses all packages considered to be part of the workspace after\nevery keystroke, so by setting \"ExpandWorkspaceToModule\" to false, and\nopening a nested workspace directory, you can reduce the amount of work\ngopls has to do to keep your workspace up to date.\n",
    48  				Default:   "true",
    49  				Status:    "experimental",
    50  				Hierarchy: "build",
    51  			},
    52  			{
    53  				Name:      "allowModfileModifications",
    54  				Type:      "bool",
    55  				Doc:       "allowModfileModifications disables -mod=readonly, allowing imports from\nout-of-scope modules. This option will eventually be removed.\n",
    56  				Default:   "false",
    57  				Status:    "experimental",
    58  				Hierarchy: "build",
    59  			},
    60  			{
    61  				Name:      "allowImplicitNetworkAccess",
    62  				Type:      "bool",
    63  				Doc:       "allowImplicitNetworkAccess disables GOPROXY=off, allowing implicit module\ndownloads rather than requiring user action. This option will eventually\nbe removed.\n",
    64  				Default:   "false",
    65  				Status:    "experimental",
    66  				Hierarchy: "build",
    67  			},
    68  			{
    69  				Name:      "standaloneTags",
    70  				Type:      "[]string",
    71  				Doc:       "standaloneTags specifies a set of build constraints that identify\nindividual Go source files that make up the entire main package of an\nexecutable.\n\nA common example of standalone main files is the convention of using the\ndirective `//go:build ignore` to denote files that are not intended to be\nincluded in any package, for example because they are invoked directly by\nthe developer using `go run`.\n\nGopls considers a file to be a standalone main file if and only if it has\npackage name \"main\" and has a build directive of the exact form\n\"//go:build tag\" or \"// +build tag\", where tag is among the list of tags\nconfigured by this setting. Notably, if the build constraint is more\ncomplicated than a simple tag (such as the composite constraint\n`//go:build tag && go1.18`), the file is not considered to be a standalone\nmain file.\n\nThis setting is only supported when gopls is built with Go 1.16 or later.\n",
    72  				Default:   "[\"ignore\"]",
    73  				Hierarchy: "build",
    74  			},
    75  			{
    76  				Name: "hoverKind",
    77  				Type: "enum",
    78  				Doc:  "hoverKind controls the information that appears in the hover text.\nSingleLine and Structured are intended for use only by authors of editor plugins.\n",
    79  				EnumValues: []EnumValue{
    80  					{Value: "\"FullDocumentation\""},
    81  					{Value: "\"NoDocumentation\""},
    82  					{Value: "\"SingleLine\""},
    83  					{
    84  						Value: "\"Structured\"",
    85  						Doc:   "`\"Structured\"` is an experimental setting that returns a structured hover format.\nThis format separates the signature from the documentation, so that the client\ncan do more manipulation of these fields.\n\nThis should only be used by clients that support this behavior.\n",
    86  					},
    87  					{Value: "\"SynopsisDocumentation\""},
    88  				},
    89  				Default:   "\"FullDocumentation\"",
    90  				Hierarchy: "ui.documentation",
    91  			},
    92  			{
    93  				Name:      "linkTarget",
    94  				Type:      "string",
    95  				Doc:       "linkTarget controls where documentation links go.\nIt might be one of:\n\n* `\"godoc.org\"`\n* `\"pkg.go.dev\"`\n\nIf company chooses to use its own `godoc.org`, its address can be used as well.\n\nModules matching the GOPRIVATE environment variable will not have\ndocumentation links in hover.\n",
    96  				Default:   "\"pkg.go.dev\"",
    97  				Hierarchy: "ui.documentation",
    98  			},
    99  			{
   100  				Name:      "linksInHover",
   101  				Type:      "bool",
   102  				Doc:       "linksInHover toggles the presence of links to documentation in hover.\n",
   103  				Default:   "true",
   104  				Hierarchy: "ui.documentation",
   105  			},
   106  			{
   107  				Name:      "usePlaceholders",
   108  				Type:      "bool",
   109  				Doc:       "placeholders enables placeholders for function parameters or struct\nfields in completion responses.\n",
   110  				Default:   "false",
   111  				Hierarchy: "ui.completion",
   112  			},
   113  			{
   114  				Name:      "completionBudget",
   115  				Type:      "time.Duration",
   116  				Doc:       "completionBudget is the soft latency goal for completion requests. Most\nrequests finish in a couple milliseconds, but in some cases deep\ncompletions can take much longer. As we use up our budget we\ndynamically reduce the search scope to ensure we return timely\nresults. Zero means unlimited.\n",
   117  				Default:   "\"100ms\"",
   118  				Status:    "debug",
   119  				Hierarchy: "ui.completion",
   120  			},
   121  			{
   122  				Name: "matcher",
   123  				Type: "enum",
   124  				Doc:  "matcher sets the algorithm that is used when calculating completion\ncandidates.\n",
   125  				EnumValues: []EnumValue{
   126  					{Value: "\"CaseInsensitive\""},
   127  					{Value: "\"CaseSensitive\""},
   128  					{Value: "\"Fuzzy\""},
   129  				},
   130  				Default:   "\"Fuzzy\"",
   131  				Status:    "advanced",
   132  				Hierarchy: "ui.completion",
   133  			},
   134  			{
   135  				Name:      "experimentalPostfixCompletions",
   136  				Type:      "bool",
   137  				Doc:       "experimentalPostfixCompletions enables artificial method snippets\nsuch as \"someSlice.sort!\".\n",
   138  				Default:   "true",
   139  				Status:    "experimental",
   140  				Hierarchy: "ui.completion",
   141  			},
   142  			{
   143  				Name:      "completeFunctionCalls",
   144  				Type:      "bool",
   145  				Doc:       "completeFunctionCalls enables function call completion.\n\nWhen completing a statement, or when a function return type matches the\nexpected of the expression being completed, completion may suggest call\nexpressions (i.e. may include parentheses).\n",
   146  				Default:   "true",
   147  				Hierarchy: "ui.completion",
   148  			},
   149  			{
   150  				Name: "importShortcut",
   151  				Type: "enum",
   152  				Doc:  "importShortcut specifies whether import statements should link to\ndocumentation or go to definitions.\n",
   153  				EnumValues: []EnumValue{
   154  					{Value: "\"Both\""},
   155  					{Value: "\"Definition\""},
   156  					{Value: "\"Link\""},
   157  				},
   158  				Default:   "\"Both\"",
   159  				Hierarchy: "ui.navigation",
   160  			},
   161  			{
   162  				Name: "symbolMatcher",
   163  				Type: "enum",
   164  				Doc:  "symbolMatcher sets the algorithm that is used when finding workspace symbols.\n",
   165  				EnumValues: []EnumValue{
   166  					{Value: "\"CaseInsensitive\""},
   167  					{Value: "\"CaseSensitive\""},
   168  					{Value: "\"FastFuzzy\""},
   169  					{Value: "\"Fuzzy\""},
   170  				},
   171  				Default:   "\"FastFuzzy\"",
   172  				Status:    "advanced",
   173  				Hierarchy: "ui.navigation",
   174  			},
   175  			{
   176  				Name: "symbolStyle",
   177  				Type: "enum",
   178  				Doc:  "symbolStyle controls how symbols are qualified in symbol responses.\n\nExample Usage:\n\n```json5\n\"gopls\": {\n...\n  \"symbolStyle\": \"Dynamic\",\n...\n}\n```\n",
   179  				EnumValues: []EnumValue{
   180  					{
   181  						Value: "\"Dynamic\"",
   182  						Doc:   "`\"Dynamic\"` uses whichever qualifier results in the highest scoring\nmatch for the given symbol query. Here a \"qualifier\" is any \"/\" or \".\"\ndelimited suffix of the fully qualified symbol. i.e. \"to/pkg.Foo.Field\" or\njust \"Foo.Field\".\n",
   183  					},
   184  					{
   185  						Value: "\"Full\"",
   186  						Doc:   "`\"Full\"` is fully qualified symbols, i.e.\n\"path/to/pkg.Foo.Field\".\n",
   187  					},
   188  					{
   189  						Value: "\"Package\"",
   190  						Doc:   "`\"Package\"` is package qualified symbols i.e.\n\"pkg.Foo.Field\".\n",
   191  					},
   192  				},
   193  				Default:   "\"Dynamic\"",
   194  				Status:    "advanced",
   195  				Hierarchy: "ui.navigation",
   196  			},
   197  			{
   198  				Name: "symbolScope",
   199  				Type: "enum",
   200  				Doc:  "symbolScope controls which packages are searched for workspace/symbol\nrequests. The default value, \"workspace\", searches only workspace\npackages. The legacy behavior, \"all\", causes all loaded packages to be\nsearched, including dependencies; this is more expensive and may return\nunwanted results.\n",
   201  				EnumValues: []EnumValue{
   202  					{
   203  						Value: "\"all\"",
   204  						Doc:   "`\"all\"` matches symbols in any loaded package, including\ndependencies.\n",
   205  					},
   206  					{
   207  						Value: "\"workspace\"",
   208  						Doc:   "`\"workspace\"` matches symbols in workspace packages only.\n",
   209  					},
   210  				},
   211  				Default:   "\"all\"",
   212  				Hierarchy: "ui.navigation",
   213  			},
   214  			{
   215  				Name: "analyses",
   216  				Type: "map[string]bool",
   217  				Doc:  "analyses specify analyses that the user would like to enable or disable.\nA map of the names of analysis passes that should be enabled/disabled.\nA full list of analyzers that gopls uses can be found in\n[analyzers.md](https://github.com/golang/tools/blob/master/gopls/doc/analyzers.md).\n\nExample Usage:\n\n```json5\n...\n\"analyses\": {\n  \"unreachable\": false, // Disable the unreachable analyzer.\n  \"unusedvariable\": true  // Enable the unusedvariable analyzer.\n}\n...\n```\n",
   218  				EnumKeys: EnumKeys{
   219  					ValueType: "bool",
   220  					Keys: []EnumKey{
   221  						{
   222  							Name:    "\"appends\"",
   223  							Doc:     "check for missing values after append\n\nThis checker reports calls to append that pass\nno values to be appended to the slice.\n\n\ts := []string{\"a\", \"b\", \"c\"}\n\t_ = append(s)\n\nSuch calls are always no-ops and often indicate an\nunderlying mistake.",
   224  							Default: "true",
   225  						},
   226  						{
   227  							Name:    "\"asmdecl\"",
   228  							Doc:     "report mismatches between assembly files and Go declarations",
   229  							Default: "true",
   230  						},
   231  						{
   232  							Name:    "\"assign\"",
   233  							Doc:     "check for useless assignments\n\nThis checker reports assignments of the form x = x or a[i] = a[i].\nThese are almost always useless, and even when they aren't they are\nusually a mistake.",
   234  							Default: "true",
   235  						},
   236  						{
   237  							Name:    "\"atomic\"",
   238  							Doc:     "check for common mistakes using the sync/atomic package\n\nThe atomic checker looks for assignment statements of the form:\n\n\tx = atomic.AddUint64(&x, 1)\n\nwhich are not atomic.",
   239  							Default: "true",
   240  						},
   241  						{
   242  							Name:    "\"atomicalign\"",
   243  							Doc:     "check for non-64-bits-aligned arguments to sync/atomic functions",
   244  							Default: "true",
   245  						},
   246  						{
   247  							Name:    "\"bools\"",
   248  							Doc:     "check for common mistakes involving boolean operators",
   249  							Default: "true",
   250  						},
   251  						{
   252  							Name:    "\"buildtag\"",
   253  							Doc:     "check //go:build and // +build directives",
   254  							Default: "true",
   255  						},
   256  						{
   257  							Name:    "\"cgocall\"",
   258  							Doc:     "detect some violations of the cgo pointer passing rules\n\nCheck for invalid cgo pointer passing.\nThis looks for code that uses cgo to call C code passing values\nwhose types are almost always invalid according to the cgo pointer\nsharing rules.\nSpecifically, it warns about attempts to pass a Go chan, map, func,\nor slice to C, either directly, or via a pointer, array, or struct.",
   259  							Default: "true",
   260  						},
   261  						{
   262  							Name:    "\"composites\"",
   263  							Doc:     "check for unkeyed composite literals\n\nThis analyzer reports a diagnostic for composite literals of struct\ntypes imported from another package that do not use the field-keyed\nsyntax. Such literals are fragile because the addition of a new field\n(even if unexported) to the struct will cause compilation to fail.\n\nAs an example,\n\n\terr = &net.DNSConfigError{err}\n\nshould be replaced by:\n\n\terr = &net.DNSConfigError{Err: err}\n",
   264  							Default: "true",
   265  						},
   266  						{
   267  							Name:    "\"copylocks\"",
   268  							Doc:     "check for locks erroneously passed by value\n\nInadvertently copying a value containing a lock, such as sync.Mutex or\nsync.WaitGroup, may cause both copies to malfunction. Generally such\nvalues should be referred to through a pointer.",
   269  							Default: "true",
   270  						},
   271  						{
   272  							Name:    "\"deepequalerrors\"",
   273  							Doc:     "check for calls of reflect.DeepEqual on error values\n\nThe deepequalerrors checker looks for calls of the form:\n\n    reflect.DeepEqual(err1, err2)\n\nwhere err1 and err2 are errors. Using reflect.DeepEqual to compare\nerrors is discouraged.",
   274  							Default: "true",
   275  						},
   276  						{
   277  							Name:    "\"defers\"",
   278  							Doc:     "report common mistakes in defer statements\n\nThe defers analyzer reports a diagnostic when a defer statement would\nresult in a non-deferred call to time.Since, as experience has shown\nthat this is nearly always a mistake.\n\nFor example:\n\n\tstart := time.Now()\n\t...\n\tdefer recordLatency(time.Since(start)) // error: call to time.Since is not deferred\n\nThe correct code is:\n\n\tdefer func() { recordLatency(time.Since(start)) }()",
   279  							Default: "true",
   280  						},
   281  						{
   282  							Name:    "\"deprecated\"",
   283  							Doc:     "check for use of deprecated identifiers\n\nThe deprecated analyzer looks for deprecated symbols and package\nimports.\n\nSee https://go.dev/wiki/Deprecated to learn about Go's convention\nfor documenting and signaling deprecated identifiers.",
   284  							Default: "true",
   285  						},
   286  						{
   287  							Name:    "\"directive\"",
   288  							Doc:     "check Go toolchain directives such as //go:debug\n\nThis analyzer checks for problems with known Go toolchain directives\nin all Go source files in a package directory, even those excluded by\n//go:build constraints, and all non-Go source files too.\n\nFor //go:debug (see https://go.dev/doc/godebug), the analyzer checks\nthat the directives are placed only in Go source files, only above the\npackage comment, and only in package main or *_test.go files.\n\nSupport for other known directives may be added in the future.\n\nThis analyzer does not check //go:build, which is handled by the\nbuildtag analyzer.\n",
   289  							Default: "true",
   290  						},
   291  						{
   292  							Name:    "\"embed\"",
   293  							Doc:     "check //go:embed directive usage\n\nThis analyzer checks that the embed package is imported if //go:embed\ndirectives are present, providing a suggested fix to add the import if\nit is missing.\n\nThis analyzer also checks that //go:embed directives precede the\ndeclaration of a single variable.",
   294  							Default: "true",
   295  						},
   296  						{
   297  							Name:    "\"errorsas\"",
   298  							Doc:     "report passing non-pointer or non-error values to errors.As\n\nThe errorsas analysis reports calls to errors.As where the type\nof the second argument is not a pointer to a type implementing error.",
   299  							Default: "true",
   300  						},
   301  						{
   302  							Name:    "\"fieldalignment\"",
   303  							Doc:     "find structs that would use less memory if their fields were sorted\n\nThis analyzer find structs that can be rearranged to use less memory, and provides\na suggested edit with the most compact order.\n\nNote that there are two different diagnostics reported. One checks struct size,\nand the other reports \"pointer bytes\" used. Pointer bytes is how many bytes of the\nobject that the garbage collector has to potentially scan for pointers, for example:\n\n\tstruct { uint32; string }\n\nhave 16 pointer bytes because the garbage collector has to scan up through the string's\ninner pointer.\n\n\tstruct { string; *uint32 }\n\nhas 24 pointer bytes because it has to scan further through the *uint32.\n\n\tstruct { string; uint32 }\n\nhas 8 because it can stop immediately after the string pointer.\n\nBe aware that the most compact order is not always the most efficient.\nIn rare cases it may cause two variables each updated by its own goroutine\nto occupy the same CPU cache line, inducing a form of memory contention\nknown as \"false sharing\" that slows down both goroutines.\n",
   304  							Default: "false",
   305  						},
   306  						{
   307  							Name:    "\"fillreturns\"",
   308  							Doc:     "suggest fixes for errors due to an incorrect number of return values\n\nThis checker provides suggested fixes for type errors of the\ntype \"wrong number of return values (want %d, got %d)\". For example:\n\n\tfunc m() (int, string, *bool, error) {\n\t\treturn\n\t}\n\nwill turn into\n\n\tfunc m() (int, string, *bool, error) {\n\t\treturn 0, \"\", nil, nil\n\t}\n\nThis functionality is similar to https://github.com/sqs/goreturns.",
   309  							Default: "true",
   310  						},
   311  						{
   312  							Name:    "\"httpresponse\"",
   313  							Doc:     "check for mistakes using HTTP responses\n\nA common mistake when using the net/http package is to defer a function\ncall to close the http.Response Body before checking the error that\ndetermines whether the response is valid:\n\n\tresp, err := http.Head(url)\n\tdefer resp.Body.Close()\n\tif err != nil {\n\t\tlog.Fatal(err)\n\t}\n\t// (defer statement belongs here)\n\nThis checker helps uncover latent nil dereference bugs by reporting a\ndiagnostic for such mistakes.",
   314  							Default: "true",
   315  						},
   316  						{
   317  							Name:    "\"ifaceassert\"",
   318  							Doc:     "detect impossible interface-to-interface type assertions\n\nThis checker flags type assertions v.(T) and corresponding type-switch cases\nin which the static type V of v is an interface that cannot possibly implement\nthe target interface T. This occurs when V and T contain methods with the same\nname but different signatures. Example:\n\n\tvar v interface {\n\t\tRead()\n\t}\n\t_ = v.(io.Reader)\n\nThe Read method in v has a different signature than the Read method in\nio.Reader, so this assertion cannot succeed.",
   319  							Default: "true",
   320  						},
   321  						{
   322  							Name:    "\"infertypeargs\"",
   323  							Doc:     "check for unnecessary type arguments in call expressions\n\nExplicit type arguments may be omitted from call expressions if they can be\ninferred from function arguments, or from other type arguments:\n\n\tfunc f[T any](T) {}\n\t\n\tfunc _() {\n\t\tf[string](\"foo\") // string could be inferred\n\t}\n",
   324  							Default: "true",
   325  						},
   326  						{
   327  							Name:    "\"loopclosure\"",
   328  							Doc:     "check references to loop variables from within nested functions\n\nThis analyzer reports places where a function literal references the\niteration variable of an enclosing loop, and the loop calls the function\nin such a way (e.g. with go or defer) that it may outlive the loop\niteration and possibly observe the wrong value of the variable.\n\nNote: An iteration variable can only outlive a loop iteration in Go versions <=1.21.\nIn Go 1.22 and later, the loop variable lifetimes changed to create a new\niteration variable per loop iteration. (See go.dev/issue/60078.)\n\nIn this example, all the deferred functions run after the loop has\ncompleted, so all observe the final value of v [<go1.22].\n\n\tfor _, v := range list {\n\t    defer func() {\n\t        use(v) // incorrect\n\t    }()\n\t}\n\nOne fix is to create a new variable for each iteration of the loop:\n\n\tfor _, v := range list {\n\t    v := v // new var per iteration\n\t    defer func() {\n\t        use(v) // ok\n\t    }()\n\t}\n\nAfter Go version 1.22, the previous two for loops are equivalent\nand both are correct.\n\nThe next example uses a go statement and has a similar problem [<go1.22].\nIn addition, it has a data race because the loop updates v\nconcurrent with the goroutines accessing it.\n\n\tfor _, v := range elem {\n\t    go func() {\n\t        use(v)  // incorrect, and a data race\n\t    }()\n\t}\n\nA fix is the same as before. The checker also reports problems\nin goroutines started by golang.org/x/sync/errgroup.Group.\nA hard-to-spot variant of this form is common in parallel tests:\n\n\tfunc Test(t *testing.T) {\n\t    for _, test := range tests {\n\t        t.Run(test.name, func(t *testing.T) {\n\t            t.Parallel()\n\t            use(test) // incorrect, and a data race\n\t        })\n\t    }\n\t}\n\nThe t.Parallel() call causes the rest of the function to execute\nconcurrent with the loop [<go1.22].\n\nThe analyzer reports references only in the last statement,\nas it is not deep enough to understand the effects of subsequent\nstatements that might render the reference benign.\n(\"Last statement\" is defined recursively in compound\nstatements such as if, switch, and select.)\n\nSee: https://golang.org/doc/go_faq.html#closures_and_goroutines",
   329  							Default: "true",
   330  						},
   331  						{
   332  							Name:    "\"lostcancel\"",
   333  							Doc:     "check cancel func returned by context.WithCancel is called\n\nThe cancellation function returned by context.WithCancel, WithTimeout,\nand WithDeadline must be called or the new context will remain live\nuntil its parent context is cancelled.\n(The background context is never cancelled.)",
   334  							Default: "true",
   335  						},
   336  						{
   337  							Name:    "\"nilfunc\"",
   338  							Doc:     "check for useless comparisons between functions and nil\n\nA useless comparison is one like f == nil as opposed to f() == nil.",
   339  							Default: "true",
   340  						},
   341  						{
   342  							Name:    "\"nilness\"",
   343  							Doc:     "check for redundant or impossible nil comparisons\n\nThe nilness checker inspects the control-flow graph of each function in\na package and reports nil pointer dereferences, degenerate nil\npointers, and panics with nil values. A degenerate comparison is of the form\nx==nil or x!=nil where x is statically known to be nil or non-nil. These are\noften a mistake, especially in control flow related to errors. Panics with nil\nvalues are checked because they are not detectable by\n\n\tif r := recover(); r != nil {\n\nThis check reports conditions such as:\n\n\tif f == nil { // impossible condition (f is a function)\n\t}\n\nand:\n\n\tp := &v\n\t...\n\tif p != nil { // tautological condition\n\t}\n\nand:\n\n\tif p == nil {\n\t\tprint(*p) // nil dereference\n\t}\n\nand:\n\n\tif p == nil {\n\t\tpanic(p)\n\t}",
   344  							Default: "true",
   345  						},
   346  						{
   347  							Name:    "\"nonewvars\"",
   348  							Doc:     "suggested fixes for \"no new vars on left side of :=\"\n\nThis checker provides suggested fixes for type errors of the\ntype \"no new vars on left side of :=\". For example:\n\n\tz := 1\n\tz := 2\n\nwill turn into\n\n\tz := 1\n\tz = 2",
   349  							Default: "true",
   350  						},
   351  						{
   352  							Name:    "\"noresultvalues\"",
   353  							Doc:     "suggested fixes for unexpected return values\n\nThis checker provides suggested fixes for type errors of the\ntype \"no result values expected\" or \"too many return values\".\nFor example:\n\n\tfunc z() { return nil }\n\nwill turn into\n\n\tfunc z() { return }",
   354  							Default: "true",
   355  						},
   356  						{
   357  							Name:    "\"printf\"",
   358  							Doc:     "check consistency of Printf format strings and arguments\n\nThe check applies to calls of the formatting functions such as\n[fmt.Printf] and [fmt.Sprintf], as well as any detected wrappers of\nthose functions.\n\nIn this example, the %d format operator requires an integer operand:\n\n\tfmt.Printf(\"%d\", \"hello\") // fmt.Printf format %d has arg \"hello\" of wrong type string\n\nSee the documentation of the fmt package for the complete set of\nformat operators and their operand types.\n\nTo enable printf checking on a function that is not found by this\nanalyzer's heuristics (for example, because control is obscured by\ndynamic method calls), insert a bogus call:\n\n\tfunc MyPrintf(format string, args ...any) {\n\t\tif false {\n\t\t\t_ = fmt.Sprintf(format, args...) // enable printf checker\n\t\t}\n\t\t...\n\t}\n\nThe -funcs flag specifies a comma-separated list of names of additional\nknown formatting functions or methods. If the name contains a period,\nit must denote a specific function using one of the following forms:\n\n\tdir/pkg.Function\n\tdir/pkg.Type.Method\n\t(*dir/pkg.Type).Method\n\nOtherwise the name is interpreted as a case-insensitive unqualified\nidentifier such as \"errorf\". Either way, if a listed name ends in f, the\nfunction is assumed to be Printf-like, taking a format string before the\nargument list. Otherwise it is assumed to be Print-like, taking a list\nof arguments with no format string.",
   359  							Default: "true",
   360  						},
   361  						{
   362  							Name:    "\"shadow\"",
   363  							Doc:     "check for possible unintended shadowing of variables\n\nThis analyzer check for shadowed variables.\nA shadowed variable is a variable declared in an inner scope\nwith the same name and type as a variable in an outer scope,\nand where the outer variable is mentioned after the inner one\nis declared.\n\n(This definition can be refined; the module generates too many\nfalse positives and is not yet enabled by default.)\n\nFor example:\n\n\tfunc BadRead(f *os.File, buf []byte) error {\n\t\tvar err error\n\t\tfor {\n\t\t\tn, err := f.Read(buf) // shadows the function variable 'err'\n\t\t\tif err != nil {\n\t\t\t\tbreak // causes return of wrong value\n\t\t\t}\n\t\t\tfoo(buf)\n\t\t}\n\t\treturn err\n\t}",
   364  							Default: "false",
   365  						},
   366  						{
   367  							Name:    "\"shift\"",
   368  							Doc:     "check for shifts that equal or exceed the width of the integer",
   369  							Default: "true",
   370  						},
   371  						{
   372  							Name:    "\"simplifycompositelit\"",
   373  							Doc:     "check for composite literal simplifications\n\nAn array, slice, or map composite literal of the form:\n\n\t[]T{T{}, T{}}\n\nwill be simplified to:\n\n\t[]T{{}, {}}\n\nThis is one of the simplifications that \"gofmt -s\" applies.",
   374  							Default: "true",
   375  						},
   376  						{
   377  							Name:    "\"simplifyrange\"",
   378  							Doc:     "check for range statement simplifications\n\nA range of the form:\n\n\tfor x, _ = range v {...}\n\nwill be simplified to:\n\n\tfor x = range v {...}\n\nA range of the form:\n\n\tfor _ = range v {...}\n\nwill be simplified to:\n\n\tfor range v {...}\n\nThis is one of the simplifications that \"gofmt -s\" applies.",
   379  							Default: "true",
   380  						},
   381  						{
   382  							Name:    "\"simplifyslice\"",
   383  							Doc:     "check for slice simplifications\n\nA slice expression of the form:\n\n\ts[a:len(s)]\n\nwill be simplified to:\n\n\ts[a:]\n\nThis is one of the simplifications that \"gofmt -s\" applies.",
   384  							Default: "true",
   385  						},
   386  						{
   387  							Name:    "\"slog\"",
   388  							Doc:     "check for invalid structured logging calls\n\nThe slog checker looks for calls to functions from the log/slog\npackage that take alternating key-value pairs. It reports calls\nwhere an argument in a key position is neither a string nor a\nslog.Attr, and where a final key is missing its value.\nFor example,it would report\n\n\tslog.Warn(\"message\", 11, \"k\") // slog.Warn arg \"11\" should be a string or a slog.Attr\n\nand\n\n\tslog.Info(\"message\", \"k1\", v1, \"k2\") // call to slog.Info missing a final value",
   389  							Default: "true",
   390  						},
   391  						{
   392  							Name:    "\"sortslice\"",
   393  							Doc:     "check the argument type of sort.Slice\n\nsort.Slice requires an argument of a slice type. Check that\nthe interface{} value passed to sort.Slice is actually a slice.",
   394  							Default: "true",
   395  						},
   396  						{
   397  							Name:    "\"stdmethods\"",
   398  							Doc:     "check signature of methods of well-known interfaces\n\nSometimes a type may be intended to satisfy an interface but may fail to\ndo so because of a mistake in its method signature.\nFor example, the result of this WriteTo method should be (int64, error),\nnot error, to satisfy io.WriterTo:\n\n\ttype myWriterTo struct{...}\n\tfunc (myWriterTo) WriteTo(w io.Writer) error { ... }\n\nThis check ensures that each method whose name matches one of several\nwell-known interface methods from the standard library has the correct\nsignature for that interface.\n\nChecked method names include:\n\n\tFormat GobEncode GobDecode MarshalJSON MarshalXML\n\tPeek ReadByte ReadFrom ReadRune Scan Seek\n\tUnmarshalJSON UnreadByte UnreadRune WriteByte\n\tWriteTo",
   399  							Default: "true",
   400  						},
   401  						{
   402  							Name:    "\"stringintconv\"",
   403  							Doc:     "check for string(int) conversions\n\nThis checker flags conversions of the form string(x) where x is an integer\n(but not byte or rune) type. Such conversions are discouraged because they\nreturn the UTF-8 representation of the Unicode code point x, and not a decimal\nstring representation of x as one might expect. Furthermore, if x denotes an\ninvalid code point, the conversion cannot be statically rejected.\n\nFor conversions that intend on using the code point, consider replacing them\nwith string(rune(x)). Otherwise, strconv.Itoa and its equivalents return the\nstring representation of the value in the desired base.",
   404  							Default: "true",
   405  						},
   406  						{
   407  							Name:    "\"structtag\"",
   408  							Doc:     "check that struct field tags conform to reflect.StructTag.Get\n\nAlso report certain struct tags (json, xml) used with unexported fields.",
   409  							Default: "true",
   410  						},
   411  						{
   412  							Name:    "\"stubmethods\"",
   413  							Doc:     "detect missing methods and fix with stub implementations\n\nThis analyzer detects type-checking errors due to missing methods\nin assignments from concrete types to interface types, and offers\na suggested fix that will create a set of stub methods so that\nthe concrete type satisfies the interface.\n\nFor example, this function will not compile because the value\nNegativeErr{} does not implement the \"error\" interface:\n\n\tfunc sqrt(x float64) (float64, error) {\n\t\tif x < 0 {\n\t\t\treturn 0, NegativeErr{} // error: missing method\n\t\t}\n\t\t...\n\t}\n\n\ttype NegativeErr struct{}\n\nThis analyzer will suggest a fix to declare this method:\n\n\t// Error implements error.Error.\n\tfunc (NegativeErr) Error() string {\n\t\tpanic(\"unimplemented\")\n\t}\n\n(At least, it appears to behave that way, but technically it\ndoesn't use the SuggestedFix mechanism and the stub is created by\nlogic in gopls's golang.stub function.)",
   414  							Default: "true",
   415  						},
   416  						{
   417  							Name:    "\"testinggoroutine\"",
   418  							Doc:     "report calls to (*testing.T).Fatal from goroutines started by a test\n\nFunctions that abruptly terminate a test, such as the Fatal, Fatalf, FailNow, and\nSkip{,f,Now} methods of *testing.T, must be called from the test goroutine itself.\nThis checker detects calls to these functions that occur within a goroutine\nstarted by the test. For example:\n\n\tfunc TestFoo(t *testing.T) {\n\t    go func() {\n\t        t.Fatal(\"oops\") // error: (*T).Fatal called from non-test goroutine\n\t    }()\n\t}",
   419  							Default: "true",
   420  						},
   421  						{
   422  							Name:    "\"tests\"",
   423  							Doc:     "check for common mistaken usages of tests and examples\n\nThe tests checker walks Test, Benchmark, Fuzzing and Example functions checking\nmalformed names, wrong signatures and examples documenting non-existent\nidentifiers.\n\nPlease see the documentation for package testing in golang.org/pkg/testing\nfor the conventions that are enforced for Tests, Benchmarks, and Examples.",
   424  							Default: "true",
   425  						},
   426  						{
   427  							Name:    "\"timeformat\"",
   428  							Doc:     "check for calls of (time.Time).Format or time.Parse with 2006-02-01\n\nThe timeformat checker looks for time formats with the 2006-02-01 (yyyy-dd-mm)\nformat. Internationally, \"yyyy-dd-mm\" does not occur in common calendar date\nstandards, and so it is more likely that 2006-01-02 (yyyy-mm-dd) was intended.",
   429  							Default: "true",
   430  						},
   431  						{
   432  							Name:    "\"undeclaredname\"",
   433  							Doc:     "suggested fixes for \"undeclared name: <>\"\n\nThis checker provides suggested fixes for type errors of the\ntype \"undeclared name: <>\". It will either insert a new statement,\nsuch as:\n\n\t<> :=\n\nor a new function declaration, such as:\n\n\tfunc <>(inferred parameters) {\n\t\tpanic(\"implement me!\")\n\t}",
   434  							Default: "true",
   435  						},
   436  						{
   437  							Name:    "\"unmarshal\"",
   438  							Doc:     "report passing non-pointer or non-interface values to unmarshal\n\nThe unmarshal analysis reports calls to functions such as json.Unmarshal\nin which the argument type is not a pointer or an interface.",
   439  							Default: "true",
   440  						},
   441  						{
   442  							Name:    "\"unreachable\"",
   443  							Doc:     "check for unreachable code\n\nThe unreachable analyzer finds statements that execution can never reach\nbecause they are preceded by an return statement, a call to panic, an\ninfinite loop, or similar constructs.",
   444  							Default: "true",
   445  						},
   446  						{
   447  							Name:    "\"unsafeptr\"",
   448  							Doc:     "check for invalid conversions of uintptr to unsafe.Pointer\n\nThe unsafeptr analyzer reports likely incorrect uses of unsafe.Pointer\nto convert integers to pointers. A conversion from uintptr to\nunsafe.Pointer is invalid if it implies that there is a uintptr-typed\nword in memory that holds a pointer value, because that word will be\ninvisible to stack copying and to the garbage collector.",
   449  							Default: "true",
   450  						},
   451  						{
   452  							Name:    "\"unusedparams\"",
   453  							Doc:     "check for unused parameters of functions\n\nThe unusedparams analyzer checks functions to see if there are\nany parameters that are not being used.\n\nTo ensure soundness, it ignores:\n  - \"address-taken\" functions, that is, functions that are used as\n    a value rather than being called directly; their signatures may\n    be required to conform to a func type.\n  - exported functions or methods, since they may be address-taken\n    in another package.\n  - unexported methods whose name matches an interface method\n    declared in the same package, since the method's signature\n    may be required to conform to the interface type.\n  - functions with empty bodies, or containing just a call to panic.\n  - parameters that are unnamed, or named \"_\", the blank identifier.\n\nThe analyzer suggests a fix of replacing the parameter name by \"_\",\nbut in such cases a deeper fix can be obtained by invoking the\n\"Refactor: remove unused parameter\" code action, which will\neliminate the parameter entirely, along with all corresponding\narguments at call sites, while taking care to preserve any side\neffects in the argument expressions; see\nhttps://github.com/golang/tools/releases/tag/gopls%2Fv0.14.",
   454  							Default: "true",
   455  						},
   456  						{
   457  							Name:    "\"unusedresult\"",
   458  							Doc:     "check for unused results of calls to some functions\n\nSome functions like fmt.Errorf return a result and have no side\neffects, so it is always a mistake to discard the result. Other\nfunctions may return an error that must not be ignored, or a cleanup\noperation that must be called. This analyzer reports calls to\nfunctions like these when the result of the call is ignored.\n\nThe set of functions may be controlled using flags.",
   459  							Default: "true",
   460  						},
   461  						{
   462  							Name:    "\"unusedvariable\"",
   463  							Doc:     "check for unused variables and suggest fixes",
   464  							Default: "false",
   465  						},
   466  						{
   467  							Name:    "\"unusedwrite\"",
   468  							Doc:     "checks for unused writes\n\nThe analyzer reports instances of writes to struct fields and\narrays that are never read. Specifically, when a struct object\nor an array is copied, its elements are copied implicitly by\nthe compiler, and any element write to this copy does nothing\nwith the original object.\n\nFor example:\n\n\ttype T struct { x int }\n\n\tfunc f(input []T) {\n\t\tfor i, v := range input {  // v is a copy\n\t\t\tv.x = i  // unused write to field x\n\t\t}\n\t}\n\nAnother example is about non-pointer receiver:\n\n\ttype T struct { x int }\n\n\tfunc (t T) f() {  // t is a copy\n\t\tt.x = i  // unused write to field x\n\t}",
   469  							Default: "false",
   470  						},
   471  						{
   472  							Name:    "\"useany\"",
   473  							Doc:     "check for constraints that could be simplified to \"any\"",
   474  							Default: "false",
   475  						},
   476  					},
   477  				},
   478  				Default:   "{}",
   479  				Hierarchy: "ui.diagnostic",
   480  			},
   481  			{
   482  				Name:      "staticcheck",
   483  				Type:      "bool",
   484  				Doc:       "staticcheck enables additional analyses from staticcheck.io.\nThese analyses are documented on\n[Staticcheck's website](https://staticcheck.io/docs/checks/).\n",
   485  				Default:   "false",
   486  				Status:    "experimental",
   487  				Hierarchy: "ui.diagnostic",
   488  			},
   489  			{
   490  				Name: "annotations",
   491  				Type: "map[string]bool",
   492  				Doc:  "annotations specifies the various kinds of optimization diagnostics\nthat should be reported by the gc_details command.\n",
   493  				EnumKeys: EnumKeys{
   494  					ValueType: "bool",
   495  					Keys: []EnumKey{
   496  						{
   497  							Name:    "\"bounds\"",
   498  							Doc:     "`\"bounds\"` controls bounds checking diagnostics.\n",
   499  							Default: "true",
   500  						},
   501  						{
   502  							Name:    "\"escape\"",
   503  							Doc:     "`\"escape\"` controls diagnostics about escape choices.\n",
   504  							Default: "true",
   505  						},
   506  						{
   507  							Name:    "\"inline\"",
   508  							Doc:     "`\"inline\"` controls diagnostics about inlining choices.\n",
   509  							Default: "true",
   510  						},
   511  						{
   512  							Name:    "\"nil\"",
   513  							Doc:     "`\"nil\"` controls nil checks.\n",
   514  							Default: "true",
   515  						},
   516  					},
   517  				},
   518  				Default:   "{\"bounds\":true,\"escape\":true,\"inline\":true,\"nil\":true}",
   519  				Status:    "experimental",
   520  				Hierarchy: "ui.diagnostic",
   521  			},
   522  			{
   523  				Name: "vulncheck",
   524  				Type: "enum",
   525  				Doc:  "vulncheck enables vulnerability scanning.\n",
   526  				EnumValues: []EnumValue{
   527  					{
   528  						Value: "\"Imports\"",
   529  						Doc:   "`\"Imports\"`: In Imports mode, `gopls` will report vulnerabilities that affect packages\ndirectly and indirectly used by the analyzed main module.\n",
   530  					},
   531  					{
   532  						Value: "\"Off\"",
   533  						Doc:   "`\"Off\"`: Disable vulnerability analysis.\n",
   534  					},
   535  				},
   536  				Default:   "\"Off\"",
   537  				Status:    "experimental",
   538  				Hierarchy: "ui.diagnostic",
   539  			},
   540  			{
   541  				Name:      "diagnosticsDelay",
   542  				Type:      "time.Duration",
   543  				Doc:       "diagnosticsDelay controls the amount of time that gopls waits\nafter the most recent file modification before computing deep diagnostics.\nSimple diagnostics (parsing and type-checking) are always run immediately\non recently modified packages.\n\nThis option must be set to a valid duration string, for example `\"250ms\"`.\n",
   544  				Default:   "\"1s\"",
   545  				Status:    "advanced",
   546  				Hierarchy: "ui.diagnostic",
   547  			},
   548  			{
   549  				Name: "diagnosticsTrigger",
   550  				Type: "enum",
   551  				Doc:  "diagnosticsTrigger controls when to run diagnostics.\n",
   552  				EnumValues: []EnumValue{
   553  					{
   554  						Value: "\"Edit\"",
   555  						Doc:   "`\"Edit\"`: Trigger diagnostics on file edit and save. (default)\n",
   556  					},
   557  					{
   558  						Value: "\"Save\"",
   559  						Doc:   "`\"Save\"`: Trigger diagnostics only on file save. Events like initial workspace load\nor configuration change will still trigger diagnostics.\n",
   560  					},
   561  				},
   562  				Default:   "\"Edit\"",
   563  				Status:    "experimental",
   564  				Hierarchy: "ui.diagnostic",
   565  			},
   566  			{
   567  				Name:      "analysisProgressReporting",
   568  				Type:      "bool",
   569  				Doc:       "analysisProgressReporting controls whether gopls sends progress\nnotifications when construction of its index of analysis facts is taking a\nlong time. Cancelling these notifications will cancel the indexing task,\nthough it will restart after the next change in the workspace.\n\nWhen a package is opened for the first time and heavyweight analyses such as\nstaticcheck are enabled, it can take a while to construct the index of\nanalysis facts for all its dependencies. The index is cached in the\nfilesystem, so subsequent analysis should be faster.\n",
   570  				Default:   "true",
   571  				Hierarchy: "ui.diagnostic",
   572  			},
   573  			{
   574  				Name: "hints",
   575  				Type: "map[string]bool",
   576  				Doc:  "hints specify inlay hints that users want to see. A full list of hints\nthat gopls uses can be found in\n[inlayHints.md](https://github.com/golang/tools/blob/master/gopls/doc/inlayHints.md).\n",
   577  				EnumKeys: EnumKeys{Keys: []EnumKey{
   578  					{
   579  						Name:    "\"assignVariableTypes\"",
   580  						Doc:     "Enable/disable inlay hints for variable types in assign statements:\n```go\n\ti/* int*/, j/* int*/ := 0, len(r)-1\n```",
   581  						Default: "false",
   582  					},
   583  					{
   584  						Name:    "\"compositeLiteralFields\"",
   585  						Doc:     "Enable/disable inlay hints for composite literal field names:\n```go\n\t{/*in: */\"Hello, world\", /*want: */\"dlrow ,olleH\"}\n```",
   586  						Default: "false",
   587  					},
   588  					{
   589  						Name:    "\"compositeLiteralTypes\"",
   590  						Doc:     "Enable/disable inlay hints for composite literal types:\n```go\n\tfor _, c := range []struct {\n\t\tin, want string\n\t}{\n\t\t/*struct{ in string; want string }*/{\"Hello, world\", \"dlrow ,olleH\"},\n\t}\n```",
   591  						Default: "false",
   592  					},
   593  					{
   594  						Name:    "\"constantValues\"",
   595  						Doc:     "Enable/disable inlay hints for constant values:\n```go\n\tconst (\n\t\tKindNone   Kind = iota/* = 0*/\n\t\tKindPrint/*  = 1*/\n\t\tKindPrintf/* = 2*/\n\t\tKindErrorf/* = 3*/\n\t)\n```",
   596  						Default: "false",
   597  					},
   598  					{
   599  						Name:    "\"functionTypeParameters\"",
   600  						Doc:     "Enable/disable inlay hints for implicit type parameters on generic functions:\n```go\n\tmyFoo/*[int, string]*/(1, \"hello\")\n```",
   601  						Default: "false",
   602  					},
   603  					{
   604  						Name:    "\"parameterNames\"",
   605  						Doc:     "Enable/disable inlay hints for parameter names:\n```go\n\tparseInt(/* str: */ \"123\", /* radix: */ 8)\n```",
   606  						Default: "false",
   607  					},
   608  					{
   609  						Name:    "\"rangeVariableTypes\"",
   610  						Doc:     "Enable/disable inlay hints for variable types in range statements:\n```go\n\tfor k/* int*/, v/* string*/ := range []string{} {\n\t\tfmt.Println(k, v)\n\t}\n```",
   611  						Default: "false",
   612  					},
   613  				}},
   614  				Default:   "{}",
   615  				Status:    "experimental",
   616  				Hierarchy: "ui.inlayhint",
   617  			},
   618  			{
   619  				Name: "codelenses",
   620  				Type: "map[string]bool",
   621  				Doc:  "codelenses overrides the enabled/disabled state of code lenses. See the\n\"Code Lenses\" section of the\n[Settings page](https://github.com/golang/tools/blob/master/gopls/doc/settings.md#code-lenses)\nfor the list of supported lenses.\n\nExample Usage:\n\n```json5\n\"gopls\": {\n...\n  \"codelenses\": {\n    \"generate\": false,  // Don't show the `go generate` lens.\n    \"gc_details\": true  // Show a code lens toggling the display of gc's choices.\n  }\n...\n}\n```\n",
   622  				EnumKeys: EnumKeys{
   623  					ValueType: "bool",
   624  					Keys: []EnumKey{
   625  						{
   626  							Name:    "\"gc_details\"",
   627  							Doc:     "Toggle the calculation of gc annotations.",
   628  							Default: "false",
   629  						},
   630  						{
   631  							Name:    "\"generate\"",
   632  							Doc:     "Runs `go generate` for a given directory.",
   633  							Default: "true",
   634  						},
   635  						{
   636  							Name:    "\"regenerate_cgo\"",
   637  							Doc:     "Regenerates cgo definitions.",
   638  							Default: "true",
   639  						},
   640  						{
   641  							Name:    "\"run_govulncheck\"",
   642  							Doc:     "Run vulnerability check (`govulncheck`).",
   643  							Default: "false",
   644  						},
   645  						{
   646  							Name:    "\"test\"",
   647  							Doc:     "Runs `go test` for a specific set of test or benchmark functions.",
   648  							Default: "false",
   649  						},
   650  						{
   651  							Name:    "\"tidy\"",
   652  							Doc:     "Runs `go mod tidy` for a module.",
   653  							Default: "true",
   654  						},
   655  						{
   656  							Name:    "\"upgrade_dependency\"",
   657  							Doc:     "Upgrades a dependency in the go.mod file for a module.",
   658  							Default: "true",
   659  						},
   660  						{
   661  							Name:    "\"vendor\"",
   662  							Doc:     "Runs `go mod vendor` for a module.",
   663  							Default: "true",
   664  						},
   665  					},
   666  				},
   667  				Default:   "{\"gc_details\":false,\"generate\":true,\"regenerate_cgo\":true,\"tidy\":true,\"upgrade_dependency\":true,\"vendor\":true}",
   668  				Hierarchy: "ui",
   669  			},
   670  			{
   671  				Name:      "semanticTokens",
   672  				Type:      "bool",
   673  				Doc:       "semanticTokens controls whether the LSP server will send\nsemantic tokens to the client.\n",
   674  				Default:   "false",
   675  				Status:    "experimental",
   676  				Hierarchy: "ui",
   677  			},
   678  			{
   679  				Name:      "noSemanticString",
   680  				Type:      "bool",
   681  				Doc:       "noSemanticString turns off the sending of the semantic token 'string'\n",
   682  				Default:   "false",
   683  				Status:    "experimental",
   684  				Hierarchy: "ui",
   685  			},
   686  			{
   687  				Name:      "noSemanticNumber",
   688  				Type:      "bool",
   689  				Doc:       "noSemanticNumber  turns off the sending of the semantic token 'number'\n",
   690  				Default:   "false",
   691  				Status:    "experimental",
   692  				Hierarchy: "ui",
   693  			},
   694  			{
   695  				Name:      "local",
   696  				Type:      "string",
   697  				Doc:       "local is the equivalent of the `goimports -local` flag, which puts\nimports beginning with this string after third-party packages. It should\nbe the prefix of the import path whose imports should be grouped\nseparately.\n",
   698  				Default:   "\"\"",
   699  				Hierarchy: "formatting",
   700  			},
   701  			{
   702  				Name:      "gofumpt",
   703  				Type:      "bool",
   704  				Doc:       "gofumpt indicates if we should run gofumpt formatting.\n",
   705  				Default:   "false",
   706  				Hierarchy: "formatting",
   707  			},
   708  			{
   709  				Name:    "verboseOutput",
   710  				Type:    "bool",
   711  				Doc:     "verboseOutput enables additional debug logging.\n",
   712  				Default: "false",
   713  				Status:  "debug",
   714  			},
   715  		},
   716  	},
   717  	Commands: []*CommandJSON{
   718  		{
   719  			Command: "gopls.add_dependency",
   720  			Title:   "Add a dependency",
   721  			Doc:     "Adds a dependency to the go.mod file for a module.",
   722  			ArgDoc:  "{\n\t// The go.mod file URI.\n\t\"URI\": string,\n\t// Additional args to pass to the go command.\n\t\"GoCmdArgs\": []string,\n\t// Whether to add a require directive.\n\t\"AddRequire\": bool,\n}",
   723  		},
   724  		{
   725  			Command: "gopls.add_import",
   726  			Title:   "Add an import",
   727  			Doc:     "Ask the server to add an import path to a given Go file.  The method will\ncall applyEdit on the client so that clients don't have to apply the edit\nthemselves.",
   728  			ArgDoc:  "{\n\t// ImportPath is the target import path that should\n\t// be added to the URI file\n\t\"ImportPath\": string,\n\t// URI is the file that the ImportPath should be\n\t// added to\n\t\"URI\": string,\n}",
   729  		},
   730  		{
   731  			Command: "gopls.add_telemetry_counters",
   732  			Title:   "Update the given telemetry counters",
   733  			Doc:     "Gopls will prepend \"fwd/\" to all the counters updated using this command\nto avoid conflicts with other counters gopls collects.",
   734  			ArgDoc:  "{\n\t// Names and Values must have the same length.\n\t\"Names\": []string,\n\t\"Values\": []int64,\n}",
   735  		},
   736  		{
   737  			Command:   "gopls.apply_fix",
   738  			Title:     "Apply a fix",
   739  			Doc:       "Applies a fix to a region of source code.",
   740  			ArgDoc:    "{\n\t// The name of the fix to apply.\n\t//\n\t// For fixes suggested by analyzers, this is a string constant\n\t// advertised by the analyzer that matches the Category of\n\t// the analysis.Diagnostic with a SuggestedFix containing no edits.\n\t//\n\t// For fixes suggested by code actions, this is a string agreed\n\t// upon by the code action and golang.ApplyFix.\n\t\"Fix\": string,\n\t// The file URI for the document to fix.\n\t\"URI\": string,\n\t// The document range to scan for fixes.\n\t\"Range\": {\n\t\t\"start\": {\n\t\t\t\"line\": uint32,\n\t\t\t\"character\": uint32,\n\t\t},\n\t\t\"end\": {\n\t\t\t\"line\": uint32,\n\t\t\t\"character\": uint32,\n\t\t},\n\t},\n\t// Whether to resolve and return the edits.\n\t\"ResolveEdits\": bool,\n}",
   741  			ResultDoc: "{\n\t// Holds changes to existing resources.\n\t\"changes\": map[golang.org/x/tools/gopls/internal/protocol.DocumentURI][]golang.org/x/tools/gopls/internal/protocol.TextEdit,\n\t// Depending on the client capability `workspace.workspaceEdit.resourceOperations` document changes\n\t// are either an array of `TextDocumentEdit`s to express changes to n different text documents\n\t// where each text document edit addresses a specific version of a text document. Or it can contain\n\t// above `TextDocumentEdit`s mixed with create, rename and delete file / folder operations.\n\t//\n\t// Whether a client supports versioned document edits is expressed via\n\t// `workspace.workspaceEdit.documentChanges` client capability.\n\t//\n\t// If a client neither supports `documentChanges` nor `workspace.workspaceEdit.resourceOperations` then\n\t// only plain `TextEdit`s using the `changes` property are supported.\n\t\"documentChanges\": []{\n\t\t\"TextDocumentEdit\": {\n\t\t\t\"textDocument\": { ... },\n\t\t\t\"edits\": { ... },\n\t\t},\n\t\t\"RenameFile\": {\n\t\t\t\"kind\": string,\n\t\t\t\"oldUri\": string,\n\t\t\t\"newUri\": string,\n\t\t\t\"options\": { ... },\n\t\t\t\"ResourceOperation\": { ... },\n\t\t},\n\t},\n\t// A map of change annotations that can be referenced in `AnnotatedTextEdit`s or create, rename and\n\t// delete file / folder operations.\n\t//\n\t// Whether clients honor this property depends on the client capability `workspace.changeAnnotationSupport`.\n\t//\n\t// @since 3.16.0\n\t\"changeAnnotations\": map[string]golang.org/x/tools/gopls/internal/protocol.ChangeAnnotation,\n}",
   742  		},
   743  		{
   744  			Command:   "gopls.change_signature",
   745  			Title:     "Perform a \"change signature\" refactoring",
   746  			Doc:       "This command is experimental, currently only supporting parameter removal.\nIts signature will certainly change in the future (pun intended).",
   747  			ArgDoc:    "{\n\t\"RemoveParameter\": {\n\t\t\"uri\": string,\n\t\t\"range\": {\n\t\t\t\"start\": { ... },\n\t\t\t\"end\": { ... },\n\t\t},\n\t},\n\t// Whether to resolve and return the edits.\n\t\"ResolveEdits\": bool,\n}",
   748  			ResultDoc: "{\n\t// Holds changes to existing resources.\n\t\"changes\": map[golang.org/x/tools/gopls/internal/protocol.DocumentURI][]golang.org/x/tools/gopls/internal/protocol.TextEdit,\n\t// Depending on the client capability `workspace.workspaceEdit.resourceOperations` document changes\n\t// are either an array of `TextDocumentEdit`s to express changes to n different text documents\n\t// where each text document edit addresses a specific version of a text document. Or it can contain\n\t// above `TextDocumentEdit`s mixed with create, rename and delete file / folder operations.\n\t//\n\t// Whether a client supports versioned document edits is expressed via\n\t// `workspace.workspaceEdit.documentChanges` client capability.\n\t//\n\t// If a client neither supports `documentChanges` nor `workspace.workspaceEdit.resourceOperations` then\n\t// only plain `TextEdit`s using the `changes` property are supported.\n\t\"documentChanges\": []{\n\t\t\"TextDocumentEdit\": {\n\t\t\t\"textDocument\": { ... },\n\t\t\t\"edits\": { ... },\n\t\t},\n\t\t\"RenameFile\": {\n\t\t\t\"kind\": string,\n\t\t\t\"oldUri\": string,\n\t\t\t\"newUri\": string,\n\t\t\t\"options\": { ... },\n\t\t\t\"ResourceOperation\": { ... },\n\t\t},\n\t},\n\t// A map of change annotations that can be referenced in `AnnotatedTextEdit`s or create, rename and\n\t// delete file / folder operations.\n\t//\n\t// Whether clients honor this property depends on the client capability `workspace.changeAnnotationSupport`.\n\t//\n\t// @since 3.16.0\n\t\"changeAnnotations\": map[string]golang.org/x/tools/gopls/internal/protocol.ChangeAnnotation,\n}",
   749  		},
   750  		{
   751  			Command: "gopls.check_upgrades",
   752  			Title:   "Check for upgrades",
   753  			Doc:     "Checks for module upgrades.",
   754  			ArgDoc:  "{\n\t// The go.mod file URI.\n\t\"URI\": string,\n\t// The modules to check.\n\t\"Modules\": []string,\n}",
   755  		},
   756  		{
   757  			Command: "gopls.diagnose_files",
   758  			Title:   "Cause server to publish diagnostics for the specified files.",
   759  			Doc:     "This command is needed by the 'gopls {check,fix}' CLI subcommands.",
   760  			ArgDoc:  "{\n\t\"Files\": []string,\n}",
   761  		},
   762  		{
   763  			Command: "gopls.edit_go_directive",
   764  			Title:   "Run go mod edit -go=version",
   765  			Doc:     "Runs `go mod edit -go=version` for a module.",
   766  			ArgDoc:  "{\n\t// Any document URI within the relevant module.\n\t\"URI\": string,\n\t// The version to pass to `go mod edit -go`.\n\t\"Version\": string,\n}",
   767  		},
   768  		{
   769  			Command:   "gopls.fetch_vulncheck_result",
   770  			Title:     "Get known vulncheck result",
   771  			Doc:       "Fetch the result of latest vulnerability check (`govulncheck`).",
   772  			ArgDoc:    "{\n\t// The file URI.\n\t\"URI\": string,\n}",
   773  			ResultDoc: "map[golang.org/x/tools/gopls/internal/protocol.DocumentURI]*golang.org/x/tools/gopls/internal/vulncheck.Result",
   774  		},
   775  		{
   776  			Command: "gopls.gc_details",
   777  			Title:   "Toggle gc_details",
   778  			Doc:     "Toggle the calculation of gc annotations.",
   779  			ArgDoc:  "string",
   780  		},
   781  		{
   782  			Command: "gopls.generate",
   783  			Title:   "Run go generate",
   784  			Doc:     "Runs `go generate` for a given directory.",
   785  			ArgDoc:  "{\n\t// URI for the directory to generate.\n\t\"Dir\": string,\n\t// Whether to generate recursively (go generate ./...)\n\t\"Recursive\": bool,\n}",
   786  		},
   787  		{
   788  			Command: "gopls.go_get_package",
   789  			Title:   "'go get' a package",
   790  			Doc:     "Runs `go get` to fetch a package.",
   791  			ArgDoc:  "{\n\t// Any document URI within the relevant module.\n\t\"URI\": string,\n\t// The package to go get.\n\t\"Pkg\": string,\n\t\"AddRequire\": bool,\n}",
   792  		},
   793  		{
   794  			Command:   "gopls.list_imports",
   795  			Title:     "List imports of a file and its package",
   796  			Doc:       "Retrieve a list of imports in the given Go file, and the package it\nbelongs to.",
   797  			ArgDoc:    "{\n\t// The file URI.\n\t\"URI\": string,\n}",
   798  			ResultDoc: "{\n\t// Imports is a list of imports in the requested file.\n\t\"Imports\": []{\n\t\t\"Path\": string,\n\t\t\"Name\": string,\n\t},\n\t// PackageImports is a list of all imports in the requested file's package.\n\t\"PackageImports\": []{\n\t\t\"Path\": string,\n\t},\n}",
   799  		},
   800  		{
   801  			Command:   "gopls.list_known_packages",
   802  			Title:     "List known packages",
   803  			Doc:       "Retrieve a list of packages that are importable from the given URI.",
   804  			ArgDoc:    "{\n\t// The file URI.\n\t\"URI\": string,\n}",
   805  			ResultDoc: "{\n\t// Packages is a list of packages relative\n\t// to the URIArg passed by the command request.\n\t// In other words, it omits paths that are already\n\t// imported or cannot be imported due to compiler\n\t// restrictions.\n\t\"Packages\": []string,\n}",
   806  		},
   807  		{
   808  			Command: "gopls.maybe_prompt_for_telemetry",
   809  			Title:   "Prompt user to enable telemetry",
   810  			Doc:     "Checks for the right conditions, and then prompts the user\nto ask if they want to enable Go telemetry uploading. If\nthe user responds 'Yes', the telemetry mode is set to \"on\".",
   811  		},
   812  		{
   813  			Command:   "gopls.mem_stats",
   814  			Title:     "Fetch memory statistics",
   815  			Doc:       "Call runtime.GC multiple times and return memory statistics as reported by\nruntime.MemStats.\n\nThis command is used for benchmarking, and may change in the future.",
   816  			ResultDoc: "{\n\t\"HeapAlloc\": uint64,\n\t\"HeapInUse\": uint64,\n\t\"TotalAlloc\": uint64,\n}",
   817  		},
   818  		{
   819  			Command: "gopls.regenerate_cgo",
   820  			Title:   "Regenerate cgo",
   821  			Doc:     "Regenerates cgo definitions.",
   822  			ArgDoc:  "{\n\t// The file URI.\n\t\"URI\": string,\n}",
   823  		},
   824  		{
   825  			Command: "gopls.remove_dependency",
   826  			Title:   "Remove a dependency",
   827  			Doc:     "Removes a dependency from the go.mod file of a module.",
   828  			ArgDoc:  "{\n\t// The go.mod file URI.\n\t\"URI\": string,\n\t// The module path to remove.\n\t\"ModulePath\": string,\n\t// If the module is tidied apart from the one unused diagnostic, we can\n\t// run `go get module@none`, and then run `go mod tidy`. Otherwise, we\n\t// must make textual edits.\n\t\"OnlyDiagnostic\": bool,\n}",
   829  		},
   830  		{
   831  			Command: "gopls.reset_go_mod_diagnostics",
   832  			Title:   "Reset go.mod diagnostics",
   833  			Doc:     "Reset diagnostics in the go.mod file of a module.",
   834  			ArgDoc:  "{\n\t\"URIArg\": {\n\t\t\"URI\": string,\n\t},\n\t// Optional: source of the diagnostics to reset.\n\t// If not set, all resettable go.mod diagnostics will be cleared.\n\t\"DiagnosticSource\": string,\n}",
   835  		},
   836  		{
   837  			Command: "gopls.run_go_work_command",
   838  			Title:   "Run `go work [args...]`, and apply the resulting go.work",
   839  			Doc:     "edits to the current go.work file",
   840  			ArgDoc:  "{\n\t\"ViewID\": string,\n\t\"InitFirst\": bool,\n\t\"Args\": []string,\n}",
   841  		},
   842  		{
   843  			Command:   "gopls.run_govulncheck",
   844  			Title:     "Run vulncheck",
   845  			Doc:       "Run vulnerability check (`govulncheck`).",
   846  			ArgDoc:    "{\n\t// Any document in the directory from which govulncheck will run.\n\t\"URI\": string,\n\t// Package pattern. E.g. \"\", \".\", \"./...\".\n\t\"Pattern\": string,\n}",
   847  			ResultDoc: "{\n\t// Token holds the progress token for LSP workDone reporting of the vulncheck\n\t// invocation.\n\t\"Token\": interface{},\n}",
   848  		},
   849  		{
   850  			Command: "gopls.run_tests",
   851  			Title:   "Run test(s)",
   852  			Doc:     "Runs `go test` for a specific set of test or benchmark functions.",
   853  			ArgDoc:  "{\n\t// The test file containing the tests to run.\n\t\"URI\": string,\n\t// Specific test names to run, e.g. TestFoo.\n\t\"Tests\": []string,\n\t// Specific benchmarks to run, e.g. BenchmarkFoo.\n\t\"Benchmarks\": []string,\n}",
   854  		},
   855  		{
   856  			Command:   "gopls.start_debugging",
   857  			Title:     "Start the gopls debug server",
   858  			Doc:       "Start the gopls debug server if it isn't running, and return the debug\naddress.",
   859  			ArgDoc:    "{\n\t// Optional: the address (including port) for the debug server to listen on.\n\t// If not provided, the debug server will bind to \"localhost:0\", and the\n\t// full debug URL will be contained in the result.\n\t//\n\t// If there is more than one gopls instance along the serving path (i.e. you\n\t// are using a daemon), each gopls instance will attempt to start debugging.\n\t// If Addr specifies a port, only the daemon will be able to bind to that\n\t// port, and each intermediate gopls instance will fail to start debugging.\n\t// For this reason it is recommended not to specify a port (or equivalently,\n\t// to specify \":0\").\n\t//\n\t// If the server was already debugging this field has no effect, and the\n\t// result will contain the previously configured debug URL(s).\n\t\"Addr\": string,\n}",
   860  			ResultDoc: "{\n\t// The URLs to use to access the debug servers, for all gopls instances in\n\t// the serving path. For the common case of a single gopls instance (i.e. no\n\t// daemon), this will be exactly one address.\n\t//\n\t// In the case of one or more gopls instances forwarding the LSP to a daemon,\n\t// URLs will contain debug addresses for each server in the serving path, in\n\t// serving order. The daemon debug address will be the last entry in the\n\t// slice. If any intermediate gopls instance fails to start debugging, no\n\t// error will be returned but the debug URL for that server in the URLs slice\n\t// will be empty.\n\t\"URLs\": []string,\n}",
   861  		},
   862  		{
   863  			Command:   "gopls.start_profile",
   864  			Title:     "Start capturing a profile of gopls' execution",
   865  			Doc:       "Start a new pprof profile. Before using the resulting file, profiling must\nbe stopped with a corresponding call to StopProfile.\n\nThis command is intended for internal use only, by the gopls benchmark\nrunner.",
   866  			ArgDoc:    "struct{}",
   867  			ResultDoc: "struct{}",
   868  		},
   869  		{
   870  			Command:   "gopls.stop_profile",
   871  			Title:     "Stop an ongoing profile",
   872  			Doc:       "This command is intended for internal use only, by the gopls benchmark\nrunner.",
   873  			ArgDoc:    "struct{}",
   874  			ResultDoc: "{\n\t// File is the profile file name.\n\t\"File\": string,\n}",
   875  		},
   876  		{
   877  			Command: "gopls.test",
   878  			Title:   "Run test(s) (legacy)",
   879  			Doc:     "Runs `go test` for a specific set of test or benchmark functions.",
   880  			ArgDoc:  "string,\n[]string,\n[]string",
   881  		},
   882  		{
   883  			Command: "gopls.tidy",
   884  			Title:   "Run go mod tidy",
   885  			Doc:     "Runs `go mod tidy` for a module.",
   886  			ArgDoc:  "{\n\t// The file URIs.\n\t\"URIs\": []string,\n}",
   887  		},
   888  		{
   889  			Command: "gopls.toggle_gc_details",
   890  			Title:   "Toggle gc_details",
   891  			Doc:     "Toggle the calculation of gc annotations.",
   892  			ArgDoc:  "{\n\t// The file URI.\n\t\"URI\": string,\n}",
   893  		},
   894  		{
   895  			Command: "gopls.update_go_sum",
   896  			Title:   "Update go.sum",
   897  			Doc:     "Updates the go.sum file for a module.",
   898  			ArgDoc:  "{\n\t// The file URIs.\n\t\"URIs\": []string,\n}",
   899  		},
   900  		{
   901  			Command: "gopls.upgrade_dependency",
   902  			Title:   "Upgrade a dependency",
   903  			Doc:     "Upgrades a dependency in the go.mod file for a module.",
   904  			ArgDoc:  "{\n\t// The go.mod file URI.\n\t\"URI\": string,\n\t// Additional args to pass to the go command.\n\t\"GoCmdArgs\": []string,\n\t// Whether to add a require directive.\n\t\"AddRequire\": bool,\n}",
   905  		},
   906  		{
   907  			Command: "gopls.vendor",
   908  			Title:   "Run go mod vendor",
   909  			Doc:     "Runs `go mod vendor` for a module.",
   910  			ArgDoc:  "{\n\t// The file URI.\n\t\"URI\": string,\n}",
   911  		},
   912  		{
   913  			Command:   "gopls.views",
   914  			Title:     "List current Views on the server.",
   915  			Doc:       "This command is intended for use by gopls tests only.",
   916  			ResultDoc: "[]{\n\t\"ID\": string,\n\t\"Type\": string,\n\t\"Root\": string,\n\t\"Folder\": string,\n\t\"EnvOverlay\": []string,\n}",
   917  		},
   918  		{
   919  			Command:   "gopls.workspace_stats",
   920  			Title:     "Fetch workspace statistics",
   921  			Doc:       "Query statistics about workspace builds, modules, packages, and files.\n\nThis command is intended for internal use only, by the gopls stats\ncommand.",
   922  			ResultDoc: "{\n\t\"Files\": {\n\t\t\"Total\": int,\n\t\t\"Largest\": int,\n\t\t\"Errs\": int,\n\t},\n\t\"Views\": []{\n\t\t\"GoCommandVersion\": string,\n\t\t\"AllPackages\": {\n\t\t\t\"Packages\": int,\n\t\t\t\"LargestPackage\": int,\n\t\t\t\"CompiledGoFiles\": int,\n\t\t\t\"Modules\": int,\n\t\t},\n\t\t\"WorkspacePackages\": {\n\t\t\t\"Packages\": int,\n\t\t\t\"LargestPackage\": int,\n\t\t\t\"CompiledGoFiles\": int,\n\t\t\t\"Modules\": int,\n\t\t},\n\t\t\"Diagnostics\": int,\n\t},\n}",
   923  		},
   924  	},
   925  	Lenses: []*LensJSON{
   926  		{
   927  			Lens:  "gc_details",
   928  			Title: "Toggle gc_details",
   929  			Doc:   "Toggle the calculation of gc annotations.",
   930  		},
   931  		{
   932  			Lens:  "generate",
   933  			Title: "Run go generate",
   934  			Doc:   "Runs `go generate` for a given directory.",
   935  		},
   936  		{
   937  			Lens:  "regenerate_cgo",
   938  			Title: "Regenerate cgo",
   939  			Doc:   "Regenerates cgo definitions.",
   940  		},
   941  		{
   942  			Lens:  "run_govulncheck",
   943  			Title: "Run vulncheck",
   944  			Doc:   "Run vulnerability check (`govulncheck`).",
   945  		},
   946  		{
   947  			Lens:  "test",
   948  			Title: "Run test(s) (legacy)",
   949  			Doc:   "Runs `go test` for a specific set of test or benchmark functions.",
   950  		},
   951  		{
   952  			Lens:  "tidy",
   953  			Title: "Run go mod tidy",
   954  			Doc:   "Runs `go mod tidy` for a module.",
   955  		},
   956  		{
   957  			Lens:  "upgrade_dependency",
   958  			Title: "Upgrade a dependency",
   959  			Doc:   "Upgrades a dependency in the go.mod file for a module.",
   960  		},
   961  		{
   962  			Lens:  "vendor",
   963  			Title: "Run go mod vendor",
   964  			Doc:   "Runs `go mod vendor` for a module.",
   965  		},
   966  	},
   967  	Analyzers: []*AnalyzerJSON{
   968  		{
   969  			Name:    "appends",
   970  			Doc:     "check for missing values after append\n\nThis checker reports calls to append that pass\nno values to be appended to the slice.\n\n\ts := []string{\"a\", \"b\", \"c\"}\n\t_ = append(s)\n\nSuch calls are always no-ops and often indicate an\nunderlying mistake.",
   971  			URL:     "https://pkg.go.dev/golang.org/x/tools/go/analysis/passes/appends",
   972  			Default: true,
   973  		},
   974  		{
   975  			Name:    "asmdecl",
   976  			Doc:     "report mismatches between assembly files and Go declarations",
   977  			URL:     "https://pkg.go.dev/golang.org/x/tools/go/analysis/passes/asmdecl",
   978  			Default: true,
   979  		},
   980  		{
   981  			Name:    "assign",
   982  			Doc:     "check for useless assignments\n\nThis checker reports assignments of the form x = x or a[i] = a[i].\nThese are almost always useless, and even when they aren't they are\nusually a mistake.",
   983  			URL:     "https://pkg.go.dev/golang.org/x/tools/go/analysis/passes/assign",
   984  			Default: true,
   985  		},
   986  		{
   987  			Name:    "atomic",
   988  			Doc:     "check for common mistakes using the sync/atomic package\n\nThe atomic checker looks for assignment statements of the form:\n\n\tx = atomic.AddUint64(&x, 1)\n\nwhich are not atomic.",
   989  			URL:     "https://pkg.go.dev/golang.org/x/tools/go/analysis/passes/atomic",
   990  			Default: true,
   991  		},
   992  		{
   993  			Name:    "atomicalign",
   994  			Doc:     "check for non-64-bits-aligned arguments to sync/atomic functions",
   995  			URL:     "https://pkg.go.dev/golang.org/x/tools/go/analysis/passes/atomicalign",
   996  			Default: true,
   997  		},
   998  		{
   999  			Name:    "bools",
  1000  			Doc:     "check for common mistakes involving boolean operators",
  1001  			URL:     "https://pkg.go.dev/golang.org/x/tools/go/analysis/passes/bools",
  1002  			Default: true,
  1003  		},
  1004  		{
  1005  			Name:    "buildtag",
  1006  			Doc:     "check //go:build and // +build directives",
  1007  			URL:     "https://pkg.go.dev/golang.org/x/tools/go/analysis/passes/buildtag",
  1008  			Default: true,
  1009  		},
  1010  		{
  1011  			Name:    "cgocall",
  1012  			Doc:     "detect some violations of the cgo pointer passing rules\n\nCheck for invalid cgo pointer passing.\nThis looks for code that uses cgo to call C code passing values\nwhose types are almost always invalid according to the cgo pointer\nsharing rules.\nSpecifically, it warns about attempts to pass a Go chan, map, func,\nor slice to C, either directly, or via a pointer, array, or struct.",
  1013  			URL:     "https://pkg.go.dev/golang.org/x/tools/go/analysis/passes/cgocall",
  1014  			Default: true,
  1015  		},
  1016  		{
  1017  			Name:    "composites",
  1018  			Doc:     "check for unkeyed composite literals\n\nThis analyzer reports a diagnostic for composite literals of struct\ntypes imported from another package that do not use the field-keyed\nsyntax. Such literals are fragile because the addition of a new field\n(even if unexported) to the struct will cause compilation to fail.\n\nAs an example,\n\n\terr = &net.DNSConfigError{err}\n\nshould be replaced by:\n\n\terr = &net.DNSConfigError{Err: err}\n",
  1019  			URL:     "https://pkg.go.dev/golang.org/x/tools/go/analysis/passes/composite",
  1020  			Default: true,
  1021  		},
  1022  		{
  1023  			Name:    "copylocks",
  1024  			Doc:     "check for locks erroneously passed by value\n\nInadvertently copying a value containing a lock, such as sync.Mutex or\nsync.WaitGroup, may cause both copies to malfunction. Generally such\nvalues should be referred to through a pointer.",
  1025  			URL:     "https://pkg.go.dev/golang.org/x/tools/go/analysis/passes/copylocks",
  1026  			Default: true,
  1027  		},
  1028  		{
  1029  			Name:    "deepequalerrors",
  1030  			Doc:     "check for calls of reflect.DeepEqual on error values\n\nThe deepequalerrors checker looks for calls of the form:\n\n    reflect.DeepEqual(err1, err2)\n\nwhere err1 and err2 are errors. Using reflect.DeepEqual to compare\nerrors is discouraged.",
  1031  			URL:     "https://pkg.go.dev/golang.org/x/tools/go/analysis/passes/deepequalerrors",
  1032  			Default: true,
  1033  		},
  1034  		{
  1035  			Name:    "defers",
  1036  			Doc:     "report common mistakes in defer statements\n\nThe defers analyzer reports a diagnostic when a defer statement would\nresult in a non-deferred call to time.Since, as experience has shown\nthat this is nearly always a mistake.\n\nFor example:\n\n\tstart := time.Now()\n\t...\n\tdefer recordLatency(time.Since(start)) // error: call to time.Since is not deferred\n\nThe correct code is:\n\n\tdefer func() { recordLatency(time.Since(start)) }()",
  1037  			URL:     "https://pkg.go.dev/golang.org/x/tools/go/analysis/passes/defers",
  1038  			Default: true,
  1039  		},
  1040  		{
  1041  			Name:    "deprecated",
  1042  			Doc:     "check for use of deprecated identifiers\n\nThe deprecated analyzer looks for deprecated symbols and package\nimports.\n\nSee https://go.dev/wiki/Deprecated to learn about Go's convention\nfor documenting and signaling deprecated identifiers.",
  1043  			URL:     "https://pkg.go.dev/golang.org/x/tools/gopls/internal/analysis/deprecated",
  1044  			Default: true,
  1045  		},
  1046  		{
  1047  			Name:    "directive",
  1048  			Doc:     "check Go toolchain directives such as //go:debug\n\nThis analyzer checks for problems with known Go toolchain directives\nin all Go source files in a package directory, even those excluded by\n//go:build constraints, and all non-Go source files too.\n\nFor //go:debug (see https://go.dev/doc/godebug), the analyzer checks\nthat the directives are placed only in Go source files, only above the\npackage comment, and only in package main or *_test.go files.\n\nSupport for other known directives may be added in the future.\n\nThis analyzer does not check //go:build, which is handled by the\nbuildtag analyzer.\n",
  1049  			URL:     "https://pkg.go.dev/golang.org/x/tools/go/analysis/passes/directive",
  1050  			Default: true,
  1051  		},
  1052  		{
  1053  			Name:    "embed",
  1054  			Doc:     "check //go:embed directive usage\n\nThis analyzer checks that the embed package is imported if //go:embed\ndirectives are present, providing a suggested fix to add the import if\nit is missing.\n\nThis analyzer also checks that //go:embed directives precede the\ndeclaration of a single variable.",
  1055  			URL:     "https://pkg.go.dev/golang.org/x/tools/gopls/internal/analysis/embeddirective",
  1056  			Default: true,
  1057  		},
  1058  		{
  1059  			Name:    "errorsas",
  1060  			Doc:     "report passing non-pointer or non-error values to errors.As\n\nThe errorsas analysis reports calls to errors.As where the type\nof the second argument is not a pointer to a type implementing error.",
  1061  			URL:     "https://pkg.go.dev/golang.org/x/tools/go/analysis/passes/errorsas",
  1062  			Default: true,
  1063  		},
  1064  		{
  1065  			Name: "fieldalignment",
  1066  			Doc:  "find structs that would use less memory if their fields were sorted\n\nThis analyzer find structs that can be rearranged to use less memory, and provides\na suggested edit with the most compact order.\n\nNote that there are two different diagnostics reported. One checks struct size,\nand the other reports \"pointer bytes\" used. Pointer bytes is how many bytes of the\nobject that the garbage collector has to potentially scan for pointers, for example:\n\n\tstruct { uint32; string }\n\nhave 16 pointer bytes because the garbage collector has to scan up through the string's\ninner pointer.\n\n\tstruct { string; *uint32 }\n\nhas 24 pointer bytes because it has to scan further through the *uint32.\n\n\tstruct { string; uint32 }\n\nhas 8 because it can stop immediately after the string pointer.\n\nBe aware that the most compact order is not always the most efficient.\nIn rare cases it may cause two variables each updated by its own goroutine\nto occupy the same CPU cache line, inducing a form of memory contention\nknown as \"false sharing\" that slows down both goroutines.\n",
  1067  			URL:  "https://pkg.go.dev/golang.org/x/tools/go/analysis/passes/fieldalignment",
  1068  		},
  1069  		{
  1070  			Name:    "fillreturns",
  1071  			Doc:     "suggest fixes for errors due to an incorrect number of return values\n\nThis checker provides suggested fixes for type errors of the\ntype \"wrong number of return values (want %d, got %d)\". For example:\n\n\tfunc m() (int, string, *bool, error) {\n\t\treturn\n\t}\n\nwill turn into\n\n\tfunc m() (int, string, *bool, error) {\n\t\treturn 0, \"\", nil, nil\n\t}\n\nThis functionality is similar to https://github.com/sqs/goreturns.",
  1072  			URL:     "https://pkg.go.dev/golang.org/x/tools/gopls/internal/analysis/fillreturns",
  1073  			Default: true,
  1074  		},
  1075  		{
  1076  			Name:    "httpresponse",
  1077  			Doc:     "check for mistakes using HTTP responses\n\nA common mistake when using the net/http package is to defer a function\ncall to close the http.Response Body before checking the error that\ndetermines whether the response is valid:\n\n\tresp, err := http.Head(url)\n\tdefer resp.Body.Close()\n\tif err != nil {\n\t\tlog.Fatal(err)\n\t}\n\t// (defer statement belongs here)\n\nThis checker helps uncover latent nil dereference bugs by reporting a\ndiagnostic for such mistakes.",
  1078  			URL:     "https://pkg.go.dev/golang.org/x/tools/go/analysis/passes/httpresponse",
  1079  			Default: true,
  1080  		},
  1081  		{
  1082  			Name:    "ifaceassert",
  1083  			Doc:     "detect impossible interface-to-interface type assertions\n\nThis checker flags type assertions v.(T) and corresponding type-switch cases\nin which the static type V of v is an interface that cannot possibly implement\nthe target interface T. This occurs when V and T contain methods with the same\nname but different signatures. Example:\n\n\tvar v interface {\n\t\tRead()\n\t}\n\t_ = v.(io.Reader)\n\nThe Read method in v has a different signature than the Read method in\nio.Reader, so this assertion cannot succeed.",
  1084  			URL:     "https://pkg.go.dev/golang.org/x/tools/go/analysis/passes/ifaceassert",
  1085  			Default: true,
  1086  		},
  1087  		{
  1088  			Name:    "infertypeargs",
  1089  			Doc:     "check for unnecessary type arguments in call expressions\n\nExplicit type arguments may be omitted from call expressions if they can be\ninferred from function arguments, or from other type arguments:\n\n\tfunc f[T any](T) {}\n\t\n\tfunc _() {\n\t\tf[string](\"foo\") // string could be inferred\n\t}\n",
  1090  			URL:     "https://pkg.go.dev/golang.org/x/tools/gopls/internal/analysis/infertypeargs",
  1091  			Default: true,
  1092  		},
  1093  		{
  1094  			Name:    "loopclosure",
  1095  			Doc:     "check references to loop variables from within nested functions\n\nThis analyzer reports places where a function literal references the\niteration variable of an enclosing loop, and the loop calls the function\nin such a way (e.g. with go or defer) that it may outlive the loop\niteration and possibly observe the wrong value of the variable.\n\nNote: An iteration variable can only outlive a loop iteration in Go versions <=1.21.\nIn Go 1.22 and later, the loop variable lifetimes changed to create a new\niteration variable per loop iteration. (See go.dev/issue/60078.)\n\nIn this example, all the deferred functions run after the loop has\ncompleted, so all observe the final value of v [<go1.22].\n\n\tfor _, v := range list {\n\t    defer func() {\n\t        use(v) // incorrect\n\t    }()\n\t}\n\nOne fix is to create a new variable for each iteration of the loop:\n\n\tfor _, v := range list {\n\t    v := v // new var per iteration\n\t    defer func() {\n\t        use(v) // ok\n\t    }()\n\t}\n\nAfter Go version 1.22, the previous two for loops are equivalent\nand both are correct.\n\nThe next example uses a go statement and has a similar problem [<go1.22].\nIn addition, it has a data race because the loop updates v\nconcurrent with the goroutines accessing it.\n\n\tfor _, v := range elem {\n\t    go func() {\n\t        use(v)  // incorrect, and a data race\n\t    }()\n\t}\n\nA fix is the same as before. The checker also reports problems\nin goroutines started by golang.org/x/sync/errgroup.Group.\nA hard-to-spot variant of this form is common in parallel tests:\n\n\tfunc Test(t *testing.T) {\n\t    for _, test := range tests {\n\t        t.Run(test.name, func(t *testing.T) {\n\t            t.Parallel()\n\t            use(test) // incorrect, and a data race\n\t        })\n\t    }\n\t}\n\nThe t.Parallel() call causes the rest of the function to execute\nconcurrent with the loop [<go1.22].\n\nThe analyzer reports references only in the last statement,\nas it is not deep enough to understand the effects of subsequent\nstatements that might render the reference benign.\n(\"Last statement\" is defined recursively in compound\nstatements such as if, switch, and select.)\n\nSee: https://golang.org/doc/go_faq.html#closures_and_goroutines",
  1096  			URL:     "https://pkg.go.dev/golang.org/x/tools/go/analysis/passes/loopclosure",
  1097  			Default: true,
  1098  		},
  1099  		{
  1100  			Name:    "lostcancel",
  1101  			Doc:     "check cancel func returned by context.WithCancel is called\n\nThe cancellation function returned by context.WithCancel, WithTimeout,\nand WithDeadline must be called or the new context will remain live\nuntil its parent context is cancelled.\n(The background context is never cancelled.)",
  1102  			URL:     "https://pkg.go.dev/golang.org/x/tools/go/analysis/passes/lostcancel",
  1103  			Default: true,
  1104  		},
  1105  		{
  1106  			Name:    "nilfunc",
  1107  			Doc:     "check for useless comparisons between functions and nil\n\nA useless comparison is one like f == nil as opposed to f() == nil.",
  1108  			URL:     "https://pkg.go.dev/golang.org/x/tools/go/analysis/passes/nilfunc",
  1109  			Default: true,
  1110  		},
  1111  		{
  1112  			Name:    "nilness",
  1113  			Doc:     "check for redundant or impossible nil comparisons\n\nThe nilness checker inspects the control-flow graph of each function in\na package and reports nil pointer dereferences, degenerate nil\npointers, and panics with nil values. A degenerate comparison is of the form\nx==nil or x!=nil where x is statically known to be nil or non-nil. These are\noften a mistake, especially in control flow related to errors. Panics with nil\nvalues are checked because they are not detectable by\n\n\tif r := recover(); r != nil {\n\nThis check reports conditions such as:\n\n\tif f == nil { // impossible condition (f is a function)\n\t}\n\nand:\n\n\tp := &v\n\t...\n\tif p != nil { // tautological condition\n\t}\n\nand:\n\n\tif p == nil {\n\t\tprint(*p) // nil dereference\n\t}\n\nand:\n\n\tif p == nil {\n\t\tpanic(p)\n\t}",
  1114  			URL:     "https://pkg.go.dev/golang.org/x/tools/go/analysis/passes/nilness",
  1115  			Default: true,
  1116  		},
  1117  		{
  1118  			Name:    "nonewvars",
  1119  			Doc:     "suggested fixes for \"no new vars on left side of :=\"\n\nThis checker provides suggested fixes for type errors of the\ntype \"no new vars on left side of :=\". For example:\n\n\tz := 1\n\tz := 2\n\nwill turn into\n\n\tz := 1\n\tz = 2",
  1120  			URL:     "https://pkg.go.dev/golang.org/x/tools/gopls/internal/analysis/nonewvars",
  1121  			Default: true,
  1122  		},
  1123  		{
  1124  			Name:    "noresultvalues",
  1125  			Doc:     "suggested fixes for unexpected return values\n\nThis checker provides suggested fixes for type errors of the\ntype \"no result values expected\" or \"too many return values\".\nFor example:\n\n\tfunc z() { return nil }\n\nwill turn into\n\n\tfunc z() { return }",
  1126  			URL:     "https://pkg.go.dev/golang.org/x/tools/gopls/internal/analysis/noresultvars",
  1127  			Default: true,
  1128  		},
  1129  		{
  1130  			Name:    "printf",
  1131  			Doc:     "check consistency of Printf format strings and arguments\n\nThe check applies to calls of the formatting functions such as\n[fmt.Printf] and [fmt.Sprintf], as well as any detected wrappers of\nthose functions.\n\nIn this example, the %d format operator requires an integer operand:\n\n\tfmt.Printf(\"%d\", \"hello\") // fmt.Printf format %d has arg \"hello\" of wrong type string\n\nSee the documentation of the fmt package for the complete set of\nformat operators and their operand types.\n\nTo enable printf checking on a function that is not found by this\nanalyzer's heuristics (for example, because control is obscured by\ndynamic method calls), insert a bogus call:\n\n\tfunc MyPrintf(format string, args ...any) {\n\t\tif false {\n\t\t\t_ = fmt.Sprintf(format, args...) // enable printf checker\n\t\t}\n\t\t...\n\t}\n\nThe -funcs flag specifies a comma-separated list of names of additional\nknown formatting functions or methods. If the name contains a period,\nit must denote a specific function using one of the following forms:\n\n\tdir/pkg.Function\n\tdir/pkg.Type.Method\n\t(*dir/pkg.Type).Method\n\nOtherwise the name is interpreted as a case-insensitive unqualified\nidentifier such as \"errorf\". Either way, if a listed name ends in f, the\nfunction is assumed to be Printf-like, taking a format string before the\nargument list. Otherwise it is assumed to be Print-like, taking a list\nof arguments with no format string.",
  1132  			URL:     "https://pkg.go.dev/golang.org/x/tools/go/analysis/passes/printf",
  1133  			Default: true,
  1134  		},
  1135  		{
  1136  			Name: "shadow",
  1137  			Doc:  "check for possible unintended shadowing of variables\n\nThis analyzer check for shadowed variables.\nA shadowed variable is a variable declared in an inner scope\nwith the same name and type as a variable in an outer scope,\nand where the outer variable is mentioned after the inner one\nis declared.\n\n(This definition can be refined; the module generates too many\nfalse positives and is not yet enabled by default.)\n\nFor example:\n\n\tfunc BadRead(f *os.File, buf []byte) error {\n\t\tvar err error\n\t\tfor {\n\t\t\tn, err := f.Read(buf) // shadows the function variable 'err'\n\t\t\tif err != nil {\n\t\t\t\tbreak // causes return of wrong value\n\t\t\t}\n\t\t\tfoo(buf)\n\t\t}\n\t\treturn err\n\t}",
  1138  			URL:  "https://pkg.go.dev/golang.org/x/tools/go/analysis/passes/shadow",
  1139  		},
  1140  		{
  1141  			Name:    "shift",
  1142  			Doc:     "check for shifts that equal or exceed the width of the integer",
  1143  			URL:     "https://pkg.go.dev/golang.org/x/tools/go/analysis/passes/shift",
  1144  			Default: true,
  1145  		},
  1146  		{
  1147  			Name:    "simplifycompositelit",
  1148  			Doc:     "check for composite literal simplifications\n\nAn array, slice, or map composite literal of the form:\n\n\t[]T{T{}, T{}}\n\nwill be simplified to:\n\n\t[]T{{}, {}}\n\nThis is one of the simplifications that \"gofmt -s\" applies.",
  1149  			URL:     "https://pkg.go.dev/golang.org/x/tools/gopls/internal/analysis/simplifycompositelit",
  1150  			Default: true,
  1151  		},
  1152  		{
  1153  			Name:    "simplifyrange",
  1154  			Doc:     "check for range statement simplifications\n\nA range of the form:\n\n\tfor x, _ = range v {...}\n\nwill be simplified to:\n\n\tfor x = range v {...}\n\nA range of the form:\n\n\tfor _ = range v {...}\n\nwill be simplified to:\n\n\tfor range v {...}\n\nThis is one of the simplifications that \"gofmt -s\" applies.",
  1155  			URL:     "https://pkg.go.dev/golang.org/x/tools/gopls/internal/analysis/simplifyrange",
  1156  			Default: true,
  1157  		},
  1158  		{
  1159  			Name:    "simplifyslice",
  1160  			Doc:     "check for slice simplifications\n\nA slice expression of the form:\n\n\ts[a:len(s)]\n\nwill be simplified to:\n\n\ts[a:]\n\nThis is one of the simplifications that \"gofmt -s\" applies.",
  1161  			URL:     "https://pkg.go.dev/golang.org/x/tools/gopls/internal/analysis/simplifyslice",
  1162  			Default: true,
  1163  		},
  1164  		{
  1165  			Name:    "slog",
  1166  			Doc:     "check for invalid structured logging calls\n\nThe slog checker looks for calls to functions from the log/slog\npackage that take alternating key-value pairs. It reports calls\nwhere an argument in a key position is neither a string nor a\nslog.Attr, and where a final key is missing its value.\nFor example,it would report\n\n\tslog.Warn(\"message\", 11, \"k\") // slog.Warn arg \"11\" should be a string or a slog.Attr\n\nand\n\n\tslog.Info(\"message\", \"k1\", v1, \"k2\") // call to slog.Info missing a final value",
  1167  			URL:     "https://pkg.go.dev/golang.org/x/tools/go/analysis/passes/slog",
  1168  			Default: true,
  1169  		},
  1170  		{
  1171  			Name:    "sortslice",
  1172  			Doc:     "check the argument type of sort.Slice\n\nsort.Slice requires an argument of a slice type. Check that\nthe interface{} value passed to sort.Slice is actually a slice.",
  1173  			URL:     "https://pkg.go.dev/golang.org/x/tools/go/analysis/passes/sortslice",
  1174  			Default: true,
  1175  		},
  1176  		{
  1177  			Name:    "stdmethods",
  1178  			Doc:     "check signature of methods of well-known interfaces\n\nSometimes a type may be intended to satisfy an interface but may fail to\ndo so because of a mistake in its method signature.\nFor example, the result of this WriteTo method should be (int64, error),\nnot error, to satisfy io.WriterTo:\n\n\ttype myWriterTo struct{...}\n\tfunc (myWriterTo) WriteTo(w io.Writer) error { ... }\n\nThis check ensures that each method whose name matches one of several\nwell-known interface methods from the standard library has the correct\nsignature for that interface.\n\nChecked method names include:\n\n\tFormat GobEncode GobDecode MarshalJSON MarshalXML\n\tPeek ReadByte ReadFrom ReadRune Scan Seek\n\tUnmarshalJSON UnreadByte UnreadRune WriteByte\n\tWriteTo",
  1179  			URL:     "https://pkg.go.dev/golang.org/x/tools/go/analysis/passes/stdmethods",
  1180  			Default: true,
  1181  		},
  1182  		{
  1183  			Name:    "stringintconv",
  1184  			Doc:     "check for string(int) conversions\n\nThis checker flags conversions of the form string(x) where x is an integer\n(but not byte or rune) type. Such conversions are discouraged because they\nreturn the UTF-8 representation of the Unicode code point x, and not a decimal\nstring representation of x as one might expect. Furthermore, if x denotes an\ninvalid code point, the conversion cannot be statically rejected.\n\nFor conversions that intend on using the code point, consider replacing them\nwith string(rune(x)). Otherwise, strconv.Itoa and its equivalents return the\nstring representation of the value in the desired base.",
  1185  			URL:     "https://pkg.go.dev/golang.org/x/tools/go/analysis/passes/stringintconv",
  1186  			Default: true,
  1187  		},
  1188  		{
  1189  			Name:    "structtag",
  1190  			Doc:     "check that struct field tags conform to reflect.StructTag.Get\n\nAlso report certain struct tags (json, xml) used with unexported fields.",
  1191  			URL:     "https://pkg.go.dev/golang.org/x/tools/go/analysis/passes/structtag",
  1192  			Default: true,
  1193  		},
  1194  		{
  1195  			Name:    "stubmethods",
  1196  			Doc:     "detect missing methods and fix with stub implementations\n\nThis analyzer detects type-checking errors due to missing methods\nin assignments from concrete types to interface types, and offers\na suggested fix that will create a set of stub methods so that\nthe concrete type satisfies the interface.\n\nFor example, this function will not compile because the value\nNegativeErr{} does not implement the \"error\" interface:\n\n\tfunc sqrt(x float64) (float64, error) {\n\t\tif x < 0 {\n\t\t\treturn 0, NegativeErr{} // error: missing method\n\t\t}\n\t\t...\n\t}\n\n\ttype NegativeErr struct{}\n\nThis analyzer will suggest a fix to declare this method:\n\n\t// Error implements error.Error.\n\tfunc (NegativeErr) Error() string {\n\t\tpanic(\"unimplemented\")\n\t}\n\n(At least, it appears to behave that way, but technically it\ndoesn't use the SuggestedFix mechanism and the stub is created by\nlogic in gopls's golang.stub function.)",
  1197  			URL:     "https://pkg.go.dev/golang.org/x/tools/gopls/internal/analysis/stubmethods",
  1198  			Default: true,
  1199  		},
  1200  		{
  1201  			Name:    "testinggoroutine",
  1202  			Doc:     "report calls to (*testing.T).Fatal from goroutines started by a test\n\nFunctions that abruptly terminate a test, such as the Fatal, Fatalf, FailNow, and\nSkip{,f,Now} methods of *testing.T, must be called from the test goroutine itself.\nThis checker detects calls to these functions that occur within a goroutine\nstarted by the test. For example:\n\n\tfunc TestFoo(t *testing.T) {\n\t    go func() {\n\t        t.Fatal(\"oops\") // error: (*T).Fatal called from non-test goroutine\n\t    }()\n\t}",
  1203  			URL:     "https://pkg.go.dev/golang.org/x/tools/go/analysis/passes/testinggoroutine",
  1204  			Default: true,
  1205  		},
  1206  		{
  1207  			Name:    "tests",
  1208  			Doc:     "check for common mistaken usages of tests and examples\n\nThe tests checker walks Test, Benchmark, Fuzzing and Example functions checking\nmalformed names, wrong signatures and examples documenting non-existent\nidentifiers.\n\nPlease see the documentation for package testing in golang.org/pkg/testing\nfor the conventions that are enforced for Tests, Benchmarks, and Examples.",
  1209  			URL:     "https://pkg.go.dev/golang.org/x/tools/go/analysis/passes/tests",
  1210  			Default: true,
  1211  		},
  1212  		{
  1213  			Name:    "timeformat",
  1214  			Doc:     "check for calls of (time.Time).Format or time.Parse with 2006-02-01\n\nThe timeformat checker looks for time formats with the 2006-02-01 (yyyy-dd-mm)\nformat. Internationally, \"yyyy-dd-mm\" does not occur in common calendar date\nstandards, and so it is more likely that 2006-01-02 (yyyy-mm-dd) was intended.",
  1215  			URL:     "https://pkg.go.dev/golang.org/x/tools/go/analysis/passes/timeformat",
  1216  			Default: true,
  1217  		},
  1218  		{
  1219  			Name:    "undeclaredname",
  1220  			Doc:     "suggested fixes for \"undeclared name: <>\"\n\nThis checker provides suggested fixes for type errors of the\ntype \"undeclared name: <>\". It will either insert a new statement,\nsuch as:\n\n\t<> :=\n\nor a new function declaration, such as:\n\n\tfunc <>(inferred parameters) {\n\t\tpanic(\"implement me!\")\n\t}",
  1221  			URL:     "https://pkg.go.dev/golang.org/x/tools/gopls/internal/analysis/undeclaredname",
  1222  			Default: true,
  1223  		},
  1224  		{
  1225  			Name:    "unmarshal",
  1226  			Doc:     "report passing non-pointer or non-interface values to unmarshal\n\nThe unmarshal analysis reports calls to functions such as json.Unmarshal\nin which the argument type is not a pointer or an interface.",
  1227  			URL:     "https://pkg.go.dev/golang.org/x/tools/go/analysis/passes/unmarshal",
  1228  			Default: true,
  1229  		},
  1230  		{
  1231  			Name:    "unreachable",
  1232  			Doc:     "check for unreachable code\n\nThe unreachable analyzer finds statements that execution can never reach\nbecause they are preceded by an return statement, a call to panic, an\ninfinite loop, or similar constructs.",
  1233  			URL:     "https://pkg.go.dev/golang.org/x/tools/go/analysis/passes/unreachable",
  1234  			Default: true,
  1235  		},
  1236  		{
  1237  			Name:    "unsafeptr",
  1238  			Doc:     "check for invalid conversions of uintptr to unsafe.Pointer\n\nThe unsafeptr analyzer reports likely incorrect uses of unsafe.Pointer\nto convert integers to pointers. A conversion from uintptr to\nunsafe.Pointer is invalid if it implies that there is a uintptr-typed\nword in memory that holds a pointer value, because that word will be\ninvisible to stack copying and to the garbage collector.",
  1239  			URL:     "https://pkg.go.dev/golang.org/x/tools/go/analysis/passes/unsafeptr",
  1240  			Default: true,
  1241  		},
  1242  		{
  1243  			Name:    "unusedparams",
  1244  			Doc:     "check for unused parameters of functions\n\nThe unusedparams analyzer checks functions to see if there are\nany parameters that are not being used.\n\nTo ensure soundness, it ignores:\n  - \"address-taken\" functions, that is, functions that are used as\n    a value rather than being called directly; their signatures may\n    be required to conform to a func type.\n  - exported functions or methods, since they may be address-taken\n    in another package.\n  - unexported methods whose name matches an interface method\n    declared in the same package, since the method's signature\n    may be required to conform to the interface type.\n  - functions with empty bodies, or containing just a call to panic.\n  - parameters that are unnamed, or named \"_\", the blank identifier.\n\nThe analyzer suggests a fix of replacing the parameter name by \"_\",\nbut in such cases a deeper fix can be obtained by invoking the\n\"Refactor: remove unused parameter\" code action, which will\neliminate the parameter entirely, along with all corresponding\narguments at call sites, while taking care to preserve any side\neffects in the argument expressions; see\nhttps://github.com/golang/tools/releases/tag/gopls%2Fv0.14.",
  1245  			URL:     "https://pkg.go.dev/golang.org/x/tools/gopls/internal/analysis/unusedparams",
  1246  			Default: true,
  1247  		},
  1248  		{
  1249  			Name:    "unusedresult",
  1250  			Doc:     "check for unused results of calls to some functions\n\nSome functions like fmt.Errorf return a result and have no side\neffects, so it is always a mistake to discard the result. Other\nfunctions may return an error that must not be ignored, or a cleanup\noperation that must be called. This analyzer reports calls to\nfunctions like these when the result of the call is ignored.\n\nThe set of functions may be controlled using flags.",
  1251  			URL:     "https://pkg.go.dev/golang.org/x/tools/go/analysis/passes/unusedresult",
  1252  			Default: true,
  1253  		},
  1254  		{
  1255  			Name: "unusedvariable",
  1256  			Doc:  "check for unused variables and suggest fixes",
  1257  			URL:  "https://pkg.go.dev/golang.org/x/tools/gopls/internal/analysis/unusedvariable",
  1258  		},
  1259  		{
  1260  			Name: "unusedwrite",
  1261  			Doc:  "checks for unused writes\n\nThe analyzer reports instances of writes to struct fields and\narrays that are never read. Specifically, when a struct object\nor an array is copied, its elements are copied implicitly by\nthe compiler, and any element write to this copy does nothing\nwith the original object.\n\nFor example:\n\n\ttype T struct { x int }\n\n\tfunc f(input []T) {\n\t\tfor i, v := range input {  // v is a copy\n\t\t\tv.x = i  // unused write to field x\n\t\t}\n\t}\n\nAnother example is about non-pointer receiver:\n\n\ttype T struct { x int }\n\n\tfunc (t T) f() {  // t is a copy\n\t\tt.x = i  // unused write to field x\n\t}",
  1262  			URL:  "https://pkg.go.dev/golang.org/x/tools/go/analysis/passes/unusedwrite",
  1263  		},
  1264  		{
  1265  			Name: "useany",
  1266  			Doc:  "check for constraints that could be simplified to \"any\"",
  1267  			URL:  "https://pkg.go.dev/golang.org/x/tools/gopls/internal/analysis/useany",
  1268  		},
  1269  	},
  1270  	Hints: []*HintJSON{
  1271  		{
  1272  			Name: "assignVariableTypes",
  1273  			Doc:  "Enable/disable inlay hints for variable types in assign statements:\n```go\n\ti/* int*/, j/* int*/ := 0, len(r)-1\n```",
  1274  		},
  1275  		{
  1276  			Name: "compositeLiteralFields",
  1277  			Doc:  "Enable/disable inlay hints for composite literal field names:\n```go\n\t{/*in: */\"Hello, world\", /*want: */\"dlrow ,olleH\"}\n```",
  1278  		},
  1279  		{
  1280  			Name: "compositeLiteralTypes",
  1281  			Doc:  "Enable/disable inlay hints for composite literal types:\n```go\n\tfor _, c := range []struct {\n\t\tin, want string\n\t}{\n\t\t/*struct{ in string; want string }*/{\"Hello, world\", \"dlrow ,olleH\"},\n\t}\n```",
  1282  		},
  1283  		{
  1284  			Name: "constantValues",
  1285  			Doc:  "Enable/disable inlay hints for constant values:\n```go\n\tconst (\n\t\tKindNone   Kind = iota/* = 0*/\n\t\tKindPrint/*  = 1*/\n\t\tKindPrintf/* = 2*/\n\t\tKindErrorf/* = 3*/\n\t)\n```",
  1286  		},
  1287  		{
  1288  			Name: "functionTypeParameters",
  1289  			Doc:  "Enable/disable inlay hints for implicit type parameters on generic functions:\n```go\n\tmyFoo/*[int, string]*/(1, \"hello\")\n```",
  1290  		},
  1291  		{
  1292  			Name: "parameterNames",
  1293  			Doc:  "Enable/disable inlay hints for parameter names:\n```go\n\tparseInt(/* str: */ \"123\", /* radix: */ 8)\n```",
  1294  		},
  1295  		{
  1296  			Name: "rangeVariableTypes",
  1297  			Doc:  "Enable/disable inlay hints for variable types in range statements:\n```go\n\tfor k/* int*/, v/* string*/ := range []string{} {\n\t\tfmt.Println(k, v)\n\t}\n```",
  1298  		},
  1299  	},
  1300  }