Skip to content

Commit

Permalink
chore: update build infrastructure
Browse files Browse the repository at this point in the history
  • Loading branch information
twpayne committed Sep 26, 2023
1 parent 533a5b2 commit 6e36877
Show file tree
Hide file tree
Showing 5 changed files with 18 additions and 14 deletions.
22 changes: 13 additions & 9 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,26 +8,30 @@ on:
- master
tags:
- v*
env:
GO_VERSION: 1.x
jobs:
lint:
runs-on: ubuntu-18.04
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@93ea575cb5d8a053eaa0ac8fa3b40d7e05a33cc8
- uses: actions/setup-go@c4a742cab115ed795e34d4513e2cf7d472deb55f
- uses: actions/checkout@f43a0e5ff2bd294095638e18286ca9a3d1956744
- uses: actions/setup-go@93397bea11091df50f3d7e59dc26a7711a8bcfbe
with:
cache: true
go-version: ${{ env.GO_VERSION }}
- uses: golangci/golangci-lint-action@07db5389c99593f11ad7b44463c2d4233066a9b1
with:
version: v1.54.2
test:
strategy:
matrix:
go-version:
- stable
- oldstable
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@93ea575cb5d8a053eaa0ac8fa3b40d7e05a33cc8
- uses: actions/setup-go@c4a742cab115ed795e34d4513e2cf7d472deb55f
- uses: actions/checkout@f43a0e5ff2bd294095638e18286ca9a3d1956744
- uses: actions/setup-go@93397bea11091df50f3d7e59dc26a7711a8bcfbe
with:
cache: true
go-version: ${{ env.GO_VERSION }}
go-version: ${{ matrix.go-version }}
- name: build
run: go build ./...
- name: test
Expand Down
2 changes: 1 addition & 1 deletion .golangci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ linters:
- bodyclose
- contextcheck
- decorder
- depguard
- dogsled
- dupl
- dupword
Expand Down Expand Up @@ -61,6 +60,7 @@ linters:
disable:
- asasalint
- cyclop
- depguard
- exhaustive
- exhaustivestruct
- exhaustruct
Expand Down
2 changes: 1 addition & 1 deletion dbf.go
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ type ReadDBFOptions struct {
type DBFMemo string

// ReadDBF reads a DBF from an io.Reader.
func ReadDBF(r io.Reader, size int64, options *ReadDBFOptions) (*DBF, error) {
func ReadDBF(r io.Reader, _ int64, options *ReadDBFOptions) (*DBF, error) {
headerData := make([]byte, dbfHeaderLength)
if err := readFull(r, headerData); err != nil {
return nil, err
Expand Down
2 changes: 1 addition & 1 deletion prj.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ type PRJ struct {
}

// ReadPRJ reads a PRJ from an io.Reader.
func ReadPRJ(r io.Reader, size int64) (*PRJ, error) {
func ReadPRJ(r io.Reader, _ int64) (*PRJ, error) {
data, err := io.ReadAll(r)
if err != nil {
return nil, err
Expand Down
4 changes: 2 additions & 2 deletions shapefile_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ func TestReadFS(t *testing.T) {
expectedShapeType: ShapeTypePolyLine,
expectedBounds: geom.NewBounds(geom.XY).Set(1, 1, 5, 6),
expectedNumRecords: 1,
expectedGeom0: newGeomFromWKT(t, "MULTILINESTRING ((1 5,5 5,5 1,3 3,1 1),(3 2,2 6))"), //nolint:dupword
expectedGeom0: newGeomFromWKT(t, "MULTILINESTRING ((1 5,5 5,5 1,3 3,1 1),(3 2,2 6))"),
},
{
basename: "linem",
Expand Down Expand Up @@ -96,7 +96,7 @@ func TestReadFS(t *testing.T) {
expectedShapeType: ShapeTypePolygon,
expectedBounds: geom.NewBounds(geom.XY).Set(-120, -60, 120, 60),
expectedNumRecords: 1,
expectedGeom0: newGeomFromWKT(t, "POLYGON ((-120 60,120 60,120 -60,-120 -60,-120 60),(-60 30,-60 -30,60 -30,60 30,-60 30))"), //nolint:dupword
expectedGeom0: newGeomFromWKT(t, "POLYGON ((-120 60,120 60,120 -60,-120 -60,-120 60),(-60 30,-60 -30,60 -30,60 30,-60 30))"),
},
{
skipReason: "rings are not closed",
Expand Down

0 comments on commit 6e36877

Please sign in to comment.