Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 10 additions & 4 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -53,10 +53,16 @@ jobs:
- name: Install Whitaker
run: |
if [ "${{ steps.cache-whitaker.outputs.cache-hit }}" != "true" ]; then
cargo binstall --no-confirm --locked \
--git https://github.com/leynos/whitaker \
--version "${WHITAKER_INSTALLER_VERSION}" \
whitaker-installer
if cargo binstall --version >/dev/null 2>&1; then
cargo binstall --no-confirm --locked \
--git https://github.com/leynos/whitaker \
--version "${WHITAKER_INSTALLER_VERSION}" \
whitaker-installer
else
echo "cargo-binstall unavailable; building whitaker-installer from crates.io"
cargo install --locked whitaker-installer \
--version "${WHITAKER_INSTALLER_VERSION}"
fi
fi
whitaker-installer --cranelift

Expand Down
2 changes: 1 addition & 1 deletion AGENTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -168,7 +168,7 @@ working on the Rust portions of the project:
```sh
RUSTDOCFLAGS="-D warnings" cargo doc --no-deps
cargo clippy --all-targets --all-features -- -D warnings
whitaker --all -- --all-targets --all-features
RUSTFLAGS="-D warnings" whitaker --all -- --all-targets --all-features
```

linting every target with all features enabled and denying all Clippy
Expand Down
7 changes: 4 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ TOOLS = $(MDFORMAT_ALL) $(MDLINT) uv
VENV_TOOLS = pytest ruff
RUST_DIR ?= rust
CARGO ?= cargo
WHITAKER ?= whitaker
BUILD_JOBS ?=
RUST_FLAGS ?= -D warnings
RUSTDOC_FLAGS ?= -D warnings
Expand Down Expand Up @@ -88,17 +89,17 @@ check-fmt: ruff ## Verify formatting
cd $(RUST_DIR) && $(CARGO) fmt --all -- --check
# mdformat-all doesn't currently do checking

lint: ruff uv ## Run linters
lint: ruff uv ## Run linters (Ruff, pylint, Clippy, Whitaker)
$(RUFF) check
$(UV_RUN_ENV) uv run interrogate --fail-under 100 cuprum
$(PYLINT) $(PYLINT_TARGETS)
cd $(RUST_DIR) && RUSTDOCFLAGS="$(RUSTDOC_FLAGS)" $(CARGO) doc --no-deps
cd $(RUST_DIR) && $(CARGO) clippy $(CLIPPY_FLAGS)
@if ! $(LOCAL_TOOL_ENV) command -v whitaker >/dev/null 2>&1; then \
@if ! $(LOCAL_TOOL_ENV) command -v $(WHITAKER) >/dev/null 2>&1; then \
echo "whitaker is required for linting. Install it before running this target." >&2; \
exit 1; \
fi
cd $(RUST_DIR) && $(LOCAL_TOOL_ENV) whitaker --all -- $(CARGO_FLAGS)
cd $(RUST_DIR) && $(LOCAL_TOOL_ENV) RUSTFLAGS="$(RUST_FLAGS)" $(WHITAKER) --all -- $(CARGO_FLAGS)

typecheck: build ## Run typechecking
$(UV_RUN_ENV) uv sync --group dev
Expand Down
3 changes: 3 additions & 0 deletions rust/dylint.toml
Original file line number Diff line number Diff line change
@@ -1,2 +1,5 @@
[no_std_fs_operations]
# _rust_backend_native never opens filesystem paths itself; it wraps raw file
# descriptors and handles received from the Python caller in std::fs::File, so
# capability-based alternatives such as cap-std do not apply here.
excluded_crates = ["_rust_backend_native"]
Loading