Skip to content

Commit a1073b1

Browse files
authored
dev: minor doc style changes (#5999)
1 parent 8c86fdf commit a1073b1

File tree

4 files changed

+45
-156
lines changed

4 files changed

+45
-156
lines changed

docs/content/docs/product/migration-guide.md

Lines changed: 16 additions & 153 deletions
Original file line numberDiff line numberDiff line change
@@ -165,159 +165,22 @@ The `migrate` command automatically migrates `linters.presets` in individual lin
165165
{{< tab >}}
166166
Presets:
167167

168-
- bugs:
169-
- `asasalint`
170-
- `asciicheck`
171-
- `bidichk`
172-
- `bodyclose`
173-
- `contextcheck`
174-
- `durationcheck`
175-
- `errcheck`
176-
- `errchkjson`
177-
- `errorlint`
178-
- `exhaustive`
179-
- `gocheckcompilerdirectives`
180-
- `gochecksumtype`
181-
- `gosec`
182-
- `gosmopolitan`
183-
- `govet`
184-
- `loggercheck`
185-
- `makezero`
186-
- `musttag`
187-
- `nilerr`
188-
- `nilnesserr`
189-
- `noctx`
190-
- `protogetter`
191-
- `reassign`
192-
- `recvcheck`
193-
- `rowserrcheck`
194-
- `spancheck`
195-
- `sqlclosecheck`
196-
- `staticcheck`
197-
- `testifylint`
198-
- `zerologlint`
199-
- comment:
200-
- `dupword`
201-
- `godot`
202-
- `godox`
203-
- `misspell`
204-
- complexity:
205-
- `cyclop`
206-
- `funlen`
207-
- `gocognit`
208-
- `gocyclo`
209-
- `maintidx`
210-
- `nestif`
211-
- error:
212-
- `err113`
213-
- `errcheck`
214-
- `errorlint`
215-
- `wrapcheck`
216-
- format:
217-
- `gci`
218-
- `gofmt`
219-
- `gofumpt`
220-
- `goimports`
221-
- import:
222-
- `depguard`
223-
- `gci`
224-
- `goimports`
225-
- `gomodguard`
226-
- metalinter:
227-
- `gocritic`
228-
- `govet`
229-
- `revive`
230-
- `staticcheck`
231-
- module:
232-
- `depguard`
233-
- `gomoddirectives`
234-
- `gomodguard`
235-
- performance:
236-
- `bodyclose`
237-
- `fatcontext`
238-
- `noctx`
239-
- `perfsprint`
240-
- `prealloc`
241-
- sql:
242-
- `rowserrcheck`
243-
- `sqlclosecheck`
244-
- style:
245-
- `asciicheck`
246-
- `canonicalheader`
247-
- `containedctx`
248-
- `copyloopvar`
249-
- `decorder`
250-
- `depguard`
251-
- `dogsled`
252-
- `dupl`
253-
- `err113`
254-
- `errname`
255-
- `exhaustruct`
256-
- `exptostd`
257-
- `forbidigo`
258-
- `forcetypeassert`
259-
- `ginkgolinter`
260-
- `gochecknoglobals`
261-
- `gochecknoinits`
262-
- `goconst`
263-
- `gocritic`
264-
- `godot`
265-
- `godox`
266-
- `goheader`
267-
- `gomoddirectives`
268-
- `gomodguard`
269-
- `goprintffuncname`
270-
- `gosimple`
271-
- `grouper`
272-
- `iface`
273-
- `importas`
274-
- `inamedparam`
275-
- `interfacebloat`
276-
- `intrange`
277-
- `ireturn`
278-
- `lll`
279-
- `loggercheck`
280-
- `makezero`
281-
- `mirror`
282-
- `misspell`
283-
- `mnd`
284-
- `musttag`
285-
- `nakedret`
286-
- `nilnil`
287-
- `nlreturn`
288-
- `nolintlint`
289-
- `nonamedreturns`
290-
- `nosprintfhostport`
291-
- `paralleltest`
292-
- `predeclared`
293-
- `promlinter`
294-
- `revive`
295-
- `sloglint`
296-
- `stylecheck`
297-
- `tagalign`
298-
- `tagliatelle`
299-
- `testpackage`
300-
- `tparallel`
301-
- `unconvert`
302-
- `usestdlibvars`
303-
- `varnamelen`
304-
- `wastedassign`
305-
- `whitespace`
306-
- `wrapcheck`
307-
- `wsl`
308-
- test:
309-
- `exhaustruct`
310-
- `paralleltest`
311-
- `testableexamples`
312-
- `testifylint`
313-
- `testpackage`
314-
- `thelper`
315-
- `tparallel`
316-
- `usetesting`
317-
- unused:
318-
- `ineffassign`
319-
- `unparam`
320-
- `unused`
168+
| name | linters |
169+
|------|---------|
170+
| 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` |
171+
| comment | `dupword`, `godot`, `godox`, `misspell` |
172+
| complexity | `cyclop`, `funlen`, `gocognit`, `gocyclo`, `maintidx`, `nestif` |
173+
| error | `err113`, `errcheck`, `errorlint`, `wrapcheck` |
174+
| format | `gci`, `gofmt`, `gofumpt`, `goimports` |
175+
| import | `depguard`, `gci`, `goimports`, `gomodguard` |
176+
| metalinter | `gocritic`, `govet`, `revive`, `staticcheck` |
177+
| module | `depguard`, `gomoddirectives`, `gomodguard` |
178+
| performance | `bodyclose`, `fatcontext`, `noctx`, `perfsprint`, `prealloc` |
179+
| sql | `rowserrcheck`, `sqlclosecheck` |
180+
| 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` |
181+
| test | `exhaustruct`, `paralleltest`, `testableexamples`, `testifylint`, `testpackage`, `thelper`, `tparallel`, `usetesting` |
182+
| unused | `ineffassign`, `unparam`, `unused` |
183+
321184
{{< /tab >}}
322185
{{< tab >}}
323186
```yaml

docs/content/docs/welcome/install.md

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -26,11 +26,10 @@ and it can be much faster than the simple binary installation.
2626
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).
2727

2828
{{< cards cols=2 >}}
29-
{{< card subtitle="Console Output" image="/images/colored-line-number.png" >}}
30-
{{< card subtitle="Annotations" image="/images/annotations.png" >}}
29+
{{< image-card src="/images/colored-line-number.png" title="Console Output" >}}
30+
{{< image-card src="/images/annotations.png" title="Annotations" >}}
3131
{{< /cards >}}
3232

33-
3433
### GitLab CI
3534

3635
GitLab provides a [guide for integrating golangci-lint into the Code Quality widget](https://docs.gitlab.com/ci/testing/code_quality/#golangci-lint).

docs/layouts/_shortcodes/details.html

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
{{- /* Modified version of https://github.com/imfing/hextra/blob/v0.9.7/layouts/shortcodes/details.html */ -}}
2+
{{- $title := .Get "title" | default "" -}}
3+
{{- $closed := eq (.Get "closed") "true" | default false -}}
4+
5+
<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 }}>
6+
<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">
7+
<span class="hx-text-lg">{{ $title | markdownify }}</span>
8+
</summary>
9+
<div class="hx-p-2 hx-overflow-hidden">
10+
{{ .InnerDeindent | markdownify }}
11+
</div>
12+
</details>
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
{{- /*
2+
Creates a card for an image.
3+
4+
@param {string} src The path to the image.
5+
@param {string} title The title text for the image.
6+
7+
@example {{< image-card src="path/to/image.png" title="Image description" >}}
8+
*/ -}}
9+
10+
{{- $src := .Get "src" -}}
11+
{{- $title := .Get "title" -}}
12+
13+
<div class="hextra-card hx-group hx-flex hx-flex-col hx-justify-start hx-overflow-hidden">
14+
<img class="hextra-card-image" src="{{ $src }}" alt="{{ $title }}" title="{{ $title }}"/>
15+
</div>

0 commit comments

Comments
 (0)