`golangci-lint运行` 问题

`golangci-lint run` issue

我在工作目录中创建了一个.golangci.yml,它比默认值多linters,运行 golangci-lint run -v但发现linters仍然是默认值,任何人都遇到过同样的情况问题?我已经检查 .golangci.yml 路径是否正确。下面是我们的配置值:

linters:
disable-all: true
enable:
  - bodyclose
  - deadcode
  - depguard
  - dogsled
  - dupl
  - errcheck
  - exhaustive
  - gochecknoinits
  - goconst
  - gocritic
  - gofmt
  - gomnd
  - goprintffuncname
  - gosec
  - gosimple
  - govet
  - ineffassign
  - interfacer
  - lll
  - misspell
  - nakedret
  - noctx

此 yaml 文件缩进不正确。尝试:

linters:
  enable:
    - bodyclose
    - deadcode
    - depguard
    - dogsled
    - dupl
    - errcheck
    - exhaustive
    - gochecknoinits
    - goconst
    - gocritic
    - gofmt
    - gomnd
    - goprintffuncname
    - gosec
    - gosimple
    - govet
    - ineffassign
    - interfacer
    - lll
    - misspell
    - nakedret
    - noctx