docs: improve linters page (#4571)
This commit is contained in:
parent
94a0179309
commit
9ec57c8dde
@ -2,6 +2,8 @@
|
||||
title: Linters
|
||||
---
|
||||
|
||||
import { FaGithub, FaGitlab } from "react-icons/fa";
|
||||
|
||||
To see a list of supported linters and which linters are enabled/disabled:
|
||||
|
||||
```sh
|
||||
|
@ -75,12 +75,17 @@ func getLintersListMarkdown(enabled bool) string {
|
||||
func getName(lc *types.LinterWrapper) string {
|
||||
name := lc.Name
|
||||
|
||||
if lc.OriginalURL != "" {
|
||||
name = fmt.Sprintf("[%s](%s)", name, lc.OriginalURL)
|
||||
if hasSettings(lc.Name) {
|
||||
name = fmt.Sprintf("[%[1]s](#%[2]s \"%[1]s configuration\")", name, lc.Name)
|
||||
}
|
||||
|
||||
if hasSettings(lc.Name) {
|
||||
name = fmt.Sprintf("%s [%s](#%s)", name, spanWithID(listItemPrefix+lc.Name, "Configuration", "⚙️"), lc.Name)
|
||||
if lc.OriginalURL != "" {
|
||||
icon := "<FaGithub size={'0.8rem'} />"
|
||||
if strings.Contains(lc.OriginalURL, "gitlab") {
|
||||
icon = "<FaGitlab size={'0.8rem'} />"
|
||||
}
|
||||
|
||||
name = fmt.Sprintf("%s [%s](%s)", name, spanWithID(listItemPrefix+lc.Name, lc.Name+" repository", icon), lc.OriginalURL)
|
||||
}
|
||||
|
||||
if lc.Deprecation == nil {
|
||||
|
Loading…
x
Reference in New Issue
Block a user