enforce antislop in the quality gate
- Pin the required Antislop release and document installation - Reject Antislop findings during quality checks
This commit is contained in:
@@ -117,16 +117,17 @@ cargo run -- imported.agnd --import tasks.ics
|
|||||||
## Development quality gate
|
## Development quality gate
|
||||||
|
|
||||||
Compiler warnings are denied by project configuration. Before accepting any
|
Compiler warnings are denied by project configuration. Before accepting any
|
||||||
change, run the complete gate:
|
change, install the pinned Antislop release and run the complete gate:
|
||||||
|
|
||||||
```sh
|
```sh
|
||||||
|
cargo install antislop --version 0.3.0 --locked
|
||||||
./scripts/quality-gate.sh
|
./scripts/quality-gate.sh
|
||||||
```
|
```
|
||||||
|
|
||||||
It requires clean `cargo fmt --check` output, runs Clippy across every target and
|
It requires clean `cargo fmt --check` output, runs Clippy across every target and
|
||||||
feature with `-D warnings`, executes all tests, builds warning-free documentation,
|
feature with `-D warnings`, rejects Antislop findings, executes all tests, builds
|
||||||
and produces the release binary. Any warning, formatting difference, test failure,
|
warning-free documentation, and produces the release binary. Any finding, warning,
|
||||||
or build failure stops the gate.
|
formatting difference, test failure, or build failure stops the gate.
|
||||||
|
|
||||||
## Essential keys
|
## Essential keys
|
||||||
|
|
||||||
|
|||||||
@@ -8,6 +8,14 @@ cargo fmt --all -- --check
|
|||||||
# and automated Clippy runs have the same, visible contract.
|
# and automated Clippy runs have the same, visible contract.
|
||||||
cargo clippy --all-targets --all-features -- -D warnings
|
cargo clippy --all-targets --all-features -- -D warnings
|
||||||
|
|
||||||
|
antislop_version=0.3.0
|
||||||
|
if ! command -v antislop >/dev/null 2>&1 ||
|
||||||
|
[[ "$(antislop --version)" != "antislop ${antislop_version}" ]]; then
|
||||||
|
echo "antislop ${antislop_version} is required; install it with: cargo install antislop --version ${antislop_version} --locked" >&2
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
antislop .
|
||||||
|
|
||||||
cargo test --all-targets --all-features
|
cargo test --all-targets --all-features
|
||||||
RUSTDOCFLAGS="-D warnings" cargo doc --no-deps --all-features
|
RUSTDOCFLAGS="-D warnings" cargo doc --no-deps --all-features
|
||||||
cargo build --release --all-targets --all-features
|
cargo build --release --all-targets --all-features
|
||||||
|
|||||||
Reference in New Issue
Block a user