Skip to content

Commit f79c918

Browse files
committed
ci: enforce unsafe_code prohibition in workflows
Add RUSTFLAGS="-F unsafe_code" to both CI and release workflows as a belt-and-braces measure alongside the existing #![forbid(unsafe_code)] attribute. Also trim redundant cargo check entries from CLAUDE.md.
1 parent 3633b99 commit f79c918

File tree

3 files changed

+3
-2
lines changed

3 files changed

+3
-2
lines changed

.github/workflows/release.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ on:
1010

1111
env:
1212
CARGO_TERM_COLOR: always
13+
RUSTFLAGS: "-F unsafe_code"
1314

1415
jobs:
1516
build:

.github/workflows/rust.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ on:
1212

1313
env:
1414
CARGO_TERM_COLOR: always
15+
RUSTFLAGS: "-F unsafe_code"
1516

1617
jobs:
1718
build:

CLAUDE.md

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,9 +17,8 @@ HashRust is a CLI file hashing utility written in Rust that supports multiple ha
1717
- `cargo test --test integration_tests` - Run integration tests
1818

1919
### Code Quality
20-
- `cargo check` - Fast compilation check without producing binary
21-
- `cargo clippy` - Run linter with standard warnings
2220
- `cargo clippy -- -D clippy::all -D clippy::pedantic` - Run pedantic clippy checks (matches .vscode/tasks.json)
21+
- `RUSTFLAGS="-F unsafe_code" cargo build` - Verify no unsafe code (belt-and-braces alongside `#![forbid(unsafe_code)]`)
2322
- `cargo fmt` - Format code
2423

2524
### Running

0 commit comments

Comments
 (0)