@@ -59,6 +59,7 @@ linters:
59
59
- goconst
60
60
- gocritic
61
61
- gocyclo
62
+ - godoclint
62
63
- godot
63
64
- godox
64
65
- goheader
@@ -170,6 +171,7 @@ linters:
170
171
- goconst
171
172
- gocritic
172
173
- gocyclo
174
+ - godoclint
173
175
- godot
174
176
- godox
175
177
- goheader
@@ -1266,6 +1268,115 @@ linters:
1266
1268
# Default: 30 (but we recommend 10-20)
1267
1269
min-complexity : 10
1268
1270
1271
+ godoclint :
1272
+ # List of regexp patterns matching files the linter should include. If assigned,
1273
+ # then only the files whose relative path matches any of the patterns will be
1274
+ # processed. Pattern should assume Unix-style paths ("/"-separated).
1275
+ # Default: null (include all)
1276
+ include :
1277
+ - ^pkg/
1278
+ - _foo.go$
1279
+
1280
+ # List of regexp patterns matching files the linter should skip. If assigned,
1281
+ # then only the files whose relative path does not match any of the patterns will be
1282
+ # processed. Pattern should assume Unix-style paths ("/"-separated).
1283
+ # Default: null (exclude none)
1284
+ exclude :
1285
+ - ^internal/
1286
+ - _autogenerated.go$
1287
+
1288
+ # List of rules to enable. See the linter docs for more details.
1289
+ # Default:
1290
+ # - pkg-doc
1291
+ # - single-pkg-doc
1292
+ # - start-with-name
1293
+ enable :
1294
+ # Check proper package-level godoc, if any
1295
+ - pkg-doc
1296
+ # Assert at most one godoc per package
1297
+ - single-pkg-doc
1298
+ # Require all packages to have a godoc
1299
+ - require-pkg-doc
1300
+ # Assert symbol godocs start with the symbol name
1301
+ - start-with-name
1302
+ # Require godoc for all public symbols
1303
+ - require-doc
1304
+ # Assert maximum line length for godocs
1305
+ - max-len
1306
+ # Assert no unused link in godocs
1307
+ - no-unused-link
1308
+
1309
+ # List of rules to disable, useful when using the default rules.
1310
+ # Default: null
1311
+ disable :
1312
+ - pkg-doc
1313
+ - single-pkg-doc
1314
+ - start-with-name
1315
+
1316
+ # A map for fine tuning individual rules. All sub-keys are optional.
1317
+ options :
1318
+ max-len :
1319
+ # Maximum line length for godocs, not including the `// `, or `/*` or `*/` tokens.
1320
+ # Default: 77
1321
+ length : 127
1322
+
1323
+ # Include test files when applying the `max-len` rule.
1324
+ # Default: false
1325
+ include-tests : true
1326
+
1327
+ pkg-doc :
1328
+ # The start of a valid package godoc (e.g., "Package <NAME>...").
1329
+ # Default: "Package"
1330
+ start-with : PACKAGE
1331
+
1332
+ # Include test files when applying the `pkg-doc` rule.
1333
+ # Default: false
1334
+ include-tests : true
1335
+
1336
+ single-pkg-doc :
1337
+ # Include test files when applying the `single-pkg-doc` rule.
1338
+ # Default: false
1339
+ include-tests : true
1340
+
1341
+ require-pkg-doc :
1342
+ # Include test files when applying the `require-pkg-doc` rule.
1343
+ # Default: false
1344
+ include-tests : true
1345
+
1346
+ require-doc :
1347
+ # Ignore exported (public) symbols when applying the `require-doc` rule.
1348
+ # Default: false
1349
+ ignore-exported : true
1350
+
1351
+ # Ignore unexported (private) symbols when applying the `require-doc` rule.
1352
+ # Default: true
1353
+ ignore-unexported : false
1354
+
1355
+ # Include test files when applying the `require-doc` rule.
1356
+ # Default: false
1357
+ include-tests : true
1358
+
1359
+ start-with-name :
1360
+ # Acceptable start pattern (regexp) for godocs when applying the
1361
+ # `start-with-name` rule. The `%` placeholder is where the corresponding
1362
+ # symbol name should appear. An omitted placeholder means the symbol
1363
+ # name should appear at the end of the pattern.
1364
+ # Default: "((A|a|An|an|THE|The|the) )?%"
1365
+ pattern : " %"
1366
+
1367
+ # Include unexported symbols when applying the `start-with-name` rule.
1368
+ # Default: false
1369
+ include-unexported : true
1370
+
1371
+ # Include test files when applying the `start-with-name` rule.
1372
+ # Default: false
1373
+ include-tests : false
1374
+
1375
+ no-unused-link :
1376
+ # Include test files when applying the `no-unused-link` rule.
1377
+ # Default: false
1378
+ include-tests : false
1379
+
1269
1380
godot :
1270
1381
# Comments to be checked: `declarations`, `toplevel`, `noinline` or `all`.
1271
1382
# Default: declarations
0 commit comments