Skip to content

[Linter Funlen] Ignore some specific funtions #1895

Closed Answered by ldez
dharmjit asked this question in Q&A
Discussion options

You must be logged in to vote

Hello,

You have 2 solutions:

  • use //nolint:funlen on those functions
//nolint:funlen // explanation
func MyFunction()  {
	// ...
}
  • define an exclude-rules in .golangci.yml
issues:
  exclude-rules:
    - path: path/to/my/file.go
      text: "Function 'MyFunction' is too long"

Replies: 2 comments 1 reply

Comment options

You must be logged in to vote
0 replies
Answer selected by ldez
Comment options

You must be logged in to vote
1 reply
@vimalk78
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants