猿问

“戈朗奇-棉绒跑”问题

我在工作目录中创建了一个,其中有多个默认值,并运行但发现linter仍然是默认值,有人遇到同样的问题吗?我已经检查了路径是否正确。以下是我们的配置值:.golangci.ymllintersgolangci-lint run -v.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


幕布斯6054654
浏览 62回答 1
1回答

呼如林

此 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
随时随地看视频慕课网APP

相关分类

Go
我要回答