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

Pretty Print: goanalysis_metalinter output #1820

Closed
hmajid2301 opened this issue Mar 7, 2021 · 4 comments · Fixed by #1861
Closed

Pretty Print: goanalysis_metalinter output #1820

hmajid2301 opened this issue Mar 7, 2021 · 4 comments · Fixed by #1861
Assignees
Labels
enhancement New feature or improvement

Comments

@hmajid2301
Copy link

hmajid2301 commented Mar 7, 2021

I run golangci-lint like golangci-lint run -c .golangci.yml --timeout 5m ./...

Where my .golangci.yml looks like this:

run:
  skip-dirs:
    - tests/data
    - internal/server/models
linters:
  # please, do not use `enable-all`: it's deprecated and will be removed soon.
  # inverted configuration with `enable-all` and `disable` is not scalable during updates of golangci-lint
  disable-all: true
  enable:
    - bodyclose
    - deadcode
    - depguard
    - dogsled
    - dupl
    - errcheck
    - funlen
    - gochecknoinits
    - goconst
    - gocritic
    - gocyclo
    - gofmt
    - goimports
    - golint
    - gomnd
    - goprintffuncname
    - gosec
    - gosimple
    - govet
    - ineffassign
    - interfacer
    - lll
    - misspell
    - nakedret
    - nolintlint
    - rowserrcheck
    - staticcheck
    - structcheck
    - stylecheck
    - typecheck
    - unconvert
    - unparam
    - unused
    - varcheck
    - whitespace

service:
  golangci-lint-version: 1.32.2

Is there a way to pretty print the output from the goanalysis_metalinter:. Currently my output is messy and looks something like:

WARN [runner] Can't run linter goanalysis_metalinter: bodyclose: failed prerequisites: [buildssa@gitlab.com/banter-bus/banter-bus-management-api/internal/service: analysis skipped: errors in package: [/home/haseeb/projects/personal/banter-bus/banter-bus-server/internal/service/user_service.go:336:20: q.getQuestionPath undefined (type QuestionService has no field or method getQuestionPath)]] 
WARN [runner] Can't run linter unused: buildir: analysis skipped: errors in package: [/home/haseeb/projects/personal/banter-bus/banter-bus-server/internal/service/user_service.go:336:20: q.getQuestionPath undefined (type QuestionService has no field or method getQuestionPath)] 
ERRO Running error: buildir: analysis skipped: errors in package: [/home/haseeb/projects/personal/banter-bus/banter-bus-server/internal/service/user_service.go:336:20: q.getQuestionPath undefined (type QuestionService has no field or method getQuestion

It doesn't wrap very nicely in the VSCode terminal

@boring-cyborg
Copy link

boring-cyborg bot commented Mar 7, 2021

Hey, thank you for opening your first Issue ! 🙂 If you would like to contribute we have a guide for contributors.

@ldez
Copy link
Member

ldez commented Mar 7, 2021

Close to #886

@bombsimon
Copy link
Member

#886 seems oldest but a lot of issues refer to #1043.

@hmajid2301
Copy link
Author

Thank you!.

@ldez ldez self-assigned this Mar 19, 2021
@ldez ldez added the enhancement New feature or improvement label Mar 19, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or improvement
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants