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

gocyclo linter is not executed when other linters enabled #45

Closed
sdzyba opened this issue May 30, 2018 · 2 comments
Closed

gocyclo linter is not executed when other linters enabled #45

sdzyba opened this issue May 30, 2018 · 2 comments
Labels
bug Something isn't working

Comments

@sdzyba
Copy link

sdzyba commented May 30, 2018

GolangCI-Lint version: 1.3.6
Go version: 1.10

I've noticed that when using default configuration (i.e., default set of linters) and enabling gocyclo both using command line arguments or .golangci.yml, gocyclo is actually not running or it can rarely give one output (although I know it should output a ton of warnings).
Looks like something interrupting it's work.
So I've tried to disable all the linters (including enabled by default) but left gocyclo enabled and it started to work like a charm.
Then I enabled govet and gocyclo continued to work correctly.
But when I was trying to enable some other linters from default linter set, gocyclo went back to incorrect work (or no work at all, to be precise).

Here's the config:

linters:
    enable:
        - gocyclo
    disable:
        - errcheck
        - staticcheck
        - unused
        - gosimple
        - gas
        - structcheck
        - varcheck
        - ineffassign
        - deadcode
        - typecheck

linters-settings:
    gocyclo:
        min-complexity: 5
    golint:
        min-confidence: 0
    govet:
        check-shadowing: true
    maligned:
        suggest-new: true

issues:
  exclude:
    - should have a package comment
    - declaration of "err" shadows declaration
@sdzyba sdzyba changed the title gocyclo linter is not executed gocyclo linter is not executed when other linters enabled May 30, 2018
golangci pushed a commit that referenced this issue May 30, 2018
golangci pushed a commit that referenced this issue May 30, 2018
golangci pushed a commit that referenced this issue May 30, 2018
@golangci
Copy link
Collaborator

thank you for the issue,
fixed it in #46, check, please

@golangci golangci added bug Something isn't working awaiting_for_check_by_author labels May 30, 2018
@sdzyba
Copy link
Author

sdzyba commented Jun 1, 2018

@golangci
thanks, works perfectly now.

@sdzyba sdzyba closed this as completed Jun 1, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant