.golangci.json 在golangci-lint 官方文档 https://golangci-lint.run/usage/configuration/#config-file 中,提供了一个示例配置文件,非常地详细,在这其中包含了所有支持的选项、描述和默认值。 使用pre-commit hook 在项目开发中,我们都会使用到 git,因此我们可以将代码静态检查放在一个 git 触发点上,而不用...
.golangci.json 在golangci-lint 官方文档 https://golangci-lint.run/usage/configuration/#config-file 中,提供了一个示例配置文件,非常地详细,在这其中包含了所有支持的选项、描述和默认值。 使用pre-commit hook 在项目开发中,我们都会使用到 git,因此我们可以将代码静态检查放在一个 git 触发点上,而不用...
此仓库是为了提升国内下载速度的镜像仓库,每日同步一次。 原始仓库:https://github.com/golangci/golangci-lint master 克隆/下载 git config --global user.name userName git config --global user.email userEmail 分支3 标签164 Oleksandr Redkodocs: add arguments to `revive.error-strin...932b1f412天前...
golangci-lint 是一个代码检查工具的集合,聚集了多种 Go 代码检查工具,如 golint、go vet 等。 优点: 运行速度快 可以集成到 vscode、goland 等开发工具中 包含了非常多种代码检查器 可以集成到 CI 中 这是包含的代码检查器列表:Linters 安装 golangci-lint 官方不建议使用 go get 方式安装,推荐使用二进制...
golangci-lint run [flags] Flags: -c, --config PATH Read config from file path PATH --no-config Don't read config file -D, --disable strings Disable specific linter --disable-all Disable all linters -E, --enable strings Enable specific linter ...
CI: update golangci-lint config Browse files main v1.2.3 … v1.1.0 xjasonlyu committed May 11, 2023 1 parent 3c80489 commit 90893df Showing 1 changed file with 13 additions and 6 deletions. Whitespace Ignore whitespace Split Unified 19 changes: 13 additions & 6 deletions 19 .go...
太多的命令行选项会让生活变得一团糟。请改用配置文件。一个好的起点是https://golangci-lint.run/usage/configuration/#config-file。 通过修改配置文件来调整 linter 的行为。您的团队可能会发现,如果函数超过 60 行或 40 条语句,并且行长超过 120 个字符,那么它仍然具有可读性。
golangci-lint run -v --no-config --disable-all -E goimports --fix main.go 常用的Linter介绍 typecheck 与go编译器类似的类型检查 cyclop govet Vet检查Go源代码并报告可疑的结构,比如Printf调用,其参数与格式字符串不一致 ineffassign 检测对现有变量的赋值何时未被使用 ...
太多的命令行选项会让生活变得一团糟。请改用配置文件。一个好的起点是https://golangci-lint.run/usage/configuration/#config-file。 通过修改配置文件来调整 linter 的行为。您的团队可能会发现,如果函数超过 60 行或 40 条语句,并且行长超过 120 个字符,那么它仍然具有可读性。
Add the /etc/uyuni/uyuni-tools.yaml path to the config help golangci-lint #985: Pull request #401 opened by cbosdo cbosdo:config-help-fix July 12, 2024 09:18 39s Inspection refactoring and cleanup golangci-lint #984: Pull request #400 synchronize by cbosdo cbosdo:inspect-ref...