Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Configure golangci-lint to skip some linters in test files #72

Closed
orlangure opened this issue Oct 15, 2020 · 2 comments · Fixed by #75
Closed

Configure golangci-lint to skip some linters in test files #72

orlangure opened this issue Oct 15, 2020 · 2 comments · Fixed by #75
Assignees
Labels
build Related to CI pipeline good first issue Good for newcomers hacktoberfest Contributions as a part of Hacktoberfest are welcome! help wanted Extra attention is needed

Comments

@orlangure
Copy link
Owner

Right now, there is a bunch of // nolint:funlen or // nolint:bodyclose comments in various tests. These comments tell golangci-lint to exclude the marked tests from linter reports.

Instead of marking each test file separately, there is a configuration of golangci-lint that we can set once in .golangci-lint.yaml. This configuration should apply to all test files.

Linters that should be disabled for test files:

  • bodyclose
  • funlen
  • gosec
@orlangure orlangure added help wanted Extra attention is needed good first issue Good for newcomers build Related to CI pipeline hacktoberfest Contributions as a part of Hacktoberfest are welcome! labels Oct 15, 2020
@u5surf
Copy link
Contributor

u5surf commented Oct 15, 2020

@orlangure
Hi, Can I work on this issue?

@orlangure
Copy link
Owner Author

Hi @u5surf,
Sure, thank you!

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
build Related to CI pipeline good first issue Good for newcomers hacktoberfest Contributions as a part of Hacktoberfest are welcome! help wanted Extra attention is needed
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants