diff --git a/LICENSE b/LICENSE index 0e17828..d2b6a04 100644 --- a/LICENSE +++ b/LICENSE @@ -1,6 +1,6 @@ ISC License -Copyright (c) 2015-2023, The Decred developers +Copyright (c) 2015-2025, The Decred developers Copyright (c) 2017, Jonathan Chappelow Permission to use, copy, modify, and/or distribute this software for any diff --git a/README.md b/README.md index 3402fb1..1b699b2 100644 --- a/README.md +++ b/README.md @@ -10,7 +10,7 @@ information about consensus rule voting. ## Developing -It is recommended to use Go 1.17 (or newer) for development. +It is recommended to use Go 1.24 (or newer) for development. To build the code: diff --git a/lint.sh b/lint.sh new file mode 100755 index 0000000..937f7f1 --- /dev/null +++ b/lint.sh @@ -0,0 +1,3 @@ +#!/usr/bin/env bash + +golangci-lint run diff --git a/main.go b/main.go index 4df4eb4..665e982 100644 --- a/main.go +++ b/main.go @@ -1,4 +1,4 @@ -// Copyright (c) 2017-2023 The Decred developers +// Copyright (c) 2017-2025 The Decred developers // Use of this source code is governed by an ISC // license that can be found in the LICENSE file. @@ -57,7 +57,7 @@ var ( "changesubsidysplit": "Change PoW/PoS Subsidy Split", "changesubsidysplitr2": "Change PoW/PoS Subsidy Split To 1/89", "blake3pow": "Change PoW to BLAKE3 and ASERT", - "maxtreasuryspend": "Change maximum treasury expenditure policy", + "maxtreasuryspend": "Change Maximum Treasury Expenditure Policy", } longAgendaDescriptions = map[string]string{ "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.", diff --git a/run_tests.sh b/run_tests.sh index 59c2437..e4ed886 100755 --- a/run_tests.sh +++ b/run_tests.sh @@ -1,16 +1,12 @@ -#!/bin/bash -# The script does automatic checking on a Go package and its sub-packages, including: -# 1. gofmt (http://golang.org/cmd/gofmt/) -# 2. golint (https://github.com/golang/lint) -# 3. go vet (http://golang.org/cmd/vet) -# 4. gosimple (https://github.com/dominikh/go-simple) -# 5. unconvert (https://github.com/mdempsky/unconvert) -# 6. ineffassign (https://github.com/gordonklaus/ineffassign) -# 7. race detector (http://blog.golang.org/race-detector) -# 8. test coverage (http://blog.golang.org/cover) +#!/usr/bin/env bash set -ex # run tests env GORACE="halt_on_error=1" go test -race ./... +# run linters when not running as a GitHub action +[ -z "$GITHUB_ACTIONS" ] && source ./lint.sh + +echo "------------------------------------------" +echo "Tests completed successfully!"