Skip to content

Update to using Go 1.17 for project #352

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Mar 15, 2022
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
2 changes: 1 addition & 1 deletion .github/workflows/check-code-generation-task.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ name: Check Code Generation

env:
# See: https://github.com/actions/setup-go/tree/v2#readme
GO_VERSION: "1.16"
GO_VERSION: "1.17"

on:
create:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/check-go-dependencies-task.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ name: Check Go Dependencies

env:
# See: https://github.com/actions/setup-go/tree/v2#readme
GO_VERSION: "1.16"
GO_VERSION: "1.17"

# See: https://docs.github.com/en/actions/reference/events-that-trigger-workflows
on:
Expand Down
13 changes: 10 additions & 3 deletions .github/workflows/check-go-task.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ name: Check Go

env:
# See: https://github.com/actions/setup-go/tree/v2#readme
GO_VERSION: "1.16"
GO_VERSION: "1.17"

# See: https://docs.github.com/en/actions/reference/events-that-trigger-workflows
on:
Expand Down Expand Up @@ -222,9 +222,16 @@ jobs:
with:
go-version: ${{ env.GO_VERSION }}

- name: Install Task
uses: arduino/setup-task@v1
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}
version: 3.x

- name: Run go mod tidy
working-directory: ${{ matrix.module.path }}
run: go mod tidy
env:
GO_MODULE_PATH: ${{ matrix.module.path }}
run: task go:tidy

- name: Check whether any tidying was needed
run: git diff --color --exit-code
2 changes: 1 addition & 1 deletion .github/workflows/check-mkdocs-task.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ name: Check Website

env:
# See: https://github.com/actions/setup-go/tree/v2#readme
GO_VERSION: "1.16"
GO_VERSION: "1.17"
# See: https://github.com/actions/setup-python/tree/v2#available-versions-of-python
PYTHON_VERSION: "3.9"

Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/test-go-integration-task.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ name: Test Integration

env:
# See: https://github.com/actions/setup-go/tree/v2#readme
GO_VERSION: "1.16"
GO_VERSION: "1.17"
# See: https://github.com/actions/setup-python/tree/v2#available-versions-of-python
PYTHON_VERSION: "3.9"

Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/test-go-task.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ name: Test Go

env:
# See: https://github.com/actions/setup-go/tree/v2#readme
GO_VERSION: "1.16"
GO_VERSION: "1.17"

# See: https://docs.github.com/en/free-pro-team@latest/actions/reference/events-that-trigger-workflows
on:
Expand Down
2 changes: 1 addition & 1 deletion DistTasks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ version: "3"

vars:
CONTAINER: "docker.elastic.co/beats-dev/golang-crossbuild"
GO_VERSION: "1.16.4"
GO_VERSION: "1.17.8"
CHECKSUM_FILE: "{{.VERSION}}-checksums.txt"

tasks:
Expand Down
43 changes: 43 additions & 0 deletions Taskfile.yml
Original file line number Diff line number Diff line change
Expand Up @@ -55,9 +55,24 @@ tasks:
- task: general:check-formatting
- task: general:check-spelling
- task: go:test
- task: go:test
vars:
GO_MODULE_PATH: ./ruledocsgen
- task: go:test-integration
- task: go:vet
- task: go:vet
vars:
GO_MODULE_PATH: ./docsgen
- task: go:vet
vars:
GO_MODULE_PATH: ./ruledocsgen
- task: go:lint
- task: go:lint
vars:
GO_MODULE_PATH: ./docsgen
- task: go:lint
vars:
GO_MODULE_PATH: ./ruledocsgen
- task: markdown:lint
- task: markdown:check-links
- task: python:lint
Expand All @@ -72,7 +87,26 @@ tasks:
- task: general:correct-spelling
- task: go:generate
- task: go:fix
- task: go:fix
vars:
GO_MODULE_PATH: ./docsgen
- task: go:fix
vars:
GO_MODULE_PATH: ./ruledocsgen
- task: go:format
- task: go:format
vars:
GO_MODULE_PATH: ./docsgen
- task: go:format
vars:
GO_MODULE_PATH: ./ruledocsgen
- task: go:tidy
- task: go:tidy
vars:
GO_MODULE_PATH: ./docsgen
- task: go:tidy
vars:
GO_MODULE_PATH: ./ruledocsgen
- task: markdown:fix
- task: python:format
- task: shell:format
Expand Down Expand Up @@ -266,6 +300,15 @@ tasks:
- poetry run pytest tests
- poetry run pytest ruledocsgen/tests

