Skip to content
Merged
Show file tree
Hide file tree
Changes from 5 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 10 additions & 10 deletions .github/workflows/go.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,38 +14,38 @@ jobs:
go:
strategy:
matrix:
go: [1.22]
golangci: [v1.61.0]
go: [1.25]
golangci: [v2.4.0]
os: [ubuntu-latest, macos-latest, windows-latest]
name: lint
runs-on: ${{ matrix.os }}
steps:
- name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@v5

- name: Setup
uses: actions/setup-go@v4
uses: actions/setup-go@v6
with:
go-version: '${{ matrix.go }}'

- name: Validate go generate / mod
if: runner.os != 'Windows'
run: |
go install golang.org/x/tools/cmd/stringer@latest
go generate ./...
go mod tidy
git --no-pager diff && [[ 0 -eq $(git status --porcelain | wc -l) ]]

- name: Go Lint
uses: golangci/golangci-lint-action@v3
uses: golangci/golangci-lint-action@v8
with:
version: ${{ matrix.golangci }}
args: --out-format=colored-line-number
skip-build-cache: true
skip-pkg-cache: true
skip-cache: true

- name: Go Build
run: go build ./...

- name: Go Test
run: go test -race -v ./...
run: |
go version
go env
go test -race -v ./...
8 changes: 4 additions & 4 deletions .github/workflows/release-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,16 +14,16 @@ jobs:
runs-on: [ubuntu-latest]
steps:
- name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@v5
with:
fetch-depth: 0
- name: Set up Go
uses: actions/setup-go@v3
uses: actions/setup-go@v6
with:
go-version: 1.19
go-version: 1.25
cache: true
- name: Run GoReleaser
uses: goreleaser/goreleaser-action@v3
uses: goreleaser/goreleaser-action@v6
with:
distribution: goreleaser
version: latest
Expand Down
128 changes: 75 additions & 53 deletions .golangci.yml
Original file line number Diff line number Diff line change
@@ -1,68 +1,90 @@
version: "2"
run:
concurrency: 4
timeout: 5m

linters-settings:
gosec:
excludes:
- G104 # Handled by errcheck
gocyclo:
min-complexity: 20
dupl:
threshold: 100
goconst:
min-len: 2
min-occurrences: 4
cyclop:
max-complexity: 15
misspell:
ignore-words:
- ect
ireturn:
allow:
- anon
- error
- empty
- stdlib
- (or|er)$
- tempFile

linters:
enable-all: true
default: all
disable:
- staticcheck
- varnamelen
- gochecknoglobals
- copyloopvar
# Seems to be broken and just reports all the time.
- depguard
# We're ok with dynamic errors
- err113
- exhaustruct
- forbidigo
- funlen
- gochecknoglobals
- godox
- wsl
- gomoddirectives
- ireturn
- nlreturn
- gomnd
- paralleltest
- wrapcheck
- testpackage
- gofumpt
- forbidigo
- exhaustruct
- nonamedreturns
- paralleltest
- staticcheck
- tagliatelle
- gomoddirectives
- ireturn
# Deprecated
- exportloopref
- execinquery
- copyloopvar
# Seems to be broken and just reports all the time.
- depguard
- testpackage
- varnamelen
- wrapcheck
- wsl
- wsl_v5
# Lots of noise
- mnd
- musttag
# We're ok with dynamic errors
- err113
# We prefer inline errors, and fix results in broken code.
- noinlineerr
# Noisy with types which extend time.Time
- recvcheck
# No real value for consumers as only exports methods are documented.
- funcorder
# Can result in increased struct size.
- embeddedstructfieldcheck
# Needs API changes.
- noctx

settings:
cyclop:
max-complexity: 15
dupl:
threshold: 100
goconst:
min-len: 2
min-occurrences: 4
gocyclo:
min-complexity: 20
gosec:
excludes:
- G104
ireturn:
allow:
- anon
- error
- empty
- stdlib
- (or|er)$
- tempFile
misspell:
ignore-rules:
- ect
exclusions:
generated: lax
rules:
- path: (.+)\.go$
text: .*Duplicate words \(.\.\) found.*
- path: (.+)\.go$
text: ^Error return value of `fmt\.\w+` is not checked.*
paths:
- third_party$
- builtin$
- examples$
issues:
exclude:
- .*Duplicate words \(.\.\) found.*
- ^Error return value of `fmt\.\w+` is not checked.*
exclude-use-default: false
max-same-issues: 0
formatters:
enable:
- gci
- gofmt
- goimports
exclusions:
generated: lax
paths:
- third_party$
- builtin$
- examples$
61 changes: 30 additions & 31 deletions go.mod
Original file line number Diff line number Diff line change
@@ -1,55 +1,54 @@
module github.com/stevenh/tracktools

