Skip to content

Commit f169403

Browse files
authored
Merge pull request #42 from twpayne/go-tool
Use go tool
2 parents b6e1b91 + bf8ba5e commit f169403

File tree

4 files changed

+165
-153
lines changed

4 files changed

+165
-153
lines changed

.github/workflows/main.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ jobs:
1111
runs-on: ubuntu-latest
1212
steps:
1313
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683
14-
- uses: actions/setup-go@3041bf56c941b39c61721a86cd11f3bb1338122a
14+
- uses: actions/setup-go@0aaccfd150d50ccaeb58ebd88d36e91967a5f35b
1515
- run: go build ./...
1616
- run: go test ./...
1717
- id: generate
@@ -22,7 +22,7 @@ jobs:
2222
runs-on: ubuntu-latest
2323
steps:
2424
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683
25-
- uses: actions/setup-go@3041bf56c941b39c61721a86cd11f3bb1338122a
26-
- uses: golangci/golangci-lint-action@971e284b6050e8a5849b72094c50ab08da042db8
25+
- uses: actions/setup-go@0aaccfd150d50ccaeb58ebd88d36e91967a5f35b
26+
- uses: golangci/golangci-lint-action@1481404843c368bc19ca9406f87d6e0fc97bdcfd
2727
with:
28-
version: v1.62.2
28+
version: v2.0.2

.golangci.yml