# Source: https://github.com/arduino/tooling-project-assets/blob/main/workflow-templates/assets/check-go-task/Taskfile.yml
go:tidy:
desc: Refresh dependency metadata
dir: "{{default .DEFAULT_GO_MODULE_PATH .GO_MODULE_PATH}}"
vars:
GO_VERSION: 1.17
cmds:
- go mod tidy -compat={{.GO_VERSION}}

# Source: https://github.com/arduino/tooling-project-assets/blob/main/workflow-templates/assets/check-go-task/Taskfile.yml
go:vet:
desc: Check for errors in Go code
Expand Down
2 changes: 1 addition & 1 deletion docs/CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ submitting a PR:

To build Arduino Lint from sources you need the following tools to be available in your local environment:

- [Go](https://golang.org/doc/install) version 1.16 or later
- [Go](https://golang.org/doc/install) version 1.17 or later
- [Taskfile](https://taskfile.dev/#/installation) to help you run the most common tasks from the command line

If you want to run integration tests or work on documentation, you will also need:
Expand Down
89 changes: 88 additions & 1 deletion docsgen/go.mod
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// Source: https://github.com/arduino/tooling-project-assets/blob/main/workflow-templates/assets/cobra/docsgen/go.mod
module github.com/arduino/arduino-lint/docsgen

go 1.16
go 1.17

replace github.com/arduino/arduino-lint => ../

Expand All @@ -13,3 +13,90 @@ require (
github.com/arduino/arduino-lint v0.0.0
github.com/spf13/cobra v1.3.0
)

require (
github.com/Microsoft/go-winio v0.4.16 // indirect
github.com/ProtonMail/go-crypto v0.0.0-20210428141323-04723f9f07d7 // indirect
github.com/acomagu/bufpipe v1.0.3 // indirect
github.com/arduino/arduino-cli v0.0.0-20201210103408-bf7a3194bb63 // indirect
github.com/arduino/go-paths-helper v1.7.0 // indirect
github.com/arduino/go-properties-orderedmap v1.7.0 // indirect
github.com/cespare/xxhash v1.1.0 // indirect
github.com/client9/misspell v0.3.4 // indirect
github.com/cmaglie/go.rice v1.0.3 // indirect
github.com/codeclysm/extract/v3 v3.0.2 // indirect
github.com/cpuguy83/go-md2man/v2 v2.0.1 // indirect
github.com/daaku/go.zipexe v1.0.1 // indirect
github.com/davecgh/go-spew v1.1.1 // indirect
github.com/dgraph-io/ristretto v0.0.3 // indirect
github.com/emirpasic/gods v1.12.0 // indirect
github.com/fsnotify/fsnotify v1.5.1 // indirect
github.com/go-git/gcfg v1.5.0 // indirect
github.com/go-git/go-billy/v5 v5.3.1 // indirect
github.com/go-git/go-git/v5 v5.4.2 // indirect
github.com/gobuffalo/pop/v5 v5.3.3 // indirect
github.com/golang/protobuf v1.5.2 // indirect
github.com/google/uuid v1.2.0 // indirect
github.com/h2non/filetype v1.1.0 // indirect
github.com/hashicorp/hcl v1.0.0 // indirect
github.com/imdario/mergo v0.3.12 // indirect
github.com/inconshreveable/mousetrap v1.0.0 // indirect
github.com/jandelgado/gcov2lcov v1.0.4 // indirect
github.com/jbenet/go-context v0.0.0-20150711004518-d14ea06fba99 // indirect
github.com/juju/errors v0.0.0-20200330140219-3fe23663418f // indirect
github.com/kevinburke/ssh_config v0.0.0-20201106050909-4977a11b4351 // indirect
github.com/magiconair/properties v1.8.5 // indirect
github.com/mattn/go-runewidth v0.0.9 // indirect
github.com/mitchellh/go-homedir v1.1.0 // indirect
github.com/mitchellh/mapstructure v1.4.3 // indirect
github.com/olekukonko/tablewriter v0.0.5 // indirect
github.com/ory/go-acc v0.2.6 // indirect
github.com/ory/jsonschema/v3 v3.0.4 // indirect
github.com/ory/viper v1.7.5 // indirect
github.com/ory/x v0.0.272 // indirect
github.com/pborman/uuid v1.2.1 // indirect
github.com/pelletier/go-toml v1.9.4 // indirect
github.com/pkg/errors v0.9.1 // indirect
github.com/pmezard/go-difflib v1.0.0 // indirect
github.com/pmylund/sortutil v0.0.0-20120526081524-abeda66eb583 // indirect
github.com/russross/blackfriday/v2 v2.1.0 // indirect
github.com/seatgeek/logrus-gelf-formatter v0.0.0-20210414080842-5b05eb8ff761 // indirect
github.com/sergi/go-diff v1.1.0 // indirect
github.com/sirupsen/logrus v1.8.1 // indirect
github.com/spf13/afero v1.6.0 // indirect
github.com/spf13/cast v1.4.1 // indirect
github.com/spf13/jwalterweatherman v1.1.0 // indirect
github.com/spf13/pflag v1.0.5 // indirect
github.com/sqs/goreturns v0.0.0-20181028201513-538ac6014518 // indirect
github.com/src-d/gcfg v1.4.0 // indirect
github.com/stretchr/testify v1.7.0 // indirect
github.com/subosito/gotenv v1.2.0 // indirect
github.com/xanzy/ssh-agent v0.3.0 // indirect
github.com/xeipuuv/gojsonpointer v0.0.0-20190905194746-02993c407bfb // indirect
github.com/xeipuuv/gojsonreference v0.0.0-20180127040603-bd5ef7bd5415 // indirect
go.bug.st/cleanup v1.0.0 // indirect
go.bug.st/downloader/v2 v2.1.0 // indirect
go.bug.st/relaxed-semver v0.0.0-20190922224835-391e10178d18 // indirect
go.opentelemetry.io/contrib v0.20.0 // indirect
go.opentelemetry.io/contrib/instrumentation/net/http/httptrace/otelhttptrace v0.20.0 // indirect
go.opentelemetry.io/otel v0.20.0 // indirect
go.opentelemetry.io/otel/metric v0.20.0 // indirect
go.opentelemetry.io/otel/trace v0.20.0 // indirect
golang.org/x/crypto v0.0.0-20210817164053-32db794688a5 // indirect
golang.org/x/mod v0.5.0 // indirect
golang.org/x/net v0.0.0-20210813160813-60bc85c4be6d // indirect
golang.org/x/sync v0.0.0-20210220032951-036812b2e83c // indirect
golang.org/x/sys v0.0.0-20211205182925-97ca703d548d // indirect
golang.org/x/text v0.3.7 // indirect
golang.org/x/tools v0.1.5 // indirect
golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1 // indirect
google.golang.org/genproto v0.0.0-20211208223120-3a66f561d7aa // indirect
google.golang.org/grpc v1.42.0 // indirect
google.golang.org/protobuf v1.27.1 // indirect
gopkg.in/ini.v1 v1.66.2 // indirect
gopkg.in/src-d/go-billy.v4 v4.3.2 // indirect
gopkg.in/src-d/go-git.v4 v4.13.1 // indirect
gopkg.in/warnings.v0 v0.1.2 // indirect
gopkg.in/yaml.v2 v2.4.0 // indirect
gopkg.in/yaml.v3 v3.0.0-20210107192922-496545a6307b // indirect
)
Loading