Skip to content

Commit

Permalink
Revert "chore: move linters to all_test.go (#25)"
Browse files Browse the repository at this point in the history
This reverts commit b3bdd95.
  • Loading branch information
julieqiu authored Oct 30, 2024
1 parent b3bdd95 commit b81a790
Show file tree
Hide file tree
Showing 4 changed files with 58 additions and 59 deletions.
56 changes: 55 additions & 1 deletion .github/workflows/generator.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,61 @@ jobs:
generator/go.sum
- name: Display Go version
run: go version
- run: go fmt ./...
- run: go mod tidy
- run: go test ./...

lint:
runs-on: ubuntu-24.04
strategy:
matrix:
go-version: [ '1.23' ]
defaults:
run:
working-directory: generator
steps:
- uses: actions/checkout@v4
- name: Setup Go ${{ matrix.go-version }}
uses: actions/setup-go@v5
with:
go-version: ${{ matrix.go-version }}
cache-dependency-path: |
generator/go.sum
- name: Display Go version
run: go version
- run: go mod tidy
- run: go fmt ./...
- run: go vet ./...
- run: |
# unparam does not seem to have releases. Using `latest` sounds risky.
go install mvdan.cc/unparam@57a3b4290ba3724102fdbbe72314f2b782d4bef5
unparam ./...
- name: Run `staticcheck`
uses: dominikh/[email protected]
with:
install-go: false
cache-key: ${{ matrix.go-version }}
working-directory: generator
- name: Detect Changes
run: git diff --exit-code

vuln:
runs-on: ubuntu-24.04
strategy:
matrix:
go-version: [ '1.23' ]
defaults:
run:
working-directory: generator
steps:
- uses: actions/checkout@v4
- name: Setup Go ${{ matrix.go-version }}
uses: actions/setup-go@v5
with:
go-version: ${{ matrix.go-version }}
cache-dependency-path: |
generator/go.sum
- name: Display Go version
run: go version
- run: |
go install golang.org/x/vuln/cmd/[email protected]
govulncheck ./...
53 changes: 0 additions & 53 deletions generator/all_test.go

This file was deleted.

2 changes: 1 addition & 1 deletion generator/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ go 1.23.2

require (
github.com/cbroglie/mustache v1.4.0
github.com/google/go-cmp v0.5.5
github.com/google/go-cmp v0.6.0
github.com/iancoleman/strcase v0.3.0
google.golang.org/genproto/googleapis/api v0.0.0-20241021214115-324edc3d5d38
google.golang.org/protobuf v1.35.1
Expand Down
6 changes: 2 additions & 4 deletions generator/go.sum
Original file line number Diff line number Diff line change
@@ -1,11 +1,9 @@
github.com/cbroglie/mustache v1.4.0 h1:Azg0dVhxTml5me+7PsZ7WPrQq1Gkf3WApcHMjMprYoU=
github.com/cbroglie/mustache v1.4.0/go.mod h1:SS1FTIghy0sjse4DUVGV1k/40B1qE1XkD9DtDsHo9iM=
github.com/google/go-cmp v0.5.5 h1:Khx7svrCpmxxtHBq5j2mp/xVjsi8hQMfNLvJFAlrGgU=
github.com/google/go-cmp v0.5.5/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE=
github.com/google/go-cmp v0.6.0 h1:ofyhxvXcZhMsU5ulbFiLKl/XBFqE1GSq7atu8tAmTRI=
github.com/google/go-cmp v0.6.0/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY=
github.com/iancoleman/strcase v0.3.0 h1:nTXanmYxhfFAMjZL34Ov6gkzEsSJZ5DbhxWjvSASxEI=
github.com/iancoleman/strcase v0.3.0/go.mod h1:iwCmte+B7n89clKwxIoIXy/HfoL7AsD47ZCWhYzw7ho=
golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543 h1:E7g+9GITq07hpfrRu66IVDexMakfv52eLZ2CXBWiKr4=
golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
google.golang.org/genproto/googleapis/api v0.0.0-20241021214115-324edc3d5d38 h1:2oV8dfuIkM1Ti7DwXc0BJfnwr9csz4TDXI9EmiI+Rbw=
google.golang.org/genproto/googleapis/api v0.0.0-20241021214115-324edc3d5d38/go.mod h1:vuAjtvlwkDKF6L1GQ0SokiRLCGFfeBUXWr/aFFkHACc=
google.golang.org/protobuf v1.35.1 h1:m3LfL6/Ca+fqnjnlqQXNpFPABW1UD7mjh8KO2mKFytA=
Expand Down

0 comments on commit b81a790

Please sign in to comment.