界面已本地化;技能介绍与说明文档按所选语言由 AI 自动翻译,代码、命令、路径和专业术语保留原文,以原作者文档为准。
探索技能
开发与工程 · SKILL.md

lint

lint

【开发与工程】Check code quality and formatting before committing changes

独立 GitHub 快照 · 自动分类 · 以原作者文档为准

技能说明

GitHub

name: lint description: Check code quality and formatting before committing changes

Lint Skill

Check code quality and formatting before committing changes.

Usage

Run this skill to check for lint errors and formatting issues.

Instructions

  1. Run the lint check:

    make lint
    
  2. If clippy reports warnings or errors, fix them before proceeding

  3. Check formatting:

    make fmt CHECK=1
    
  4. If formatting check fails, apply formatting:

    make fmt
    
  5. If license headers are missing, add them:

    cd src/redisearch_rs && cargo license-fix
    

Common Clippy Fixes

  • Document unsafe blocks: Add // SAFETY: comment explaining why the unsafe code is sound
  • Use #[expect(...)]: Prefer over #[allow(...)] for lint suppressions

Rust-Specific Checks

For Rust-only linting:

cd src/redisearch_rs && cargo clippy --all-targets --all-features
我的收藏