Skip to content

feat: 增加五语言静态检查基线#13

Merged
baobao84 merged 1 commit into
mainfrom
agent/lint-warning-baseline
Jul 11, 2026
Merged

feat: 增加五语言静态检查基线#13
baobao84 merged 1 commit into
mainfrom
agent/lint-warning-baseline

Conversation

@wecomgroup

Copy link
Copy Markdown
Contributor

变更内容

  • Node.js 增加 ESLint 9 配置、锁定开发依赖和 npm run lint
  • Python 增加 Ruff 配置和 .[dev] 可选依赖。
  • PHP 增加 PHPStan 6 级配置、锁定开发依赖和 Composer lint 脚本。
  • Java 增加 Checkstyle 配置及 Maven verify 阶段检查。
  • Go 增加 golangci-lint v2 配置,并启用 gofmt、govet、staticcheck、errcheck、ineffassign 和 unused。
  • 五种语言的 lint 检查接入现有 ci.yml,并补充中英文贡献指南中的本地命令。
  • 修复 lint 发现的现有问题,包括 PHPDoc 类型、Python 异常处理、Java 格式、Go 格式与反射常量检查。

验证

  • npm run lintnpm test:通过。
  • ruff check .、Python unittest:通过。
  • composer run lint、PHP runner:通过。
  • mvn --batch-mode --no-transfer-progress verify、Java runner:通过。
  • golangci-lint run ./...go test -count=1 ./...:通过。
  • actionlint .github/workflows/ci.yml:通过。
  • composer validate --strictgit diff --check:通过。

影响

这些工具均为开发/CI 检查依赖,不改变五种 SDK 的运行时依赖和对外接口。合并后可据此更新 OpenSSF Best Practices 的 warningswarnings_fixedwarnings_strict

@wecomgroup wecomgroup left a comment

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

已完成五种语言静态检查基线接入:

  • Node.js:ESLint
  • Python:Ruff
  • PHP:PHPStan
  • Java:Checkstyle
  • Go:golangci-lint、gofmt、govet、staticcheck

本地测试、五语言 CI 和 CodeQL 均已通过,现有 lint 告警已全部处理。

@baobao84 baobao84 merged commit 205e678 into main Jul 11, 2026
15 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants