Skip to content

Commit 571dcd3

Browse files
authored
Merge pull request #38 from full-stack-plugins/feat/p0-routing-openspec-v0.6.10-main-merge
feat(gate): 推送本地硬化批次合并 main(含 ruff subprocess check=False 修复)
2 parents c3a9716 + 9b57e8e commit 571dcd3

25 files changed

Lines changed: 1833 additions & 39 deletions

File tree

‎README.md‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ codeguard check --lang java /path/to/project
4848

4949
The planner reads Maven POM / Gradle Groovy or Kotlin DSL, prefers project wrappers, maps files to modules and computes reverse transitive dependencies. Changing api can require checking service and app even if their files did not change. Deletions, resources and build descriptors are included.
5050

51-
Maven plans use verify, with -pl and -am for a safe subset. Gradle plans use root check or affected :module:check tasks. Profiles, unresolved properties, inherited dependencies or recognized dynamic/composite Gradle builds expand the plan conservatively. Planning never executes a build, downloads dependencies, installs tools or initializes CodeGraph.
51+
Maven plans use verify with -DskipTests (test code still compiles; only execution is skipped), with -pl and -am for a safe subset. Gradle plans use root check or affected :module:check tasks with -x test. The default level checks compilation, packaging and lifecycle-bound static checks; test execution belongs to CI or an explicit java.commands declaration. Profiles, unresolved properties, inherited dependencies or recognized dynamic/composite Gradle builds expand the plan conservatively. Planning never executes a build, downloads dependencies, installs tools or initializes CodeGraph.
5252

5353
### Explicit project commands
5454

@@ -64,7 +64,7 @@ A root codeguard.json can declare authoritative argv lists:
6464
}
6565
```
6666

67-
Commands run in order, stopping on failure. They are trusted project configuration, not shell strings. Running check or the Git gate may execute project plugins/tests and access package registries; this is **not a sandbox**.
67+
Commands run in order, stopping on failure. They are trusted project configuration, not shell strings. Declaring commands is also how a project opts into a stronger level than the default — for example the full verify including test execution shown above. Running check or the Git gate executes project builds and may run project plugins; the default level skips test execution (-DskipTests / -x test), but configured commands or plugin-bound tasks may run tests, and package registries may be accessed — this is **not a sandbox**.
6868

6969
Coverage is module-level, not a symbol call graph or business-semantic proof. A successful verify/check does not establish that Checkstyle, PMD, SpotBugs or tests are configured comprehensively. Inspect the plan's gaps and reasons.
7070

@@ -117,7 +117,7 @@ Output logs default to <project>/out/.codeguard-last.log; CLI --quiet disables l
117117

118118
Root codeguard.json may set gate_scope to delta or repo and customize extension/exclusion detection. User settings retain enabled_languages, auto_fix_on_save and lint_timeout_seconds. strict_mode is reserved and does not make PostToolUse block. See the [hook protocol](hooks/__protocol__.md).
119119

120-
The registry contains **54 Stable adapters and 3 Planned entries**. “Stable” does not certify every toolchain or project. Markdown/YAML require project configuration; missing configuration is UNVERIFIED. Markdown findings are advisory. Generated and dependency directories are excluded from ordinary lint scope, not automatically accepted for commit. Full command inventory: [languages](docs/LANGUAGES.md).
120+
The registry contains **54 Stable adapters and 3 Planned entries**. “Stable” does not certify every toolchain or project. Markdown/YAML require project configuration; missing configuration is UNVERIFIED. Markdown findings are advisory. Generated and dependency directories are excluded from ordinary lint scope, not automatically accepted for commit. Python checks honor the project's own ruff configuration (ruff.toml / .ruff.toml / [tool.ruff]); when none exists, codeguard injects a default rule set pinned to the CI baseline (ruff==0.16.8) so verdicts do not drift with whichever ruff version a machine happens to have. Full command inventory: [languages](docs/LANGUAGES.md).
121121

122122
The explicit escape hatch git config codeguard.skipGate true bypasses the hook gate and is recorded in session summaries. Shared hook state lives under CODEGUARD_HOME (default ~/.codeguard).
123123

‎README.zh-CN.md‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ codeguard check --lang java /path/to/project
4848

4949
规划器读取 Maven POM / Gradle Groovy、Kotlin DSL,优先项目 wrapper,将文件映射到模块,再计算反向传递依赖。修改 api 可能要求复查 service 和 app,即使调用方文件没有变化。删除、资源与构建描述变更均纳入分析。
5050

51-
Maven 使用 verify,安全子集增加 -pl、-am;Gradle 使用根 check 或受影响的 :module:check。profiles、未解析属性、父依赖继承或识别到的动态/复合 Gradle 构建会保守扩大范围。规划不会执行构建、下载依赖、安装工具或初始化 CodeGraph。
51+
Maven 使用 verify 并追加 -DskipTests(测试代码仍编译,仅跳过执行),安全子集增加 -pl、-am;Gradle 使用根 check 或受影响的 :module:check 并追加 -x test。默认等级检查编译、打包与生命周期绑定的静态检查;测试执行属于 CI 或显式 java.commands 声明的职责边界。profiles、未解析属性、父依赖继承或识别到的动态/复合 Gradle 构建会保守扩大范围。规划不会执行构建、下载依赖、安装工具或初始化 CodeGraph。
5252

5353
### 项目权威命令
5454

@@ -64,7 +64,7 @@ Maven 使用 verify,安全子集增加 -pl、-am;Gradle 使用根 check 或
6464
}
6565
```
6666

