You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
meli/.gitea/Makefile.lint

44 lines
1.4 KiB
Makefile

# SPDX-License-Identifier: EUPL-1.2
#
# Makefile for: "Run cargo lints" workflow, in .gitea/workflows/lints.yaml
.POSIX:
.SUFFIXES:
CARGO_INCREMENTAL ?= 0
CARGO_NET_RETRY ?= 10
CARGO_REGISTRIES_CRATES_IO_PROTOCOL ?= sparse
RUSTFLAGS ?= -D warnings -W unreachable-pub -W rust-2021-compatibility -C debuginfo=0
RUSTUP_MAX_RETRIES ?= 10
RUST_BACKTRACE ?= short
.PHONY: all
all: rustfmt clippy cargo-derivefmt-melib cargo-derivefmt-meli cargo-derivefmt-tools
@printf "All completed.\n"
.PHONY: rustfmt
rustfmt:
@printf "rustfmt\n"
cargo fmt --check --all
.PHONY: clippy
clippy:
@printf "clippy\n"
cargo clippy --no-deps --all-features --all --tests --examples --benches --bins
.PHONY: cargo-derivefmt-melib
cargo-derivefmt-melib:
@printf "cargo-derivefmt-melib\n"
cargo derivefmt --manifest-path ./melib/Cargo.toml
git checkout meli/src/conf/overrides.rs
git add --update ./melib/ && git diff --quiet && git diff --cached --quiet
.PHONY: cargo-derivefmt-meli
cargo-derivefmt-meli:
@printf "cargo-derivefmt-meli\n"
cargo derivefmt --manifest-path ./meli/Cargo.toml
git checkout meli/src/conf/overrides.rs
git add --update ./meli/ && git diff --quiet && git diff --cached --quiet
.PHONY: cargo-derivefmt-tools
cargo-derivefmt-tools:
@printf "cargo-derivefmt-tools\n"
cargo derivefmt --manifest-path ./tools/Cargo.toml
git checkout meli/src/conf/overrides.rs
git add --update ./tools/ && git diff --quiet && git diff --cached --quiet