Skip to content

Add linter version to config file #563

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

Closed
maratori opened this issue Jun 9, 2019 · 1 comment
Closed

Add linter version to config file #563

maratori opened this issue Jun 9, 2019 · 1 comment
Labels
area: config Related to .golangci.yml and/or cli options enhancement New feature or improvement stale No recent correspondence or work activity

Comments

@maratori
Copy link
Contributor

maratori commented Jun 9, 2019

Here if feature request.

I'd like to fix version of golangci-lint in config file .golangci.yml.
It should fail if version of linter differs from config.
This is especially actual for local run (i.e. pre-commit). To be sure right version is used.

Example of config file:

version: v1.17.0

run:
  deadline: 2m

linters-settings:
  errcheck:
    check-type-assertions: true
  govet:
    check-shadowing: true
  goimports:
    local-prefixes: github.com/gtforge/atol_integration_service
  lll:
    line-length: 120
  unused:
    check-exported: true
  unparam:
    check-exported: true
  nakedret:
    max-func-lines: 30
  maligned:
    suggest-new: true

linters:
  disable-all: true
  enable:
    ## enabled by default
    - deadcode
    - errcheck
    - gosimple
    - govet
    - ineffassign
    - staticcheck
    - structcheck
    - typecheck
    - unused
    - varcheck
    ## disabled by default
    - bodyclose
    - depguard
    - dupl
    - goconst
    - gocritic
    - gocyclo
    - goimports
    - golint
    - gosec
    - interfacer
    - lll
    - maligned
    - misspell
    - nakedret
    - prealloc
    - scopelint
    - unconvert
    - unparam

issues:
  max-issues-per-linter: 0
  max-same-issues: 0
@tpounds tpounds added enhancement New feature or improvement area: config Related to .golangci.yml and/or cli options labels Sep 29, 2019
@stale
Copy link

stale bot commented Mar 27, 2020

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the stale No recent correspondence or work activity label Mar 27, 2020
@stale stale bot closed this as completed Apr 10, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area: config Related to .golangci.yml and/or cli options enhancement New feature or improvement stale No recent correspondence or work activity
Projects
None yet
Development

No branches or pull requests

2 participants