Skip to content

Commit dfbd50b

Browse files
committed
Run linter in local dev, not just CI.
1 parent ecd350b commit dfbd50b

File tree

5 files changed

+10
-14
lines changed

5 files changed

+10
-14
lines changed

LICENSE

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
ISC License
22

3-
Copyright (c) 2015-2023, The Decred developers
3+
Copyright (c) 2015-2025, The Decred developers
44
Copyright (c) 2017, Jonathan Chappelow
55

66
Permission to use, copy, modify, and/or distribute this software for any

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ information about consensus rule voting.
1010

1111
## Developing
1212

13-
It is recommended to use Go 1.17 (or newer) for development.
13+
It is recommended to use Go 1.24 (or newer) for development.
1414

1515
To build the code:
1616

lint.sh

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
#!/usr/bin/env bash
2+
3+
golangci-lint run

main.go

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

@@ -57,7 +57,7 @@ var (
5757
"changesubsidysplit": "Change PoW/PoS Subsidy Split",
5858
"changesubsidysplitr2": "Change PoW/PoS Subsidy Split To 1/89",
5959
"blake3pow": "Change PoW to BLAKE3 and ASERT",
60-
"maxtreasuryspend": "Change maximum treasury expenditure policy",
60+
"maxtreasuryspend": "Change Maximum Treasury Expenditure Policy",
6161
}
6262
longAgendaDescriptions = map[string]string{
6363
"sdiffalgorithm": "Specifies a proposed replacement algorithm for determining the stake difficulty (commonly called the ticket price). This proposal resolves all issues with a new algorithm that adheres to the referenced ideals.",

run_tests.sh

Lines changed: 3 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,9 @@
1-
#!/bin/bash
2-
# The script does automatic checking on a Go package and its sub-packages, including:
3-
# 1. gofmt (http://golang.org/cmd/gofmt/)
4-
# 2. golint (https://github.com/golang/lint)
5-
# 3. go vet (http://golang.org/cmd/vet)
6-
# 4. gosimple (https://github.com/dominikh/go-simple)
7-
# 5. unconvert (https://github.com/mdempsky/unconvert)
8-
# 6. ineffassign (https://github.com/gordonklaus/ineffassign)
9-
# 7. race detector (http://blog.golang.org/race-detector)
10-
# 8. test coverage (http://blog.golang.org/cover)
1+
#!/usr/bin/env bash
112

123
set -ex
134

145
# run tests
156
env GORACE="halt_on_error=1" go test -race ./...
167

8+
# run linters when not running as a GitHub action
9+
[ -z "$GITHUB_ACTIONS" ] && source ./lint.sh

0 commit comments

Comments
 (0)