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

Ignore go generate directives #13

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

Antonboom
Copy link

@Antonboom Antonboom commented Nov 13, 2020

Hello!

We now have to do this, which is not very beautiful

//nolint:lll
//go:generate mockgen -source=$GOFILE --build_flags=-mod=mod -destination mocks/mocks.go -package eventsubscriptionmocks . IAvailability,IMarketsConfig,ILPClient

@Antonboom
Copy link
Author

Antonboom commented Nov 13, 2020

Just now noticed the --exclude option 🤦

And in golangci-lint:

    # Exclude lll issues for long lines with go:generate
    - linters:
        - lll
      source: "^//go:generate "

Most likely this PR can be closed. Although it seems like ignoring go generate directive is normal behavior (like ignoring files created with it).

I'll leave it up to you.

Thanks!

@Antonboom
Copy link
Author

Implemented on golangci-lint side – golangci/golangci-lint#3572

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

Successfully merging this pull request may close these issues.

1 participant