-
-
Notifications
You must be signed in to change notification settings - Fork 164
Incorrect typecheck
failure
#408
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
Comments
Please read the README, the v3 does not install go anymore, you need to add: - uses: actions/setup-go@v2
with:
go-version: '1.17' |
I see incorrect typecheck failures as well, but I do set up Go: steps:
- name: Checkout repository
uses: actions/[email protected]
with:
token: ${{ secrets.PAT_TOKEN }}
- name: Setup Go
uses: actions/[email protected]
with:
go-version: 1.17.7
- name: Run golangci-lint
# yamllint disable-line rule:line-length
uses: golangci/golangci-lint-action@b517f99ae23d86ecc4c0dec08dcf48d2336abc29 # v3.1.0
env:
GOPRIVATE: github.com/myorg
with:
version: v1.44.2 |
Here is my config and it fixed the problem. name: golangci-lint
on:
push:
tags:
- v*
branches:
- main
jobs:
golangci:
name: lint
runs-on: ubuntu-latest
steps:
- name: Setup Go
uses: actions/[email protected]
with:
go-version: 1.17.8
- uses: actions/checkout@v2
- name: Check for unused Golang imports
uses: Jerome1337/[email protected]
- name: golangci-lint
uses: golangci/[email protected]
with:
# Optional: version of golangci-lint to use in form of v1.2 or v1.2.3 or `latest` to use the latest version
version: v1.45.2
# Optional: working directory, useful for monorepos
working-directory: ./be
args: -v |
I have this problem currently as well with this config:
|
My error was related to that a dependency to a private module didn't get downloaded correctly. |
For me the problem was the combination between the go version and the golangci-lint version. You can specifically set both to latest to see if that is the case. |
I'm seeing an incorrect failure of
typecheck
invoked by[email protected]
in GitHub Actions: https://github.com/jidicula/vci-check/runs/5345676647?check_suite_focus=true#step:3:24Specifically, it's throwing the error:
Error: ReadAll not declared by package io (typecheck)
This is clearly incorrect, as
io.ReadAll()
indeed exists: https://pkg.go.dev/io#ReadAll . Perhaps it's parsing it incorrectly as a type exported byio
rather than an exported function?Running
golangci-lint
1.44.2 locally on my machine does not throw this error.The text was updated successfully, but these errors were encountered: