Labsco
warpdotdev logo

fix-errors

โ˜… 119

by warpdotdev ยท part of warpdotdev/common-skills

Fix compilation errors, linting issues, and test failures in the warp Rust codebase. Covers presubmit checks, WASM-specific errors, and running specific tests. Use when the user hits build errors, clippy or fmt failures, test failures, or needs to run or interpret presubmit before a PR.

๐Ÿงฉ One of 7 skills in the warpdotdev/common-skills package โ€” works on its own, and pairs well with its siblings.

This is the playbook your agent receives when the skill activates โ€” you don't need to read it to use the skill, but it's here to audit before installing.

fix-errors

Fix compilation errors, linting issues, and test failures in the warp Rust codebase.

Overview

This skill helps resolve common issues encountered during development, including:

  • Compilation errors (unused imports, type mismatches, etc.)
  • Linting failures (clippy warnings)
  • Formatting violations
  • WASM-specific errors
  • Test failures

Before opening or updating a pull request, all presubmit checks must pass.

Presubmit Checks

Run all presubmit checks at once:

./script/presubmit

This runs formatting, linting, and all tests. If it passes, you're ready to open a PR.

Individual Checks

Run checks separately when debugging specific issues:

Rust formatting:

cargo fmt -- --check

Clippy (full workspace):

cargo clippy --workspace --exclude warp_completer --all-targets --all-features --tests -- -D warnings
cargo clippy -p warp_completer --all-targets --tests -- -D warnings

WASM Clippy:

cargo clippy --target wasm32-unknown-unknown --profile release-wasm-debug_assertions --no-deps

Objective-C/C/C++ formatting:

./script/run-clang-format.py -r --extensions 'c,h,cpp,m' ./crates/warpui/src/ ./app/src/

All tests:

cargo nextest run --no-fail-fast --workspace --exclude command-signatures-v2
cargo nextest run -p warp_completer --features v2

Doc tests:

cargo test --doc

Best Practices

Before fixing:

  • Read the full error message to understand the root cause
  • Check if multiple errors are related (fixing one may resolve others)
  • For trait/type errors, verify you understand the expected vs actual types
  • For WASM errors, check if code needs to be gated behind local_fs

When fixing:

  • Fix one error type at a time when there are multiple issues
  • Run cargo check frequently to verify fixes
  • For WASM errors, run WASM clippy to verify the fix
  • For complex changes, run relevant tests after fixing

After fixing:

  • Always run cargo fmt and cargo clippy before pushing
  • Run the full presubmit script before opening or updating a PR. Use the create-pr skill for more detailed instructions
  • Verify tests pass in the areas you modified