| Crates.io | consistent_whitespace |
| lib.rs | consistent_whitespace |
| version | 0.7.3 |
| created_at | 2022-11-05 17:31:29.850177+00 |
| updated_at | 2026-01-04 00:27:02.330766+00 |
| description | A utility that checks for consistent whitespace across your file(s). |
| homepage | |
| repository | https://github.com/DeveloperC286/consistent_whitespace |
| max_upload_size | |
| id | 705958 |
| size | 132,160 |
A utility that checks for consistent whitespace across your file(s).
Check the current directory for consistent whitespace:
consistent_whitespace
Check specific files or directories:
consistent_whitespace path/to/file.txt path/to/directory/
By default, the tool accepts either tabs or spaces as long as they are consistent within each file. You can enforce specific whitespace types:
consistent_whitespace --whitespace spaces
consistent_whitespace --whitespace tabs
consistent_whitespace --whitespace either
name: Continuous Integration (CI)
on: pull_request
permissions:
contents: read
jobs:
check-whitespace:
name: Check Whitespace
runs-on: ubuntu-24.04
steps:
- name: Checkout code.
uses: actions/checkout@v4
- name: Check whitespace consistency.
uses: docker://ghcr.io/developerc286/consistent_whitespace:0.7.3
with:
args: .
check-whitespace:
image: ghcr.io/developerc286/consistent_whitespace:0.7.3
script:
- consistent_whitespace .
rules:
- if: $CI_PIPELINE_SOURCE == "merge_request_event"
version="v0.7.3" && wget -O - "https://github.com/DeveloperC286/consistent_whitespace/releases/download/${version}/x86_64-unknown-linux-musl.tar.gz" | tar xz --directory "/usr/bin/"
cargo install consistent_whitespace@0.7.3
You can use the Docker image published to ghcr.io/developerc286/consistent_whitespace.
docker run --rm -v $(pwd):/workspace -w /workspace ghcr.io/developerc286/consistent_whitespace:0.7.3 .
Report issues or request features on our GitHub Issues.