Skip to content

Commit

Permalink
Merge pull request #2848 from mjsterckx/sdk-rust-formatting
Browse files Browse the repository at this point in the history
Makefile: use SDK for Rust formatting
  • Loading branch information
mjsterckx authored Apr 18, 2023
2 parents 20e81f1 + ce5eb68 commit cc78dbb
Showing 1 changed file with 17 additions and 5 deletions.
22 changes: 17 additions & 5 deletions Makefile.toml
Original file line number Diff line number Diff line change
Expand Up @@ -401,16 +401,29 @@ for m in ${GO_MODULES}; do
done
# For rust first-party source code
if ! cargo fmt \
--manifest-path ${BUILDSYS_SOURCES_DIR}/Cargo.toml \
if ! docker run --rm \
-u $(id -u):$(id -g) \
-e CARGO_HOME="/tmp/.cargo" \
-v "${CARGO_HOME}":/tmp/.cargo \
-v "${BUILDSYS_ROOT_DIR}/sources":/tmp/sources \
"${BUILDSYS_SDK_IMAGE}" \
cargo fmt \
--manifest-path /tmp/sources/Cargo.toml \
--message-format short \
--all \
-- --check; then
rc=1
fi
if ! cargo fmt \
--manifest-path ${BUILDSYS_TOOLS_DIR}/Cargo.toml \
if ! docker run --rm \
-u $(id -u):$(id -g) \
-e CARGO_HOME="/tmp/.cargo" \
-v "${CARGO_HOME}":/tmp/.cargo \
-v "${BUILDSYS_ROOT_DIR}/sources":/tmp/sources \
-v "${BUILDSYS_ROOT_DIR}/tools":/tmp/tools \
"${BUILDSYS_SDK_IMAGE}" \
cargo fmt \
--manifest-path /tmp/tools/Cargo.toml \
--message-format short \
--all \
-- --check; then
Expand Down Expand Up @@ -457,7 +470,6 @@ if ! docker run --rm \
-e CARGO_HOME="/tmp/.cargo" \
-v "${CARGO_HOME}":/tmp/.cargo \
-v "${BUILDSYS_ROOT_DIR}/sources":/tmp/sources \
-v "${BUILDSYS_ROOT_DIR}/tools":/tmp/tools \
-e VARIANT \
"${BUILDSYS_SDK_IMAGE}" \
cargo clippy \
Expand Down

0 comments on commit cc78dbb

Please sign in to comment.