You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@beam.apache.org by GitBox <gi...@apache.org> on 2022/04/27 15:34:17 UTC
[GitHub] [beam] damccorm commented on a diff in pull request #17479: [BEAM-14243] Add staticcheck to Github Actions Precommits
damccorm commented on code in PR #17479:
URL: https://github.com/apache/beam/pull/17479#discussion_r859938715
##########
.github/workflows/go_tests.yml:
##########
@@ -53,3 +53,7 @@ jobs:
run: cd sdks/go/pkg/beam && go fmt ./...; git diff-index --quiet HEAD || (echo "Run go fmt before checking in changes" && exit 1)
- name: Run vet
run: cd sdks/go/pkg/beam && go vet --copylocks=false --unsafeptr=false ./... || (echo "Run go vet and fix warnings before checking in changes" && exit 1)
+ - uses: dominikh/staticcheck-action@v1.1.0
+ with:
+ version: "2022.1.0"
+ install-go: false
Review Comment:
```suggestion
version: "2022.1.0"
install-go: false
```
The diff showed some weird spacing here (I think non-space/tab characters?), that might keep actions from being able to parse this file (and is just better to not have)
##########
.github/workflows/go_tests.yml:
##########
@@ -53,3 +53,7 @@ jobs:
run: cd sdks/go/pkg/beam && go fmt ./...; git diff-index --quiet HEAD || (echo "Run go fmt before checking in changes" && exit 1)
- name: Run vet
run: cd sdks/go/pkg/beam && go vet --copylocks=false --unsafeptr=false ./... || (echo "Run go vet and fix warnings before checking in changes" && exit 1)
+ - uses: dominikh/staticcheck-action@v1.1.0
Review Comment:
What is the advantage of using a 3rd party action over a script that calls static check directly?
The reason I ask is that in general, I think we should prefer the latter if there's not a reason we need an action. That makes it easier for users to tell exactly what is being run/incorporate it into their own workflow, plus it reduces our surface area for bugs/security issues. If there's a good reason to use the action I'm 100% on board though
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: github-unsubscribe@beam.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org