portacheck
Your repo works on Windows — until a contributor checks it out on Windows. Scan any repo for the path hazards that break Windows checkouts, and fail CI before they land:
- Reserved device names —
CON,PRN,AUX,NUL,COM1–COM9,LPT1–LPT9, in any path component, with or without an extension (aux.pyis unusable) - Invalid characters —
< > : " | ? *and control characters in names - Trailing dot or space —
report.andreportget silently mangled by Windows - Case-insensitive collisions —
Config.jsonandconfig.jsoncan both exist on NTFS but not in the same git checkout - Over-long paths and components — past the 260-char MAX_PATH or the 255-char component limit
Install
pip install portacheck
Usage
portacheck . # scan current directory
portacheck path/to/repo --json # machine-readable findings
portacheck . --strict # warnings (long paths) also fail
Exit codes: 0 clean, 1 findings, 2 usage error. Output:
ERROR case_collision src/config.json: paths differ only by case and cannot coexist on Windows: src/Config.json, src/config.json
ERROR reserved_name lib/aux/mod.py: 'mod.py' ... (component 'aux' collides with the Windows device name AUX)
WARN path_length src/very/deep: directory path is 271 chars (> 260)...
3 error(s), 1 warning(s) — FAIL
.git, node_modules, virtualenvs and caches are skipped by default; override with repeated --skip flags (use --skip with a value you fully specify; there is no "add to defaults" mode).
CI
- run: pip install portacheck
- run: portacheck . --strict
Cheap enough to run on every PR: it's a single tree walk, no subprocesses.
Notes
- Name rules are pure functions (
check_component,check_relpath) — unit-testable without touching a filesystem, and usable as a pre-commit hook for staged paths. - Long paths are warnings by default: Windows 10+ can opt into long-path support, but plenty of tooling (old zipper libs, some antivirus hooks, cmd.exe scripts) still truncates.
--strictmakes them fail. - Runs anywhere: Linux CI runners catch Windows hazards before a Windows user ever hits them.
License
MIT-style: use it, ship it, no warranty.
Metadata
Release files for portacheck 0.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | |
|---|---|---|---|---|
| portacheck-0.1.0.tar.gz | 8.6 kB | Without provenance | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| portacheck-0.1.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 16.0 kB
Release files / portacheck-0.1.0.tar.gz
| Download URL | portacheck-0.1.0.tar.gz |
|---|---|
| Size | 8.6 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
ba88a1917dda7cf9ce015ea4a536e11ba4818b7cc81eab5500297692db5a3115
|
|
BLAKE2b-256 checksum How to use checksums |
e652f865c38f4007ccb0efbd99b86a12509b207e44edbeba300c9642f6a3ae13
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.11.15
|
Release files / portacheck-0.1.0-py3-none-any.whl
| Download URL | portacheck-0.1.0-py3-none-any.whl |
|---|---|
| Size | 7.5 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
62a24e30318b8ac7336ad199a7acce80dd96378b0c15a135200af02f03d5d21e
|
|
BLAKE2b-256 checksum How to use checksums |
e1a80d284c043de7bc03a10fe08d89a4c44bfc6a9881e839f73917a8f4053458
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.11.15
|
Security for portacheck 0.1.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.