Skip to content

Commit 6755842

Browse files
jholdstockdavecgh
authored andcommitted
ci: Add godoclint linter.
The enabled linters have been selected such that they do not force missing comments to be added because this would be far too laborious. They are enough however to ensure the correctness of any comments which are already present. Also update linter to latest version.
1 parent 6402932 commit 6755842

4 files changed

Lines changed: 14 additions & 6 deletions

File tree

.github/workflows/go.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,5 +57,5 @@ jobs:
5757
uses: golangci/golangci-lint-action@1e7e51e771db61008b38414a730f564565cf7c20 # v9.2.0
5858
with:
5959
install-mode: "goinstall"
60-
version: 72798d34b1eb36745915b0d4eea5c2b3b31bdfe3 # v2.9.0
60+
version: 8f3b0c7ed018e57905fbd873c697e0b1ede605a5 # v2.11.4
6161
working-directory: ${{ matrix.module_dirs }}

.golangci.yml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ linters:
1313
- durationcheck
1414
- errchkjson
1515
- errorlint
16+
- godoclint
1617
- govet
1718
- grouper
1819
- ineffassign
@@ -30,6 +31,13 @@ linters:
3031
staticcheck:
3132
checks:
3233
- S1*
34+
godoclint:
35+
default: none
36+
enable:
37+
- pkg-doc
38+
- start-with-name
39+
- deprecated
40+
- no-unused-link
3341
formatters:
3442
enable:
3543
- gofmt

addrmgr/network.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
// Copyright (c) 2013-2014 The btcsuite developers
2-
// Copyright (c) 2015-2025 The Decred developers
2+
// Copyright (c) 2015-2026 The Decred developers
33
// Use of this source code is governed by an ISC
44
// license that can be found in the LICENSE file.
55

@@ -107,6 +107,7 @@ type NetAddressType uint8
107107
// NOTE: This specifically does not use iota since the NetAddressType is used in
108108
// serialization. These constants cannot be changed or re-used if new items are
109109
// added.
110+
// nolint: godoclint
110111
const (
111112
UnknownAddressType NetAddressType = 0
112113
IPv4Address NetAddressType = 1

internal/version/version.go

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
// Copyright (c) 2013-2014 The btcsuite developers
2-
// Copyright (c) 2015-2025 The Decred developers
2+
// Copyright (c) 2015-2026 The Decred developers
33
// Use of this source code is governed by an ISC
44
// license that can be found in the LICENSE file.
55

@@ -60,10 +60,9 @@ var (
6060
Version = "2.2.0-pre"
6161

6262
// NOTE: The following values are set via init by parsing the above Version
63-
// string.
63+
// string. These fields are the individual semantic version components that
64+
// define the application version.
6465

65-
// These fields are the individual semantic version components that define
66-
// the application version.
6766
Major uint32
6867
Minor uint32
6968
Patch uint32

0 commit comments

Comments
 (0)