diff --git a/scripts/ci/rust_checks.py b/scripts/ci/rust_checks.py index 2aa21689d2ed..d6cfa115a2e2 100755 --- a/scripts/ci/rust_checks.py +++ b/scripts/ci/rust_checks.py @@ -33,7 +33,9 @@ def run_cargo(cargo_cmd, cargo_args: str, clippy_conf: str | None = None) -> Tim env["RUSTFLAGS"] = "--deny warnings" env["RUSTDOCFLAGS"] = "--deny warnings --deny rustdoc::missing_crate_level_docs" if clippy_conf is not None: - env["CLIPPY_CONF_DIR"] = clippy_conf + env["CLIPPY_CONF_DIR"] = ( + f"{os.getcwd()}/{clippy_conf}" # Clippy has issues finding this directory on CI when we're not using an absolute path here. + ) result = subprocess.run(args, env=env, check=False, capture_output=True, text=True) if result.returncode != 0: @@ -112,7 +114,7 @@ def main() -> None: run_cargo( "cranky", "--all-features --target wasm32-unknown-unknown --target-dir target_wasm -p re_viewer -- --deny warnings", - clippy_conf="scripts/clippy_wasm", # Use scripts/clippy_wasm/clippy.toml + clippy_conf="scripts/clippy_wasm", # Use ./scripts/clippy_wasm/clippy.toml ) ) # Check re_renderer examples for wasm32. diff --git a/scripts/lint.py b/scripts/lint.py index 1faf674ee752..bf52210c7a75 100755 --- a/scripts/lint.py +++ b/scripts/lint.py @@ -9,10 +9,10 @@ from __future__ import annotations import argparse -from glob import glob import os import re import sys +from glob import glob from pathlib import Path from typing import Any, Callable, Dict, Iterator