check

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese
Check if the code you just wrote follows the development guidelines.
Execute these steps:
  1. Identify changed files:
    bash
    git diff --name-only HEAD
  2. Determine which spec modules apply based on the changed file paths:
    bash
    python3 ./.trellis/scripts/get_context.py --mode packages
  3. Read the spec index for each relevant module:
    bash
    cat .trellis/spec/<package>/<layer>/index.md
    Follow the "Quality Check" section in the index.
  4. Review your code against each relevant guideline listed in the index.
  5. Run lint and typecheck for the affected package.
  6. Report any violations and fix them if found.
检查你刚编写的代码是否符合开发准则。
执行以下步骤:
  1. 识别已变更文件
    bash
    git diff --name-only HEAD
  2. 根据已变更文件路径确定适用的规范模块
    bash
    python3 ./.trellis/scripts/get_context.py --mode packages
  3. 读取每个相关模块的规范索引
    bash
    cat .trellis/spec/<package>/<layer>/index.md
    遵循索引中的**“Quality Check”**部分。
  4. 对照索引中列出的每条相关准则审查你的代码
  5. 对受影响的包运行lint与类型检查
  6. 报告所有违规情况,若发现问题则进行修复。