Skip to content
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

[TS-290] in run-staticcheck step, build fail if we have unmatched go version #109

Closed
ghost opened this issue Mar 17, 2023 · 3 comments
Closed

Comments

@ghost
Copy link

ghost commented Mar 17, 2023

I am using go1.18 in my project, and in the previous steps, I have used actions/setup-go@v2 with go-version 1.18. to run codacy analysis CLI, the static-check still give me no option to use go1.20. I saw the shell script change 3 days ago and yesterday there is a fix version. I can live with the update but I need an option inside of staticcheck to set go version.

@github-actions github-actions bot changed the title in run-staticcheck step, build fail if we have unmatched go version [TS-290] in run-staticcheck step, build fail if we have unmatched go version Mar 17, 2023
@github-actions
Copy link

Internal ticket created : TS-290

@ghost
Copy link
Author

ghost commented Mar 17, 2023

when I update actions/setup-go@v3, it will pass. But this static check still need to based on client pointed go version check and becomes meaningful.
Attachment of part of my action:

  codacy-analysis-cli:
    name: Codacy Analysis CLI
    runs-on: ubuntu-latest
    timeout-minutes: 15
    env:
      GO111MODULE: on
      GOPRIVATE: github.com/company/*
      GONOSUMDB: github.com/company/*
    steps:
      - name: Checkout code
        uses: actions/checkout@main

      - name: Setup GoLang
        uses: actions/setup-go@v3
        with:
          go-version: 1.18 # The Go version to download (if necessary) and use.

      - name: Configure Git for Golang
        run: |
          git config --global url."https://${{ secrets.CODACY_GH_TOKEN }}:x-oauth-basic@github.com/company".insteadOf "https://github.com/company"

      - name: Run Codacy Analysis CLI
        uses: codacy/codacy-analysis-cli-action@master
        with:
          run-staticcheck: true
          run-gosec: true
          skip-uncommitted-files-check: true
          allow-network: true
          api-token: ${{ secrets.CODACY_API }}
          upload: true
          max-allowed-issues: 2147483647

@DMarinhoCodacy
Copy link
Contributor

Hello @changsheng-liu-od

Thanks for reporting this.

What kind of error are you receiving? We use go 1.20.2 in the script to install staticcheck and have better compatibility with the latest changes in the language.

Kind regards,
David Marinho

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants
@DMarinhoCodacy and others