diff --git a/docs/content/docs/product/migration-guide.md b/docs/content/docs/product/migration-guide.md index b2209fb01df5..9c18c0c69785 100644 --- a/docs/content/docs/product/migration-guide.md +++ b/docs/content/docs/product/migration-guide.md @@ -165,159 +165,22 @@ The `migrate` command automatically migrates `linters.presets` in individual lin {{< tab >}} Presets: -- bugs: - - `asasalint` - - `asciicheck` - - `bidichk` - - `bodyclose` - - `contextcheck` - - `durationcheck` - - `errcheck` - - `errchkjson` - - `errorlint` - - `exhaustive` - - `gocheckcompilerdirectives` - - `gochecksumtype` - - `gosec` - - `gosmopolitan` - - `govet` - - `loggercheck` - - `makezero` - - `musttag` - - `nilerr` - - `nilnesserr` - - `noctx` - - `protogetter` - - `reassign` - - `recvcheck` - - `rowserrcheck` - - `spancheck` - - `sqlclosecheck` - - `staticcheck` - - `testifylint` - - `zerologlint` -- comment: - - `dupword` - - `godot` - - `godox` - - `misspell` -- complexity: - - `cyclop` - - `funlen` - - `gocognit` - - `gocyclo` - - `maintidx` - - `nestif` -- error: - - `err113` - - `errcheck` - - `errorlint` - - `wrapcheck` -- format: - - `gci` - - `gofmt` - - `gofumpt` - - `goimports` -- import: - - `depguard` - - `gci` - - `goimports` - - `gomodguard` -- metalinter: - - `gocritic` - - `govet` - - `revive` - - `staticcheck` -- module: - - `depguard` - - `gomoddirectives` - - `gomodguard` -- performance: - - `bodyclose` - - `fatcontext` - - `noctx` - - `perfsprint` - - `prealloc` -- sql: - - `rowserrcheck` - - `sqlclosecheck` -- style: - - `asciicheck` - - `canonicalheader` - - `containedctx` - - `copyloopvar` - - `decorder` - - `depguard` - - `dogsled` - - `dupl` - - `err113` - - `errname` - - `exhaustruct` - - `exptostd` - - `forbidigo` - - `forcetypeassert` - - `ginkgolinter` - - `gochecknoglobals` - - `gochecknoinits` - - `goconst` - - `gocritic` - - `godot` - - `godox` - - `goheader` - - `gomoddirectives` - - `gomodguard` - - `goprintffuncname` - - `gosimple` - - `grouper` - - `iface` - - `importas` - - `inamedparam` - - `interfacebloat` - - `intrange` - - `ireturn` - - `lll` - - `loggercheck` - - `makezero` - - `mirror` - - `misspell` - - `mnd` - - `musttag` - - `nakedret` - - `nilnil` - - `nlreturn` - - `nolintlint` - - `nonamedreturns` - - `nosprintfhostport` - - `paralleltest` - - `predeclared` - - `promlinter` - - `revive` - - `sloglint` - - `stylecheck` - - `tagalign` - - `tagliatelle` - - `testpackage` - - `tparallel` - - `unconvert` - - `usestdlibvars` - - `varnamelen` - - `wastedassign` - - `whitespace` - - `wrapcheck` - - `wsl` -- test: - - `exhaustruct` - - `paralleltest` - - `testableexamples` - - `testifylint` - - `testpackage` - - `thelper` - - `tparallel` - - `usetesting` -- unused: - - `ineffassign` - - `unparam` - - `unused` +| name | linters | +|------|---------| +| bugs | `asasalint`, `asciicheck`, `bidichk`, `bodyclose`, `contextcheck`, `durationcheck`, `errcheck`, `errchkjson`, `errorlint`, `exhaustive`, `gocheckcompilerdirectives`, `gochecksumtype`, `gosec`, `gosmopolitan`, `govet`, `loggercheck`, `makezero`, `musttag`, `nilerr`, `nilnesserr`, `noctx`, `protogetter`, `reassign`, `recvcheck`, `rowserrcheck`, `spancheck`, `sqlclosecheck`, `staticcheck`, `testifylint`, `zerologlint` | +| comment | `dupword`, `godot`, `godox`, `misspell` | +| complexity | `cyclop`, `funlen`, `gocognit`, `gocyclo`, `maintidx`, `nestif` | +| error | `err113`, `errcheck`, `errorlint`, `wrapcheck` | +| format | `gci`, `gofmt`, `gofumpt`, `goimports` | +| import | `depguard`, `gci`, `goimports`, `gomodguard` | +| metalinter | `gocritic`, `govet`, `revive`, `staticcheck` | +| module | `depguard`, `gomoddirectives`, `gomodguard` | +| performance | `bodyclose`, `fatcontext`, `noctx`, `perfsprint`, `prealloc` | +| sql | `rowserrcheck`, `sqlclosecheck` | +| style | `asciicheck`, `canonicalheader`, `containedctx`, `copyloopvar`, `decorder`, `depguard`, `dogsled`, `dupl`, `err113`, `errname`, `exhaustruct`, `exptostd`, `forbidigo`, `forcetypeassert`, `ginkgolinter`, `gochecknoglobals`, `gochecknoinits`, `goconst`, `gocritic`, `godot`, `godox`, `goheader`, `gomoddirectives`, `gomodguard`, `goprintffuncname`, `gosimple`, `grouper`, `iface`, `importas`, `inamedparam`, `interfacebloat`, `intrange`, `ireturn`, `lll`, `loggercheck`, `makezero`, `mirror`, `misspell`, `mnd`, `musttag`, `nakedret`, `nilnil`, `nlreturn`, `nolintlint`, `nonamedreturns`, `nosprintfhostport`, `paralleltest`, `predeclared`, `promlinter`, `revive`, `sloglint`, `stylecheck`, `tagalign`, `tagliatelle`, `testpackage`, `tparallel`, `unconvert`, `usestdlibvars`, `varnamelen`, `wastedassign`, `whitespace`, `wrapcheck`, `wsl` | +| test | `exhaustruct`, `paralleltest`, `testableexamples`, `testifylint`, `testpackage`, `thelper`, `tparallel`, `usetesting` | +| unused | `ineffassign`, `unparam`, `unused` | + {{< /tab >}} {{< tab >}} ```yaml diff --git a/docs/content/docs/welcome/install.md b/docs/content/docs/welcome/install.md index 5c39a51534b4..fb394733f160 100644 --- a/docs/content/docs/welcome/install.md +++ b/docs/content/docs/welcome/install.md @@ -26,11 +26,10 @@ and it can be much faster than the simple binary installation. Also, the action creates GitHub annotations for found issues (you don't need to dig into build log to see found by golangci-lint issues). {{< cards cols=2 >}} - {{< card subtitle="Console Output" image="/images/colored-line-number.png" >}} - {{< card subtitle="Annotations" image="/images/annotations.png" >}} + {{< image-card src="/images/colored-line-number.png" title="Console Output" >}} + {{< image-card src="/images/annotations.png" title="Annotations" >}} {{< /cards >}} - ### GitLab CI GitLab provides a [guide for integrating golangci-lint into the Code Quality widget](https://docs.gitlab.com/ci/testing/code_quality/#golangci-lint). diff --git a/docs/layouts/_shortcodes/details.html b/docs/layouts/_shortcodes/details.html new file mode 100644 index 000000000000..42181e3364b7 --- /dev/null +++ b/docs/layouts/_shortcodes/details.html @@ -0,0 +1,12 @@ +{{- /* Modified version of https://github.com/imfing/hextra/blob/v0.9.7/layouts/shortcodes/details.html */ -}} +{{- $title := .Get "title" | default "" -}} +{{- $closed := eq (.Get "closed") "true" | default false -}} + +
+ + {{ $title | markdownify }} + +
+ {{ .InnerDeindent | markdownify }} +
+
diff --git a/docs/layouts/_shortcodes/image-card.html b/docs/layouts/_shortcodes/image-card.html new file mode 100644 index 000000000000..352686aed4cf --- /dev/null +++ b/docs/layouts/_shortcodes/image-card.html @@ -0,0 +1,15 @@ +{{- /* +Creates a card for an image. + +@param {string} src The path to the image. +@param {string} title The title text for the image. + +@example {{< image-card src="path/to/image.png" title="Image description" >}} +*/ -}} + +{{- $src := .Get "src" -}} +{{- $title := .Get "title" -}} + +
+ {{ $title }} +