From 185e85cb55edc0b17c9bbd28dbf7a97d8f066efd Mon Sep 17 00:00:00 2001 From: Fernandez Ludovic Date: Wed, 26 Jun 2024 09:03:22 +0200 Subject: [PATCH] docs: add an icon to display if a linter has a confiiguration or not --- docs/src/docs/usage/linters.mdx | 2 +- scripts/website/expand_templates/linters.go | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/docs/src/docs/usage/linters.mdx b/docs/src/docs/usage/linters.mdx index a717d54b21af..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, FaArrowUp } 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 e79d250c06b9..465f35e4b101 100644 --- a/scripts/website/expand_templates/linters.go +++ b/scripts/website/expand_templates/linters.go @@ -92,8 +92,8 @@ func getLintersListMarkdown(enabled bool) string { func getName(lc *types.LinterWrapper) string { name := spanWithID(listItemPrefix+lc.Name, "", "") - if hasSettings(lc.Name) { - name += fmt.Sprintf("[%[1]s](#%[1]s \"%[1]s configuration\")", 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) }