Skip to content

Commit

Permalink
gopls/doc: update stale documentation and improve link names
Browse files Browse the repository at this point in the history
Following up on comments from CL 428595 and CL 426796, improve links to
'here', and update a stale comment on gopls' code location.

Updates golang/go#54509

Change-Id: Ie0e04b01b6e7193294fb9c39a809cee1a5b981c5
Reviewed-on: https://go-review.googlesource.com/c/tools/+/429215
Reviewed-by: Alan Donovan <adonovan@google.com>
gopls-CI: kokoro <noreply+kokoro@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
Run-TryBot: Robert Findley <rfindley@google.com>
  • Loading branch information
findleyr committed Sep 7, 2022
1 parent 5f27e05 commit 3ee1710
Show file tree
Hide file tree
Showing 4 changed files with 20 additions and 18 deletions.
4 changes: 2 additions & 2 deletions gopls/doc/contributing.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@ claiming it.

## Getting started

Most of the `gopls` logic is actually in the `golang.org/x/tools/gopls/internal/lsp`
directory, so you are most likely to develop in the golang.org/x/tools module.
Most of the `gopls` logic is in the `golang.org/x/tools/gopls/internal/lsp`
directory.

## Build

Expand Down
13 changes: 7 additions & 6 deletions gopls/doc/settings.md
Original file line number Diff line number Diff line change
Expand Up @@ -286,8 +286,8 @@ Default: `true`.

analyses specify analyses that the user would like to enable or disable.
A map of the names of analysis passes that should be enabled/disabled.
A full list of analyzers that gopls uses can be found
[here](https://github.com/golang/tools/blob/master/gopls/doc/analyzers.md).
A full list of analyzers that gopls uses can be found in
[analyzers.md](https://github.com/golang/tools/blob/master/gopls/doc/analyzers.md).

Example Usage:

Expand All @@ -307,7 +307,8 @@ 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/).
These analyses are documented on
[Staticcheck's website](https://staticcheck.io/docs/checks/).

Default: `false`.

Expand Down Expand Up @@ -401,9 +402,9 @@ Default: `true`.

**This setting is experimental and may be deleted.**

hints specify inlay hints that users want to see.
A full list of hints that gopls uses can be found
[here](https://github.com/golang/tools/blob/master/gopls/doc/inlayHints.md).
hints specify inlay hints that users want to see. A full list of hints
that gopls uses can be found in
[inlayHints.md](https://github.com/golang/tools/blob/master/gopls/doc/inlayHints.md).

Default: `{}`.

Expand Down
6 changes: 3 additions & 3 deletions gopls/internal/lsp/source/api_json.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

15 changes: 8 additions & 7 deletions gopls/internal/lsp/source/options.go
Original file line number Diff line number Diff line change
Expand Up @@ -65,9 +65,9 @@ import (
"golang.org/x/tools/gopls/internal/lsp/analysis/unusedvariable"
"golang.org/x/tools/gopls/internal/lsp/analysis/useany"
"golang.org/x/tools/gopls/internal/lsp/command"
"golang.org/x/tools/gopls/internal/lsp/protocol"
"golang.org/x/tools/internal/diff"
"golang.org/x/tools/internal/diff/myers"
"golang.org/x/tools/gopls/internal/lsp/protocol"
)

var (
Expand Down Expand Up @@ -386,8 +386,8 @@ type FormattingOptions struct {
type DiagnosticOptions struct {
// Analyses specify analyses that the user would like to enable or disable.
// A map of the names of analysis passes that should be enabled/disabled.
// A full list of analyzers that gopls uses can be found
// [here](https://github.com/golang/tools/blob/master/gopls/doc/analyzers.md).
// A full list of analyzers that gopls uses can be found in
// [analyzers.md](https://github.com/golang/tools/blob/master/gopls/doc/analyzers.md).
//
// Example Usage:
//
Expand All @@ -402,7 +402,8 @@ 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/).
// These analyses are documented on
// [Staticcheck's website](https://staticcheck.io/docs/checks/).
Staticcheck bool `status:"experimental"`

// Annotations specifies the various kinds of optimization diagnostics
Expand All @@ -428,9 +429,9 @@ type DiagnosticOptions struct {
}

type InlayHintOptions struct {
// Hints specify inlay hints that users want to see.
// A full list of hints that gopls uses can be found
// [here](https://github.com/golang/tools/blob/master/gopls/doc/inlayHints.md).
// Hints specify inlay hints that users want to see. A full list of hints
// that gopls uses can be found in
// [inlayHints.md](https://github.com/golang/tools/blob/master/gopls/doc/inlayHints.md).
Hints map[string]bool `status:"experimental"`
}

Expand Down

0 comments on commit 3ee1710

Please sign in to comment.