Skip to main content

Check for broken symlinks

Project description

Check Symlinks

Check for broken symbolic links.

check-symlinks is optimized for large codebases as well as small, incremental checks,

Shows a bar chart with benchmark results.

where the full commands are respectively,

fd --type symlink --exec sh -c 'test -e "$0"'

check-symlinks

git ls-files | xargs pre_commit_hooks/check_symlinks.py

while read file; do test -e "$test"; done < <(git ls-files)

find . -type l -not -path data ! -exec test -e {} \; -print0 | xargs --no-run-if-empty git ls-files

and check_symlinks.py is from https://github.com/pre-commit/pre-commit-hooks.

Install

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

go:

go install github.com/jmelahman/check-symlinks@latest

Usage

By default, checks all unignored files recursively from the current working directory,

$ check-symlinks
"./broken_link" is not a valid symlink

File paths can also be passed,

$ check-symlinks broken_link doesnt_exist
"./broken_link" is not a valid symlink

NOTE: file arguments which don't exist are ignored.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distributions

If you're not sure about the file name format, learn more about wheel file names.

check_symlinks-0.5.0-py3-none-win_arm64.whl (693.1 kB view details)

Uploaded Python 3Windows ARM64

check_symlinks-0.5.0-py3-none-win_amd64.whl (751.9 kB view details)

Uploaded Python 3Windows x86-64

check_symlinks-0.5.0-py3-none-manylinux_2_17_x86_64.whl (703.9 kB view details)

Uploaded Python 3manylinux: glibc 2.17+ x86-64

check_symlinks-0.5.0-py3-none-manylinux_2_17_aarch64.whl (658.3 kB view details)

Uploaded Python 3manylinux: glibc 2.17+ ARM64

check_symlinks-0.5.0-py3-none-macosx_11_0_arm64.whl (681.6 kB view details)

Uploaded Python 3macOS 11.0+ ARM64

check_symlinks-0.5.0-py3-none-macosx_10_12_x86_64.whl (712.7 kB view details)

Uploaded Python 3macOS 10.12+ x86-64

check_symlinks-0.5.0-py3-none-any.whl (703.9 kB view details)

Uploaded Python 3

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page