add format checker to .toml (#13968)

Co-authored-by: Matthias Seitz <matthias.seitz@outlook.de>
This commit is contained in:
georgehao
2025-01-28 20:20:58 +08:00
committed by GitHub
parent 22c1de501b
commit 2e4376f359
91 changed files with 833 additions and 933 deletions

View File

@ -415,12 +415,32 @@ ensure-codespell:
exit 1; \
fi
# Lint and format all TOML files in the project using dprint.
# This target ensures that TOML files follow consistent formatting rules,
# such as using spaces instead of tabs, and enforces other style guidelines
# defined in the dprint configuration file (e.g., dprint.json).
#
# Usage:
# make lint-toml
#
# Dependencies:
# - ensure-dprint: Ensures that dprint is installed and available in the system.
lint-toml: ensure-dprint
dprint fmt
ensure-dprint:
@if ! command -v dprint &> /dev/null; then \
echo "dprint not found. Please install it by running the command `cargo install --locked dprint` or refer to the following link for more information: https://github.com/dprint/dprint" \
exit 1; \
fi
lint:
make fmt && \
make lint-reth && \
make lint-op-reth && \
make lint-other-targets && \
make lint-codespell
make lint-codespell && \
make lint-toml
fix-lint-reth:
cargo +nightly clippy \