Skip to content

Commit

Permalink
Update to go 1.22
Browse files Browse the repository at this point in the history
Go 1.22 has been out for a while now, so I'm updating the version here just to be more up to date.

Also add a README which is just a TODO list right now.
  • Loading branch information
AislingHPE committed Aug 21, 2024
1 parent 761e789 commit 5a8a704
Show file tree
Hide file tree
Showing 5 changed files with 17 additions and 17 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/CI.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,12 @@ jobs:
- uses: actions/checkout@v4
- uses: actions/setup-go@v5
with:
go-version: '1.21'
go-version: '1.22'
- name: GolangCI Lint
uses: golangci/golangci-lint-action@v3
with:
# TODO: Update this version.
version: v1.56.2
version: v1.60.2
args: --out-format=colored-line-number
test:
name: Go Test
Expand All @@ -28,6 +28,6 @@ jobs:
- uses: actions/checkout@v4
- uses: actions/setup-go@v5
with:
go-version: '1.21'
go-version: '1.22'
- name: Go Test
run: go test -v ./...
13 changes: 6 additions & 7 deletions .golangci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,6 @@ linters:
- errname
- errorlint
- exhaustive
- exportloopref
- funlen
- gocognit
- gocritic
Expand Down Expand Up @@ -93,11 +92,11 @@ linters:

issues:
include:
# Match function comment to function name
- EXC0012
- EXC0013
- EXC0014
- EXC0015
# Match function comment to function name
- EXC0012
- EXC0013
- EXC0014
- EXC0015

exclude:
# We want to allow exporting const/var/type without comments
Expand All @@ -111,7 +110,7 @@ issues:
exclude-rules:
# ignore function length for tests as look up tables typically exceed.
- linters:
- funlen
- funlen
path: _test\.go

max-same-issues: 0
7 changes: 7 additions & 0 deletions README
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# TODO list

- Add the command line
- Add README including usage instructions, and a description of how the project actually works
- Consider making a github action for this
- Add a make rule to make a binary
- Goreleaser?
6 changes: 0 additions & 6 deletions cmd/cmd.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,12 +19,6 @@ import (
// - output: file, default is ./schema.json. Allow creation of directories.
// - input: folder, default is .
// - allow-empty: if no variables are found, print empty schema and exit with 0
// error handling: print to stdout and exit with non-zero exit code. Do not print schema.

// Also TODO: how do we handle errors for validation rules? If a validation rule fails to be translated,
// we need to alert the user somehow, and it would be nice to print the associated errors, but there might be 4
// errors since we try 4 rules. We also can't halt the program, since it might be an expected error. Logging is also
// much more difficult if we need to print the schema itself to stdout in some cases.

var (
disallowAdditionalProperties bool
Expand Down
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
module github.com/HewlettPackard/terraschema

go 1.21.6
go 1.22.6

require (
github.com/google/go-cmp v0.6.0
Expand Down

0 comments on commit 5a8a704

Please sign in to comment.