Skip to content

Commit 8691bbb

Browse files
docs: update documentation assets (#6094)
Co-authored-by: Fernandez Ludovic <[email protected]>
1 parent ff63786 commit 8691bbb

File tree

7 files changed

+5286
-3
lines changed

7 files changed

+5286
-3
lines changed

.golangci.reference.yml

Lines changed: 148 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,7 @@ linters:
5959
- goconst
6060
- gocritic
6161
- gocyclo
62+
- godoclint
6263
- godot
6364
- godox
6465
- goheader
@@ -75,6 +76,7 @@ linters:
7576
- ineffassign
7677
- interfacebloat
7778
- intrange
79+
- iotamixing
7880
- ireturn
7981
- lll
8082
- loggercheck
@@ -118,6 +120,7 @@ linters:
118120
- tparallel
119121
- unconvert
120122
- unparam
123+
- unqueryvet
121124
- unused
122125
- usestdlibvars
123126
- usetesting
@@ -170,6 +173,7 @@ linters:
170173
- goconst
171174
- gocritic
172175
- gocyclo
176+
- godoclint
173177
- godot
174178
- godox
175179
- goheader
@@ -186,6 +190,7 @@ linters:
186190
- ineffassign
187191
- interfacebloat
188192
- intrange
193+
- iotamixing
189194
- ireturn
190195
- lll
191196
- loggercheck
@@ -229,6 +234,7 @@ linters:
229234
- tparallel
230235
- unconvert
231236
- unparam
237+
- unqueryvet
232238
- unused
233239
- usestdlibvars
234240
- usetesting
@@ -392,6 +398,9 @@ linters:
392398
- "0C0C"
393399

394400
embeddedstructfieldcheck:
401+
# Checks that there is an empty space between the embedded fields and regular fields.
402+
# Default: true
403+
empty-line: false
395404
# Checks that sync.Mutex and sync.RWMutex are not used as embedded fields.
396405
# Default: false
397406
forbid-mutex: true
@@ -654,6 +663,10 @@ linters:
654663
# Default: false
655664
force-assertion-description: true
656665

666+
# Force using `ToNot`, `ShouldNot` instead of `To(Not())`.
667+
# Default: false
668+
force-tonot: true
669+
657670
gochecksumtype:
658671
# Presence of `default` case in switch statements satisfies exhaustiveness, if all members are not listed.
659672
# Default: true
@@ -1263,6 +1276,74 @@ linters:
12631276
# Default: 30 (but we recommend 10-20)
12641277
min-complexity: 10
12651278

1279+
godoclint:
1280+
# Default set of rules to enable.
1281+
# Possible values are: `basic`, `all` or `none`.
1282+
# Default: `basic` (enables `pkg-doc`, `single-pkg-doc`, `start-with-name`, and `deprecated`)
1283+
default: all
1284+
1285+
# List of rules to enable in addition to the default set.
1286+
# Default: empty
1287+
enable:
1288+
# Check proper package-level godoc, if any.
1289+
# https://github.com/godoc-lint/godoc-lint?tab=readme-ov-file#pkg-doc
1290+
- pkg-doc
1291+
# Assert at most one godoc per package.
1292+
# https://github.com/godoc-lint/godoc-lint?tab=readme-ov-file#single-pkg-doc
1293+
- single-pkg-doc
1294+
# Require all packages to have a godoc.
1295+
# https://github.com/godoc-lint/godoc-lint?tab=readme-ov-file#require-pkg-doc
1296+
- require-pkg-doc
1297+
# Assert symbol godocs start with the symbol name.
1298+
# https://github.com/godoc-lint/godoc-lint?tab=readme-ov-file#start-with-name
1299+
- start-with-name
1300+
# Require godoc for all public symbols.
1301+
# https://github.com/godoc-lint/godoc-lint?tab=readme-ov-file#require-doc
1302+
- require-doc
1303+
# Assert correct formatting of deprecation notes.
1304+
# https://github.com/godoc-lint/godoc-lint?tab=readme-ov-file#deprecated
1305+
- deprecated
1306+
# Assert maximum line length for godocs.
1307+
# https://github.com/godoc-lint/godoc-lint?tab=readme-ov-file#max-len
1308+
- max-len
1309+
# Assert no unused link in godocs.
1310+
# https://github.com/godoc-lint/godoc-lint?tab=readme-ov-file#no-unused-link
1311+
- no-unused-link
1312+
1313+
# List of rules to disable.
1314+
# Default: empty
1315+
disable:
1316+
- pkg-doc
1317+
- single-pkg-doc
1318+
- require-pkg-doc
1319+
- start-with-name
1320+
- require-doc
1321+
- deprecated
1322+
- max-len
1323+
- no-unused-link
1324+
1325+
# A map for fine-tuning individual rules.
1326+
# All subkeys are optional.
1327+
options:
1328+
max-len:
1329+
# Maximum line length for godocs, not including the `// `, or `/*` or `*/` tokens.
1330+
# Default: 77
1331+
length: 127
1332+
1333+
require-doc:
1334+
# Ignore exported (public) symbols when applying the `require-doc` rule.
1335+
# Default: false
1336+
ignore-exported: true
1337+
1338+
# Ignore unexported (private) symbols when applying the `require-doc` rule.
1339+
# Default: true
1340+
ignore-unexported: false
1341+
1342+
start-with-name:
1343+
# Include unexported symbols when applying the `start-with-name` rule.
1344+
# Default: false
1345+
include-unexported: true
1346+
12661347
godot:
12671348
# Comments to be checked: `declarations`, `toplevel`, `noinline` or `all`.
12681349
# Default: declarations
@@ -1870,11 +1951,21 @@ linters:
18701951
# Default: false
18711952
skip-single-param: true
18721953

1954+
ineffassign:
1955+
# Check escaping variables of type error, may cause false positives.
1956+
# Default: false
1957+
check-escaping-errors: true
1958+
18731959
interfacebloat:
18741960
# The maximum number of methods allowed for an interface.
18751961
# Default: 10
18761962
max: 5
18771963

1964+
iotamixing:
1965+
# Whether to report individual consts rather than just the const block.
1966+
# Default: false
1967+
report-individual: true
1968+
18781969
ireturn:
18791970
# List of interfaces to allow.
18801971
# Lists of the keywords and regular expressions matched to interface or package names can be used.
@@ -2510,6 +2601,26 @@ linters:
25102601
severity: warning
25112602
disabled: false
25122603
exclude: [""]
2604+
# https://github.com/mgechev/revive/blob/HEAD/RULES_DESCRIPTIONS.md#identical-ifelseif-branches
2605+
- name: identical-ifelseif-branches
2606+
severity: warning
2607+
disabled: false
2608+
exclude: [""]
2609+
# https://github.com/mgechev/revive/blob/HEAD/RULES_DESCRIPTIONS.md#identical-ifelseif-conditions
2610+
- name: identical-ifelseif-conditions
2611+
severity: warning
2612+
disabled: false
2613+
exclude: [""]
2614+
# https://github.com/mgechev/revive/blob/HEAD/RULES_DESCRIPTIONS.md#identical-switch-branches
2615+
- name: identical-switch-branches
2616+
severity: warning
2617+
disabled: false
2618+
exclude: [""]
2619+
# https://github.com/mgechev/revive/blob/HEAD/RULES_DESCRIPTIONS.md#identical-switch-conditions
2620+
- name: identical-switch-conditions
2621+
severity: warning
2622+
disabled: false
2623+
exclude: [""]
25132624
# https://github.com/mgechev/revive/blob/HEAD/RULES_DESCRIPTIONS.md#if-return
25142625
- name: if-return
25152626
severity: warning
@@ -2593,6 +2704,13 @@ linters:
25932704
severity: warning
25942705
disabled: false
25952706
exclude: [""]
2707+
# https://github.com/mgechev/revive/blob/HEAD/RULES_DESCRIPTIONS.md#package-directory-mismatch
2708+
- name: package-directory-mismatch
2709+
severity: warning
2710+
disabled: false
2711+
exclude: [""]
2712+
arguments:
2713+
- ignore-directories: ["testcases", "testinfo"]
25962714
# https://github.com/mgechev/revive/blob/HEAD/RULES_DESCRIPTIONS.md#range
25972715
- name: range
25982716
severity: warning
@@ -2730,6 +2848,11 @@ linters:
27302848
severity: warning
27312849
disabled: false
27322850
exclude: [""]
2851+
# https://github.com/mgechev/revive/blob/HEAD/RULES_DESCRIPTIONS.md#unsecure-url-scheme
2852+
- name: unsecure-url-scheme
2853+
severity: warning
2854+
disabled: false
2855+
exclude: [""]
27332856
# https://github.com/mgechev/revive/blob/HEAD/RULES_DESCRIPTIONS.md#unused-parameter
27342857
- name: unused-parameter
27352858
severity: warning
@@ -2759,11 +2882,21 @@ linters:
27592882
severity: warning
27602883
disabled: false
27612884
exclude: [""]
2885+
# https://github.com/mgechev/revive/blob/HEAD/RULES_DESCRIPTIONS.md#use-waitgroup-go
2886+
- name: use-waitgroup-go
2887+
severity: warning
2888+
disabled: false
2889+
exclude: [""]
27622890
# https://github.com/mgechev/revive/blob/HEAD/RULES_DESCRIPTIONS.md#useless-break
27632891
- name: useless-break
27642892
severity: warning
27652893
disabled: false
27662894
exclude: [""]
2895+
# https://github.com/mgechev/revive/blob/HEAD/RULES_DESCRIPTIONS.md#useless-fallthrough
2896+
- name: useless-fallthrough
2897+
severity: warning
2898+
disabled: false
2899+
exclude: [""]
27672900
# https://github.com/mgechev/revive/blob/HEAD/RULES_DESCRIPTIONS.md#var-declaration
27682901
- name: var-declaration
27692902
severity: warning
@@ -3757,6 +3890,21 @@ linters:
37573890
# Default: false
37583891
check-exported: true
37593892

3893+
unqueryvet:
3894+
# Enable SQL builder checking.
3895+
# Default: true
3896+
check-sql-builders: false
3897+
# Regex patterns for acceptable SELECT * usage.
3898+
# Default:
3899+
# - "SELECT \\* FROM information_schema\\..*"
3900+
# - "SELECT \\* FROM pg_catalog\\..*"
3901+
# - "SELECT COUNT\\(\\*\\)"
3902+
# - "SELECT MAX\\(\\*\\)"
3903+
# - "SELECT MIN\\(\\*\\)"
3904+
allowed-patterns:
3905+
- "SELECT \\* FROM temp_.*"
3906+
- "SELECT \\* FROM.*-- migration"
3907+
37603908
unused:
37613909
# Mark all struct fields that have been written to as used.
37623910
# Default: true

docs/data/linters_info.json

Lines changed: 29 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -351,6 +351,15 @@
351351
"isSlow": false,
352352
"since": "v1.0.0"
353353
},
354+
{
355+
"name": "godoclint",
356+
"desc": "Checks Golang's documentation practice (godoc)",
357+
"loadMode": 8199,
358+
"originalURL": "https://github.com/godoc-lint/godoc-lint",
359+
"internal": false,
360+
"isSlow": false,
361+
"since": "v2.5.0"
362+
},
354363
{
355364
"name": "godot",
356365
"desc": "Check if comments end in a period",
@@ -497,7 +506,7 @@
497506
},
498507
{
499508
"name": "ineffassign",
500-
"desc": "Detects when assignments to existing variables are not used",
509+
"desc": "detects when assignments to existing variables are not used",
501510
"groups": [
502511
"standard"
503512
],
@@ -526,6 +535,15 @@
526535
"isSlow": true,
527536
"since": "v1.57.0"
528537
},
538+
{
539+
"name": "iotamixing",
540+
"desc": "checks if iotas are being used in const blocks with other non-iota declarations.",
541+
"loadMode": 8199,
542+
"originalURL": "https://github.com/AdminBenni/iota-mixing",
543+
"internal": false,
544+
"isSlow": false,
545+
"since": "v2.5.0"
546+
},
529547
{
530548
"name": "ireturn",
531549
"desc": "Accept Interfaces, Return Concrete Types",
@@ -874,7 +892,7 @@
874892
},
875893
{
876894
"name": "thelper",
877-
"desc": "thelper detects tests helpers which is not start with t.Helper() method.",
895+
"desc": "thelper detects tests helpers which do not start with the t.Helper() method.",
878896
"loadMode": 8767,
879897
"originalURL": "https://github.com/kulti/thelper",
880898
"internal": false,
@@ -916,6 +934,15 @@
916934
"isSlow": true,
917935
"since": "v1.9.0"
918936
},
937+
{
938+
"name": "unqueryvet",
939+
"desc": "detects SELECT * in SQL queries and SQL builders, preventing performance issues and encouraging explicit column selection",
940+
"loadMode": 8199,
941+
"originalURL": "https://github.com/MirrexOne/unqueryvet",
942+
"internal": false,
943+
"isSlow": false,
944+
"since": "v2.5.0"
945+
},
919946
{
920947
"name": "unused",
921948
"desc": "Checks Go code for unused constants, variables, functions and types",

docs/data/thanks.json

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,14 @@
1515
"profile": "https://github.com/sponsors/Abirdcfly",
1616
"avatar": "https://github.com/Abirdcfly.png"
1717
},
18+
{
19+
"name": "AdminBenni",
20+
"linters": [
21+
"iotamixing"
22+
],
23+
"profile": "https://github.com/sponsors/AdminBenni",
24+
"avatar": "https://github.com/AdminBenni.png"
25+
},
1826
{
1927
"name": "alecthomas",
2028
"linters": [
@@ -69,6 +77,14 @@
6977
"profile": "https://github.com/sponsors/ashanbrown",
7078
"avatar": "https://github.com/ashanbrown.png"
7179
},
80+
{
81+
"name": "babakks",
82+
"linters": [
83+
"godoclint"
84+
],
85+
"profile": "https://github.com/sponsors/babakks",
86+
"avatar": "https://github.com/babakks.png"
87+
},
7288
{
7389
"name": "bkielbasa",
7490
"linters": [
@@ -426,6 +442,14 @@
426442
"profile": "https://github.com/sponsors/mibk",
427443
"avatar": "https://github.com/mibk.png"
428444
},
445+
{
446+
"name": "MirrexOne",
447+
"linters": [
448+
"unqueryvet"
449+
],
450+
"profile": "https://github.com/sponsors/MirrexOne",
451+
"avatar": "https://github.com/MirrexOne.png"
452+
},
429453
{
430454
"name": "moricho",
431455
"linters": [

0 commit comments

Comments
 (0)