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

Cannot change settings disabled by default in staticcheck and stylecheck to enabled #5043

Closed
6 of 7 tasks
taniguchi-yoshiki11 opened this issue Sep 27, 2024 · 2 comments
Closed
6 of 7 tasks
Labels
question Further information is requested

Comments

@taniguchi-yoshiki11
Copy link

Welcome

  • Yes, I'm using a binary release within 2 latest releases. Only such installations are supported.
  • Yes, I've searched similar issues on GitHub and didn't find any.
  • Yes, I've read the typecheck section of the FAQ.
  • Yes, I've tried with the standalone linter if available (e.g., gocritic, go vet, etc.).
  • I agree to follow this project's Code of Conduct

Description of the problem

I want to enable ST1020 and ST1021 in staticcheck or stylecheck settings.
However, those settings cannot be activated.

It is a valid setting if it is from staticheck's CLI.
staiticcheck ./...

  • staticcheck.conf
checks = ["all", "-ST1000"]

Version of golangci-lint

$ golangci-lint --version
golangci-lint has version 1.61.0 built with go1.23.1 from a1d6c56 on 2024-09-09T14:33:19Z

Configuration

linters-settings:
  staticcheck:
    checks: ["all", "-ST1000"]
  stylecheck:
    checks: ["all", "-ST1000"]

Go environment

Go1.23.1

Verbose output of running

not relevant

A minimal reproducible example or link to a public repository

not relevant

Validation

  • Yes, I've included all information above (version, config, etc.).

Supporter

@taniguchi-yoshiki11 taniguchi-yoshiki11 added the bug Something isn't working label Sep 27, 2024
Copy link

boring-cyborg bot commented Sep 27, 2024

Hey, thank you for opening your first Issue ! 🙂 If you would like to contribute we have a guide for contributors.

@ldez ldez added question Further information is requested and removed bug Something isn't working labels Sep 27, 2024
@ldez
Copy link
Member

ldez commented Sep 27, 2024

Hello,

Those rules are disabled by default, you must disable default exclusions.

https://golangci-lint.run/usage/false-positives/#default-exclusions

linters-settings:
  staticcheck:
    checks: ["all", "-ST1000"]
  stylecheck:
    checks: ["all", "-ST1000"]
    
    
issues:
  exclude-use-default: false

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants