Skip to content
Merged
Show file tree
Hide file tree
Changes from all 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
26 changes: 26 additions & 0 deletions .github/workflows/lint.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
name: Lint

on:
push:
branches: [ master ]
pull_request:
branches: [ master ]

jobs:
metalinter:
name: lint
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up Go
uses: actions/setup-go@v5
with:
go-version: '>=1.23'
cache: false
- name: Run golangci-lint
uses: golangci/[email protected]
with:
version: latest
args: --timeout=5m
working-directory: .
skip-cache: true
22 changes: 22 additions & 0 deletions .golangci.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
linters:
enable-all: true
disable:
- mnd
- tagliatelle
- exhaustruct

issues:
exclude-dirs-use-default: true
exclude-dirs:
- bin/*

linters-settings:
nestif:
min-complexity: 5

output:
formats:
- format: colored-line-number

run:
timeout: 10m
2 changes: 2 additions & 0 deletions bin/gopro2gpx/gopro2gpx.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ func main() {

if *inName == "" {
flag.Usage()

return
}

Expand Down Expand Up @@ -49,6 +50,7 @@ func main() {
if t_prev.IsZero() {
*t_prev = *t
t.Clear()

continue
}

Expand Down
2 changes: 2 additions & 0 deletions bin/gopro2json/gopro2json.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ func main() {

if *inName == "" {
flag.Usage()

return
}

Expand Down Expand Up @@ -49,6 +50,7 @@ func main() {
if t_prev.IsZero() {
*t_prev = *t
t.Clear()

continue
}

Expand Down
2 changes: 2 additions & 0 deletions bin/gpmdinfo/gpmdinfo.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ func main() {

if *inName == "" {
flag.Usage()

return
}

Expand All @@ -41,6 +42,7 @@ func main() {
if err == io.EOF {
break
}

fmt.Println(err)
os.Exit(1)
}
Expand Down
Loading