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

Update Golang linter configuration to avoid the deprecated linters.govet.check-shadowing option #5605

Closed
1 task done
KaiSchwarz-cnic opened this issue May 3, 2024 · 1 comment · Fixed by #5654
Closed
1 task done
Labels
enhancement New feature or request O: backlog 🤖 Backlog, stale ignores this label

Comments

@KaiSchwarz-cnic
Copy link

KaiSchwarz-cnic commented May 3, 2024

Is there an existing issue for this?

  • I have searched the existing issues

Current Behavior

level=warning msg="[config_reader] The configuration option `linters.govet.check-shadowing` is deprecated. Please enable `shadow` instead, if you are not using `enable-all`."
level=error msg="[linters_context] typechecking error: named files must all be in one directory; have /github/workspace/response and /github/workspace/responsetranslator"

we haven't applied any linter configuration settings. we're wondering about that warning.
how we use it in our workflow:

      - name: Super Linter Code Base
        uses: github/super-linter/slim@v6
        env:
          FILTER_REGEX_EXCLUDE: "**/*_test.go"
          DEFAULT_BRANCH: master
          VALIDATE_GO_MODULES: true
          VALIDATE_BASH: true
          VALIDATE_ALL_CODEBASE: false
          GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

Thanks

Expected Behavior

no warning to appear.

Super-Linter version

slim image v6.4.1

Relevant log output

see description.

https://github.com/centralnicgroup-opensource/rtldev-middleware-go-sdk/actions/runs/8939075947/job/24558831196?pr=136

Steps To Reproduce

  1. you may fork our go-sdk repo
  2. we have a shareable workflow in place, related superlinter action plugin usage snippet provided. go version installed v1.22.2
  3. no linter config file in place for golang, so falling back to super-linter's defaults

Anything else?

No response

@KaiSchwarz-cnic KaiSchwarz-cnic added the bug Something isn't working label May 3, 2024
@KaiSchwarz-cnic KaiSchwarz-cnic changed the title GOLANG Linter fails GOLANG Linter warning related to option linters.govet.check-shadowing May 3, 2024
@ferrarimarco
Copy link
Collaborator

Hi @KaiSchwarz-cnic !

I think this is due to this line in the default configuration that we super-linter uses for the Go linter.

The fix should be as the suggestion you reported states.

Feel free to send a PR, I'll happily review it. It should be about updating the file I linked.

Given that there's nothing broken because of this, I'm going to classify this as an enhancement request.

@ferrarimarco ferrarimarco added enhancement New feature or request O: backlog 🤖 Backlog, stale ignores this label and removed bug Something isn't working labels May 3, 2024
@ferrarimarco ferrarimarco changed the title GOLANG Linter warning related to option linters.govet.check-shadowing Update Golang linter configuration to avoid the deprecated linters.govet.check-shadowing option May 3, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request O: backlog 🤖 Backlog, stale ignores this label
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants