CICD-080 · Fail on unaudited whitespace changes
Encyclopedia · Tests and quality checks · All snippets
Previous · CICD-079 · Next · CICD-081
1. Where it fits
- Placement Bash run step following checkout, or equivalent lab terminal.
- Prerequisites repository with test fixtures and task-specific quality dependencies.
- Platforms local-linux, github-actions, gitea-actions.
2. Copy the snippet
bash
git diff --check HEAD^ HEAD3. How it works
Git computes a source difference over the selected paths or revisions. Choose an available base ref with the intended merge relationship.
4. Verify the result
Fetch at least two commits. This checks the final diff for whitespace problems.
Validation syntax-validated (Bash parse). Status definitions.