Skip to content
Merged
15 changes: 15 additions & 0 deletions .claude/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
{
"hooks": {
"PostToolUse": [
{
"matcher": "Edit|Write",
"hooks": [
{
"type": "command",
"command": "echo '\n[Reminder] Run: cargo fmt --all && make lint-fix && cargo check'"
Copy link
Member

Choose a reason for hiding this comment

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

I don't think we need cargo check if we already run clippy

Copy link
Member

Choose a reason for hiding this comment

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

I'm removing the cargo check command and merging this - please correct me if i wrong

}
]
}
]
}
}
6 changes: 6 additions & 0 deletions CLAUDE.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,12 @@

This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository.

## CRITICAL - Always Follow

After completing ANY code changes:
1. **MUST** run `cargo fmt --all && make lint-fix` to format and fix linting issues
2. **MUST** run `cargo check` to verify compilation before considering task complete

## Development Commands

**Important**: Always branch from `unstable` and target `unstable` when creating pull requests.
Expand Down
7 changes: 7 additions & 0 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -120,6 +120,7 @@ bytes = "1.11.1"
# Turn off c-kzg's default features which include `blst/portable`. We can turn on blst's portable
# feature ourselves when desired.
c-kzg = { version = "2.1", default-features = false }
cargo-husky = { version = "1", default-features = false, features = ["precommit-hook", "run-cargo-fmt"] }
cargo_metadata = "0.19"
clap = { version = "4.5.4", features = ["derive", "cargo", "wrap_help"] }
clap_utils = { path = "common/clap_utils" }
Expand Down
2 changes: 2 additions & 0 deletions lighthouse/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ rust-version = "1.88.0"
# to assert properties of the compilation target.
[package.metadata.cargo-udeps.ignore]
normal = ["target_check"]
development = ["cargo-husky"]

[features]
default = ["slasher-lmdb", "beacon-node-leveldb"]
Expand Down Expand Up @@ -84,6 +85,7 @@ malloc_utils = { workspace = true, features = [] }
beacon_node = { workspace = true, features = ["testing"] }
beacon_node_fallback = { workspace = true }
beacon_processor = { workspace = true }
cargo-husky = { workspace = true }
eth2 = { workspace = true }
initialized_validators = { workspace = true }
lighthouse_network = { workspace = true }
Expand Down