From 83d76192b23f16fb924f90e0c223f8a63295d28c Mon Sep 17 00:00:00 2001 From: Peter Weinberger Date: Tue, 6 Sep 2022 10:27:50 -0400 Subject: [PATCH] gopls : add a mention of staticcheck to settings documentation Fixes golang/go#52874 Change-Id: I04664154d68e31f48234c13aefe8470b09f0413e Reviewed-on: https://go-review.googlesource.com/c/tools/+/428595 TryBot-Result: Gopher Robot Run-TryBot: Peter Weinberger Reviewed-by: Robert Findley --- gopls/doc/settings.md | 1 + internal/lsp/source/api_json.go | 2 +- internal/lsp/source/options.go | 1 + 3 files changed, 3 insertions(+), 1 deletion(-) diff --git a/gopls/doc/settings.md b/gopls/doc/settings.md index f71bbebdce9..43dd54b074a 100644 --- a/gopls/doc/settings.md +++ b/gopls/doc/settings.md @@ -307,6 +307,7 @@ Default: `{}`. **This setting is experimental and may be deleted.** staticcheck enables additional analyses from staticcheck.io. +These analyses are documented at [here](https://staticcheck.io/docs/checks/). Default: `false`. diff --git a/internal/lsp/source/api_json.go b/internal/lsp/source/api_json.go index f6833fe3df8..94e6b1d2a89 100755 --- a/internal/lsp/source/api_json.go +++ b/internal/lsp/source/api_json.go @@ -461,7 +461,7 @@ var GeneratedAPIJSON = &APIJSON{ { Name: "staticcheck", Type: "bool", - Doc: "staticcheck enables additional analyses from staticcheck.io.\n", + Doc: "staticcheck enables additional analyses from staticcheck.io.\nThese analyses are documented at [here](https://staticcheck.io/docs/checks/).\n", Default: "false", Status: "experimental", Hierarchy: "ui.diagnostic", diff --git a/internal/lsp/source/options.go b/internal/lsp/source/options.go index 096f1acf9a4..984f228163b 100644 --- a/internal/lsp/source/options.go +++ b/internal/lsp/source/options.go @@ -402,6 +402,7 @@ type DiagnosticOptions struct { Analyses map[string]bool // Staticcheck enables additional analyses from staticcheck.io. + // These analyses are documented at [here](https://staticcheck.io/docs/checks/). Staticcheck bool `status:"experimental"` // Annotations specifies the various kinds of optimization diagnostics