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

How to pass flag and how to ingore lint #30

Open
zfy0701 opened this issue Jan 14, 2023 · 1 comment
Open

How to pass flag and how to ingore lint #30

zfy0701 opened this issue Jan 14, 2023 · 1 comment

Comments

@zfy0701
Copy link

zfy0701 commented Jan 14, 2023

Hi Guys

Thanks for the great works, I have two questions

  1. for some checks, e.g. ST1003, it allow pass custom flags, https://staticcheck.io/docs/configuration/options/#initialisms, I tried:
  "ST1003": {
    "analyzer_flags": {
      "initialisms": "GCS"
    }
  }

but it reports:

compilepkg: nogo: error running analyzers: ST1003: unrecognized flag: initialisms
``
2. there are some situation the lint give false positive and I would need to ignore it, follow this https://staticcheck.io/docs/configuration/#line-based-linter-directives wouldn't work, could please advise?
@sluongng
Copy link
Owner

It's unclear to me how staticcheck set this config. Unless it's passed via Analyzer.Flags, it would not work nicely with nogo. In such case, some additional manual wiring is required. 🤔

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

No branches or pull requests

2 participants