diff --git a/docs/src/docs/contributing/workflow.mdx b/docs/src/docs/contributing/workflow.mdx index 531196b76e70..e534a27a9502 100644 --- a/docs/src/docs/contributing/workflow.mdx +++ b/docs/src/docs/contributing/workflow.mdx @@ -36,7 +36,7 @@ Which runs all the linters and tests. ## Create or update parameters for docs -Add your new or updated parameters to `.golangci.reference.yml` so they will be shown in the docs +Add your new or updated parameters to `.golangci.next.reference.yml` so they will be shown in the docs ## Submit a pull request diff --git a/docs/src/docs/usage/linters.mdx b/docs/src/docs/usage/linters.mdx index 00fe3280bfc8..d820b3327420 100644 --- a/docs/src/docs/usage/linters.mdx +++ b/docs/src/docs/usage/linters.mdx @@ -2,7 +2,7 @@ title: Linters --- -import { FaGithub, FaGitlab } from "react-icons/fa"; +import { FaGithub, FaGitlab, FaArrowUp, FaCog } from "react-icons/fa"; To see a list of supported linters and which linters are enabled/disabled: diff --git a/scripts/website/expand_templates/linters.go b/scripts/website/expand_templates/linters.go index 1b1e302395fe..465f35e4b101 100644 --- a/scripts/website/expand_templates/linters.go +++ b/scripts/website/expand_templates/linters.go @@ -90,10 +90,12 @@ func getLintersListMarkdown(enabled bool) string { } func getName(lc *types.LinterWrapper) string { - name := lc.Name + name := spanWithID(listItemPrefix+lc.Name, "", "") - if hasSettings(lc.Name) { - name = fmt.Sprintf("[%[1]s](#%[2]s \"%[1]s configuration\")", name, lc.Name) + if hasSettings(lc.Name) && lc.Deprecation == nil { + name += fmt.Sprintf("[%[1]s %[2]s](#%[1]s \"%[1]s configuration\")", lc.Name, "") + } else { + name += fmt.Sprintf("%[1]s[%[2]s](#%[2]s \"%[2]s has no configuration\")", spanWithID(lc.Name, "", ""), lc.Name) } if lc.OriginalURL != "" { @@ -102,7 +104,7 @@ func getName(lc *types.LinterWrapper) string { icon = "" } - name = fmt.Sprintf("%s [%s](%s)", name, spanWithID(listItemPrefix+lc.Name, lc.Name+" repository", icon), lc.OriginalURL) + name += fmt.Sprintf(" [%s](%s)", span(lc.Name+" repository", icon), lc.OriginalURL) } if lc.Deprecation == nil { @@ -322,7 +324,7 @@ func getLintersSettingSections(node, nextNode *yaml.Node) (string, error) { _, _ = fmt.Fprintln(builder, "```") _, _ = fmt.Fprintln(builder) - _, _ = fmt.Fprintf(builder, "[%s](#%s)\n\n", span("Back to the top", "🔼"), listItemPrefix+nextNode.Content[i].Value) + _, _ = fmt.Fprintf(builder, "[%s](#%s)\n\n", span("Back to the top", ""), listItemPrefix+nextNode.Content[i].Value) _, _ = fmt.Fprintln(builder) }