Check Symlinks
Check for broken symbolic links.
$ check-symlinks
Broken symlink: some/path/broken_link
check-symlinks is optimized for large codebases as well as small, incremental checks,
where the full commands are respectively,
check-symlinks
fd --type symlink --exec sh -c 'test -e "$0"'
git ls-files | xargs pre_commit_hooks/check_symlinks.py
find . -type l ! -exec test -e {} \; -print0 | xargs --no-run-if-empty -0 git ls-files
while read file; do test -e "$file"; done < <(git ls-files)
and check_symlinks.py is from https://github.com/pre-commit/pre-commit-hooks.
Regenerate the chart with scripts/gen-benchmark-chart.py, which documents the exact
hyperfine invocations.
Install
pre-commit:
repos:
- repo: https://github.com/jmelahman/check-symlinks
rev: v0.6.0
hooks:
- id: check-symlinks
The check-symlinks hook is built from source by pre-commit's Go toolchain and has no
other dependencies. Use check-symlinks-system instead to run a binary already on
PATH.
AUR:
check-symlinks is available from the Arch User Repository.
yay -S check-symlinks
pip:
check-symlinks is available as a pypi package.
pip install check-symlinks
Binaries:
Static binaries for Linux and macOS (amd64 and arm64) are attached to every release.
Usage
check-symlinks [flags] [path ...]
With no paths, the current directory is walked. Flags must precede the paths.
| Flag | Description |
|---|---|
--hidden |
Include hidden files and directories in the walk. |
--no-ignore |
Ignore .symlinkignore / .config/symlinkignore. |
--threads N |
Number of worker threads (0 = one per CPU). |
-q, --quiet |
Don't print broken links. |
--debug |
Report which ignore file was loaded and which paths it skipped. |
--version |
Print the version and exit. |
Exit status is 0 when every symlink resolves, 1 when at least one is broken, and
2 on a usage error.
Paths listed in .symlinkignore (or .config/symlinkignore) at the top of the
repository are skipped. Hidden entries are skipped while walking, but a hidden path
named on the command line is always checked.
Building
check-symlinks is written in Solod, a strict subset of Go that
translates to C: release binaries are a few hundred kilobytes, start instantly, and
have no runtime dependencies. The same sources build with either toolchain — see
CONTRIBUTING.md.
so build -o check-symlinks ./so # solod (needs the so tool and a C compiler)
go build . # Go, via the gocompat shims
Windows is not supported: Solod's os package is POSIX-only.
Metadata
Release files for check-symlinks 0.6.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 | Actions |
|---|---|---|---|---|
| check_symlinks-0.6.0.tar.gz | 21.3 kB | Without provenance | Details for check_symlinks-0.6.0.tar.gz |
Built distributions (wheels)
| File | Actions Reset | |||
|---|---|---|---|---|
| check_symlinks-0.6.0-py3-none-manylinux_2_17_x86_64.whl | Python 3 | none | Linux glibc 2.17+ x86-64 | Details for check_symlinks-0.6.0-py3-none-manylinux_2_17_x86_64.whl |
| check_symlinks-0.6.0-py3-none-manylinux_2_17_aarch64.whl | Python 3 | none | Linux glibc 2.17+ ARM64 | Details for check_symlinks-0.6.0-py3-none-manylinux_2_17_aarch64.whl |
| check_symlinks-0.6.0-py3-none-macosx_11_0_arm64.whl | Python 3 | none | macOS 11.0+ ARM64 | Details for check_symlinks-0.6.0-py3-none-macosx_11_0_arm64.whl |
| check_symlinks-0.6.0-py3-none-macosx_10_12_x86_64.whl | Python 3 | none | macOS 10.12+ x86-64 | Details for check_symlinks-0.6.0-py3-none-macosx_10_12_x86_64.whl |
Total release size: 365.1 kB
Release files / check_symlinks-0.6.0.tar.gz
| Download URL | check_symlinks-0.6.0.tar.gz |
|---|---|
| Size | 21.3 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
e1386ebd3531ca7e80acf290fad085b74c37ec6a2a3fe4545e660b6f26d3c6aa
|
|
BLAKE2b-256 checksum How to use checksums |
ddf012643dcd9fd52f48eccc2cd40792256fdcf767ab18b55ea8c0c39e6221e4
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
uv/0.12.5 {"installer":{"name":"uv","version":"0.12.5","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
|
Release files / check_symlinks-0.6.0-py3-none-manylinux_2_17_x86_64.whl
| Download URL | check_symlinks-0.6.0-py3-none-manylinux_2_17_x86_64.whl |
|---|---|
| Size | 140.1 kB |
| Tags | Linux glibc 2.17+ x86-64 Python 3 |
|
SHA-256 checksum How to use checksums |
c7b43cb47fb31e4cac68fb1514266ba1e30845773accb0e323831aa8df8bb9f5
|
|
BLAKE2b-256 checksum How to use checksums |
f85850957c71a695e0def221371d24adca65815c0d8198aaeb13c0de07e585f1
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
uv/0.12.5 {"installer":{"name":"uv","version":"0.12.5","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
|
Release files / check_symlinks-0.6.0-py3-none-manylinux_2_17_aarch64.whl
| Download URL | check_symlinks-0.6.0-py3-none-manylinux_2_17_aarch64.whl |
|---|---|
| Size | 144.7 kB |
| Tags | Linux glibc 2.17+ ARM64 Python 3 |
|
SHA-256 checksum How to use checksums |
f7dd45140e50e6e7cd470a97154e2901dbab7186266e2535d0ccd53242e0f534
|
|
BLAKE2b-256 checksum How to use checksums |
038fa533817155ee17dbebcf8186918d4ea6f6117d86c746e909c1573bfc0314
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
uv/0.12.5 {"installer":{"name":"uv","version":"0.12.5","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
|
Release files / check_symlinks-0.6.0-py3-none-macosx_11_0_arm64.whl
| Download URL | check_symlinks-0.6.0-py3-none-macosx_11_0_arm64.whl |
|---|---|
| Size | 30.3 kB |
| Tags | Python 3 macOS 11.0+ ARM64 |
|
SHA-256 checksum How to use checksums |
dc03bd855d6103335d03f46ef1ed2e386b3add4db6acded6de9e9622deffd3e0
|
|
BLAKE2b-256 checksum How to use checksums |
a1ee896479e5c7b2413b8e1346fc3675f1b2628e07dd7a0e5b3ded28eed7c27e
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
uv/0.12.5 {"installer":{"name":"uv","version":"0.12.5","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
|
Release files / check_symlinks-0.6.0-py3-none-macosx_10_12_x86_64.whl
| Download URL | check_symlinks-0.6.0-py3-none-macosx_10_12_x86_64.whl |
|---|---|
| Size | 28.8 kB |
| Tags | Python 3 macOS 10.12+ x86-64 |
|
SHA-256 checksum How to use checksums |
259d3fc025a0c47967bc7990a3e7790b366e7d97d8d95f0827ee2ee284685f7f
|
|
BLAKE2b-256 checksum How to use checksums |
45853bd8117c75ddce7c2c302d6364efe23e6b8f01e4de2e82963d321e7b519d
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
uv/0.12.5 {"installer":{"name":"uv","version":"0.12.5","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
|
Security for check-symlinks 0.6.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.