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

Allow spaces inside "nolint" directive #405

Closed
leonklingele opened this issue Feb 26, 2019 · 2 comments
Closed

Allow spaces inside "nolint" directive #405

leonklingele opened this issue Feb 26, 2019 · 2 comments
Labels
area: nolint Related to nolint directive and nolintlint question Further information is requested

Comments

@leonklingele
Copy link
Member

I'm migrating from gometalinter which will probably be discontinued soon.

The syntax used by gometalinter to disable specific / all linters is as follows (see their README, GitHub doesn't allow linking to lines in Markdown files):

// nolint[: <linter>[, <linter>, ...]]

whereas this project uses the following syntax:

//nolint[:linter1,linter2,...]

Both currently seem to be supported by golangci-lint but that might not be intentional.

Which of the following forms are officially supported?

  • // nolint[: <linter>[, <linter>, ...]]
  • // nolint[:<linter>[,<linter>,...]]
  • //nolint[: <linter>[, <linter>, ...]]
  • //nolint[:<linter>[,<linter>,...]]
@jirfag
Copy link
Contributor

jirfag commented Mar 5, 2019

Hi!
All of these forms are supported for compatibility with the gometalinter. But the only one mentioned in the README is //nolint[:linter1,linter2,...] because it's the recommended one.

@leonklingele
Copy link
Member Author

Thanks!

@ldez ldez added area: nolint Related to nolint directive and nolintlint question Further information is requested labels Mar 24, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area: nolint Related to nolint directive and nolintlint question Further information is requested
Projects
None yet
Development

No branches or pull requests

3 participants