作者回复: 在ide中集成,每个文件都检查,非常好的思路。但Ci的时间也需要用到golangci-lint。
作者回复: goland也是需要配置的。
作者回复: nolintlint:用来检查//nolint的格式是否是// nolint: gomnd // xxx这种格式。xxx是nolint的原因,例如: // nolint:unused // may be reused in the feature, or just show a migrate usage. nolintlint可以再.golangci.yaml文件中启用和设置: nolintlint: # Enable to ensure that nolint directives are all used. Default is true. allow-unused: true # Disable to ensure that nolint directives don't have a leading space. Default is true. allow-leading-space: true # Exclude following linters from requiring an explanation. Default is []. allow-no-explanation: [] # Enable to require an explanation of nonzero length after each nolint directive. Default is false. require-explanation: false # Enable to require nolint directives to mention the specific linter being suppressed. Default is false. require-specific: true
作者回复: https://golangci-lint.run/contributing/new-linters/ 看下这篇文章
作者回复: 看下是不是go的安装路径有问题,不是标准的二进制存放路径。其实你这个问题,我没有遇到过,但我网上搜到了相似的问题,里面会有你想要的解释: https://gocn.vip/topics/11648 像这种错误,你可以自己尝试先解决,解决的过程也是学习的过程
作者回复: 感谢反馈,是写反了,我修复下
作者回复: 老师微信nightskong