Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
169 changes: 16 additions & 153 deletions docs/content/docs/product/migration-guide.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
5 changes: 2 additions & 3 deletions docs/content/docs/welcome/install.md
Original file line number Diff line number Diff line change
Expand Up @@ -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).
Expand Down
12 changes: 12 additions & 0 deletions docs/layouts/_shortcodes/details.html
Original file line number Diff line number Diff line change
@@ -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 -}}

<details class="last-of-type:hx-mb-0 hx-rounded-lg hx-bg-neutral-50 dark:hx-bg-neutral-800 hx-p-2 hx-mt-4 hx-group" {{ if not $closed }}open{{ end }}>
<summary class="hx-flex hx-items-center hx-cursor-pointer hx-select-none hx-list-none hx-p-1 hx-rounded hx-transition-colors hover:hx-bg-gray-100 dark:hover:hx-bg-neutral-800 before:hx-mr-1 before:hx-inline-block before:hx-transition-transform before:hx-content-[''] dark:before:hx-invert rtl:before:hx-rotate-180 group-open:before:hx-rotate-90">
<span class="hx-text-lg">{{ $title | markdownify }}</span>
</summary>
<div class="hx-p-2 hx-overflow-hidden">
{{ .InnerDeindent | markdownify }}
</div>
</details>
15 changes: 15 additions & 0 deletions docs/layouts/_shortcodes/image-card.html
Original file line number Diff line number Diff line change
@@ -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" -}}

<div class="hextra-card hx-group hx-flex hx-flex-col hx-justify-start hx-overflow-hidden">
<img class="hextra-card-image" src="{{ $src }}" alt="{{ $title }}" title="{{ $title }}"/>
</div>
Loading