Lines changed: 156 additions & 146 deletions
Original file line numberDiff line numberDiff line change
@@ -1,152 +1,162 @@
1+
version: "2"
12
run:
2-
go: '1.22'
3-
3+
go: "1.22"
44
linters:
55
enable:
6-
- asasalint
7-
- asciicheck
8-
- bidichk
9-
- bodyclose
10-
- canonicalheader
11-
- containedctx
12-
- contextcheck
13-
- copyloopvar
14-
- decorder
15-
- dogsled
16-
- dupl
17-
- dupword
18-
- durationcheck
19-
- err113
20-
- errcheck
21-
- errchkjson
22-
- errname
23-
- errorlint
24-
- exhaustive
25-
- fatcontext
26-
- forbidigo
27-
- forcetypeassert
28-
- gci
29-
- ginkgolinter
30-
- gocheckcompilerdirectives
31-
- gochecknoinits
32-
- gochecksumtype
33-
- gocognit
34-
- goconst
35-
- gocritic
36-
- gocyclo
37-
- godot
38-
- gofmt
39-
- gofumpt
40-
- goheader
41-
- goimports
42-
- gomoddirectives
43-
- gomodguard
44-
- goprintffuncname
45-
- gosec
46-
- gosimple
47-
- gosmopolitan
48-
- govet
49-
- grouper
50-
- iface
51-
- importas
52-
- inamedparam
53-
- ineffassign
54-
- interfacebloat
55-
- intrange
56-
- ireturn
57-
- loggercheck
58-
- makezero
59-
- mirror
60-
- misspell
61-
- musttag
62-
- nakedret
63-
- nestif
64-
- nilerr
65-
- nilnil
66-
- noctx
67-
- nolintlint
68-
- nonamedreturns
69-
- nosprintfhostport
70-
- perfsprint
71-
- prealloc
72-
- predeclared
73-
- promlinter
74-
- protogetter
75-
- reassign
76-
- recvcheck
77-
- revive
78-
- rowserrcheck
79-
- sloglint
80-
- spancheck
81-
- sqlclosecheck
82-
- staticcheck
83-
- stylecheck
84-
- tagalign
85-
- tagliatelle
86-
- tenv
87-
- testableexamples
88-
- testifylint
89-
- testpackage
90-
- thelper
91-
- tparallel
92-
- typecheck
93-
- unconvert
94-
- unparam
95-
- unused
96-
- usestdlibvars
97-
- wastedassign
98-
- whitespace
99-
- zerologlint
100-
disable:
101-
- cyclop
102-
- depguard
103-
- exhaustruct
104-
- funlen
105-
- gochecknoglobals
106-
- godox
107-
- lll
108-
- maintidx
109-
- nlreturn
110-
- paralleltest
111-
- varnamelen
112-
- wrapcheck
113-
- wsl
114-
115-
linters-settings:
116-
gci:
117-
sections:
118-
- standard
119-
- default
120-
- prefix(github.com/twpayne/go-kml)
121-
gofumpt:
122-
extra-rules: true
123-
goimports:
124-
local-prefixes: github.com/twpayne/go-kml
125-
govet:
126-
disable:
127-
- fieldalignment
128-
- shadow
129-
enable-all: true
130-
ireturn:
131-
allow:
132-
- error
133-
- github.com/twpayne/go-kml/v3.ParentElement
134-
misspell:
135-
locale: US
136-
stylecheck:
137-
checks:
138-
- all
139-
140-
issues:
141-
exclude-rules:
142-
- linters:
6+
- asasalint
7+
- asciicheck
8+
- bidichk
9+
- bodyclose
10+
- canonicalheader
11+
- containedctx
12+
- contextcheck
13+
- copyloopvar
14+
- decorder
15+
- dogsled
14316
- dupl
144-
- scopelint
145-
path: "_test\\.go"
146-
- linters:
17+
- dupword
18+
- durationcheck
19+
- err113
20+
- errchkjson
21+
- errname
22+
- errorlint
23+
- exhaustive
24+
- fatcontext
14725
- forbidigo
26+
- forcetypeassert
27+
- ginkgolinter
28+
- gocheckcompilerdirectives
29+
- gochecknoinits
30+
- gochecksumtype
31+
- gocognit
32+
- goconst
33+
- gocritic
34+
- gocyclo
35+
- godot
36+
- goheader
37+
- gomoddirectives
38+
- gomodguard
39+
- goprintffuncname
14840
- gosec
149-
path: "internal/"
150-
- linters:
151-
- err113
152-
text: do not define dynamic errors, use wrapped static errors instead
41+
- gosmopolitan
42+
- grouper
43+
- iface
44+
- importas
45+
- inamedparam
46+
- interfacebloat
47+
- intrange
48+
- ireturn
49+
- loggercheck
50+
- makezero
51+
- mirror
52+
- misspell
53+
- musttag
54+
- nakedret
55+
- nestif
56+
- nilerr
57+
- nilnil
58+
- noctx
59+
- nolintlint
60+
- nonamedreturns
61+
- nosprintfhostport
62+
- perfsprint
63+
- prealloc
64+
- predeclared
65+
- promlinter
66+
- protogetter
67+
- reassign
68+
- recvcheck
69+
- revive
70+
- rowserrcheck
71+
- sloglint
72+
- spancheck
73+
- sqlclosecheck
74+
- staticcheck
75+
- tagalign
76+
- tagliatelle
77+
- testableexamples
78+
- testifylint
79+
- testpackage
80+
- thelper
81+
- tparallel
82+
- unconvert
83+
- unparam
84+
- usestdlibvars
85+
- wastedassign
86+
- whitespace
87+
- zerologlint
88+
disable:
89+
- cyclop
90+
- depguard
91+
- exhaustruct
92+
- funlen
93+
- gochecknoglobals
94+
- godox
95+
- lll
96+
- maintidx
97+
- nlreturn
98+
- paralleltest
99+
- varnamelen
100+
- wrapcheck
101+
- wsl
102+
settings:
103+
govet:
104+
disable:
105+
- fieldalignment
106+
- shadow
107+
enable-all: true
108+
ireturn:
109+
allow:
110+
- error
111+
- github.com/twpayne/go-kml/v3.ParentElement
112+
misspell:
113+
locale: US
114+
staticcheck:
115+
checks:
116+
- all
117+
exclusions:
118+
generated: lax
119+
presets:
120+
- comments
121+
- common-false-positives
122+
- legacy
123+
- std-error-handling
124+
rules:
125+
- linters:
126+
- dupl
127+
- scopelint
128+
path: _test\.go
129+
- linters:
130+
- forbidigo
131+
- gosec
132+
path: internal/
133+
- linters:
134+
- err113
135+
text: do not define dynamic errors, use wrapped static errors instead
136+
paths:
137+
- third_party$
138+
- builtin$
139+
- examples$
140+
formatters:
141+
enable:
142+
- gci
143+
- gofmt
144+
- gofumpt
145+
- goimports
146+
settings:
147+
gci:
148+
sections:
149+
- standard
150+
- default
151+
- prefix(github.com/twpayne/go-kml)
152+
gofumpt:
153+
extra-rules: true
154+
goimports:
155+
local-prefixes:
156+
- github.com/twpayne/go-kml
157+
exclusions:
158+
generated: lax
159+
paths:
160+
- third_party$
161+
- builtin$
162+
- examples$

go.mod

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
module github.com/twpayne/go-kml/v3
22

3-
go 1.22
3+
go 1.24.0
4+
5+
tool github.com/twpayne/go-kml/v3/internal/generate
46

57
require github.com/alecthomas/assert/v2 v2.10.0
68

kml.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
//go:generate go run ./internal/generate -o kml22gx.gen.go -n gx: xsd/kml22gx.xsd
2-
//go:generate go run ./internal/generate -o ogckml22.gen.go xsd/ogckml22.xsd
1+
//go:generate go tool generate -o kml22gx.gen.go -n gx: xsd/kml22gx.xsd
2+
//go:generate go tool generate -o ogckml22.gen.go xsd/ogckml22.xsd
33

44
// Package kml provides convenience methods for creating and writing KML documents.
55
//

0 commit comments

Comments
 (0)