67-
命令顺序执行,失败停止。它们是可信项目配置,不是 shell 字符串。执行 check 或 Git 门禁可能运行项目插件、测试并访问依赖仓库;**这不是沙箱**。
67+
命令顺序执行,失败停止。它们是可信项目配置,不是 shell 字符串。声明命令也是项目升级检查等级的途径——例如上例执行含测试的完整 verify。执行 check 或 Git 门禁会运行项目构建、可能触发项目插件;默认等级跳过测试执行(-DskipTests / -x test),但配置命令或插件绑定任务可能运行测试,并可能访问依赖仓库;**这不是沙箱**。
6868

6969
本轮覆盖模块级,不是符号调用图或业务语义证明。verify/check 成功不代表 Checkstyle、PMD、SpotBugs 或测试配置完整;应查看计划的 gaps 和 reasons。
7070

@@ -117,7 +117,7 @@ python3 scripts/run_check.py --mcp /path/to/project
117117

118118
仓根 codeguard.json 的 gate_scope 可选 delta/repo,也可定制扩展名和排除规则。用户设置保留 enabled_languages、auto_fix_on_save、lint_timeout_seconds。strict_mode 是保留字段,不会令 PostToolUse 阻断,详见[钩子协议](hooks/__protocol__.md)。
119119

120-
注册表含 **54 个 Stable 适配器和 3 个 Planned 项**。“Stable” 不证明全部工具链或项目已验证。Markdown/YAML 需要项目配置,缺配置为 UNVERIFIED;Markdown 违规只告警。生成物和依赖目录从普通 lint 范围排除,不等于允许入库。完整命令见[语言清单](docs/LANGUAGES.md)。
120+
注册表含 **54 个 Stable 适配器和 3 个 Planned 项**。“Stable” 不证明全部工具链或项目已验证。Markdown/YAML 需要项目配置,缺配置为 UNVERIFIED;Markdown 违规只告警。生成物和依赖目录从普通 lint 范围排除,不等于允许入库。Python 检查优先使用项目自有 ruff 配置(ruff.toml / .ruff.toml / [tool.ruff]);项目无自有配置时注入钉扎在 CI 基线(ruff==0.16.8)的默认规则集,判定不随机器上 ruff 版本漂移。完整命令见[语言清单](docs/LANGUAGES.md)。
121121

122122
显式逃生门 git config codeguard.skipGate true 会绕过钩子门禁,并在会话总结中记录。共享状态位于 CODEGUARD_HOME(默认 ~/.codeguard)。
123123

‎docs/LANGUAGES.md‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99

1010
| 语言 | 扩展名 | Lint 命令 | Format 命令 | 安装说明 |
1111
|---|---|---|---|---|
12-
| Java | `.java` | `mvn -B verify` | `mvn -q spotless:apply` | — |
12+
| Java | `.java` | `mvn -B -DskipTests verify` | `mvn -q spotless:apply` | — |
1313
| Rust | `.rs` | `cargo clippy --all-targets -- -D warnings` | `cargo fmt` | — |
1414
| TypeScript / JavaScript | `.ts` `.tsx` `.js` `.jsx` `.mjs` `.cjs` | `npx --no-install eslint . --max-warnings 0` | `npx eslint . --fix` | 项目需安装 eslint |
1515
| Python | `.py` | `ruff check .` | `ruff check . --fix` | pip install ruff |

0 commit comments

Comments
 (0)