go 1.22.0

toolchain go1.23.4
go 1.25.3

require (
github.com/Eyevinn/mp4ff v0.47.0
github.com/flopp/go-staticmaps v0.0.0-20240606055734-0bdd9c1c1478
github.com/golang/geo v0.0.0-20230421003525-6adc56603217
github.com/Eyevinn/mp4ff v0.50.0
github.com/flopp/go-staticmaps v0.0.0-20250629121348-973b17999e19
github.com/golang/geo v0.0.0-20251028093606-67a2e55a1967
github.com/mitchellh/go-homedir v1.1.0
github.com/mitchellh/mapstructure v1.5.0
github.com/rs/zerolog v1.33.0
github.com/spf13/cobra v1.8.1
github.com/spf13/pflag v1.0.5
github.com/spf13/viper v1.19.0
github.com/stretchr/testify v1.10.0
github.com/rs/zerolog v1.34.0
github.com/spf13/cobra v1.10.1
github.com/spf13/pflag v1.0.10
github.com/spf13/viper v1.21.0
github.com/stretchr/testify v1.11.1
github.com/tidwall/geodesic v1.52.4
golang.org/x/text v0.21.0
gonum.org/v1/gonum v0.15.1
golang.org/x/text v0.30.0
gonum.org/v1/gonum v0.16.0
)

require (
github.com/cpuguy83/go-md2man/v2 v2.0.6 // indirect
github.com/cpuguy83/go-md2man/v2 v2.0.7 // indirect
github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc // indirect
github.com/flopp/go-coordsparser v0.0.0-20240403152942-4891dc40d0a7 // indirect
github.com/flopp/go-coordsparser v0.0.0-20250311184423-61a7ff62d17c // indirect
github.com/fogleman/gg v1.3.0 // indirect
github.com/fsnotify/fsnotify v1.8.0 // indirect
github.com/fsnotify/fsnotify v1.9.0 // indirect
github.com/go-viper/mapstructure/v2 v2.4.0 // indirect
github.com/golang/freetype v0.0.0-20170609003504-e2365dfdc4a0 // indirect
github.com/hashicorp/hcl v1.0.0 // indirect
github.com/inconshreveable/mousetrap v1.1.0 // indirect
github.com/magiconair/properties v1.8.9 // indirect
github.com/mattn/go-colorable v0.1.14 // indirect
github.com/mattn/go-isatty v0.0.20 // indirect
github.com/mazznoer/csscolorparser v0.1.5 // indirect
github.com/pelletier/go-toml/v2 v2.2.3 // indirect
github.com/mazznoer/csscolorparser v0.1.6 // indirect
github.com/pelletier/go-toml/v2 v2.2.4 // indirect
github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2 // indirect
github.com/russross/blackfriday/v2 v2.1.0 // indirect
github.com/sagikazarmark/locafero v0.7.0 // indirect
github.com/sagikazarmark/slog-shim v0.1.0 // indirect
github.com/sourcegraph/conc v0.3.0 // indirect
github.com/spf13/afero v1.12.0 // indirect
github.com/spf13/cast v1.7.1 // indirect
github.com/sagikazarmark/locafero v0.12.0 // indirect
github.com/spf13/afero v1.15.0 // indirect
github.com/spf13/cast v1.10.0 // indirect
github.com/subosito/gotenv v1.6.0 // indirect
github.com/tkrajina/gpxgo v1.4.0 // indirect
go.uber.org/multierr v1.11.0 // indirect
golang.org/x/exp v0.0.0-20250106191152-7588d65b2ba8 // indirect
golang.org/x/image v0.23.0 // indirect
golang.org/x/net v0.34.0 // indirect
golang.org/x/sys v0.29.0 // indirect
gopkg.in/ini.v1 v1.67.0 // indirect
go.yaml.in/yaml/v3 v3.0.4 // indirect
golang.org/x/image v0.32.0 // indirect
golang.org/x/mod v0.28.0 // indirect
golang.org/x/net v0.46.0 // indirect
golang.org/x/sync v0.17.0 // indirect
golang.org/x/sys v0.37.0 // indirect
golang.org/x/tools v0.37.0 // indirect
gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15 // indirect
gopkg.in/yaml.v3 v3.0.1 // indirect
)

replace github.com/tidwall/geodesic => github.com/stevenh/geodesic v0.3.6-0.20220704191314-6615b5611b07

tool golang.org/x/tools/cmd/stringer
Loading
Loading