pathlint 0.0.21

Lint the PATH environment variable against declarative ordering rules.
Documentation
# OS-baseline directories. These match the binaries that ship with
# the OS itself (Win32 system DLLs etc., macOS /usr/bin, the
# distro's /usr/bin on Linux). Distro package managers also drop
# their binaries here, so apt / pacman / dnf overlap with
# os_baseline_linux on the same path — that's by design.
#
# Renamed from `system_*` to `os_baseline_*` in 0.0.14 (was
# ambiguous with the OS detection layer). Old names are not
# aliased — pathlint.toml files referencing `system_windows` etc.
# must be updated.

[source.os_baseline_windows]
description = "Windows system binaries (System32)"
windows = "$SystemRoot/System32"

[source.os_baseline_macos]
description = "macOS baseline /usr/bin binaries"
macos = "/usr/bin"

[source.os_baseline_linux]
description = "Linux distro baseline /usr/bin binaries"
linux = "/usr/bin"

# /usr/sbin is a separate source on Linux because Arch / openSUSE
# Tumbleweed / Solus symlink /usr/sbin → /usr/bin while traditional
# distros keep them split. `which ls` reports /usr/sbin/ls on the
# symlinked layout, so a rule that prefers `apt` / `pacman` /
# `dnf` (all `/usr/bin`-only) would miss. Reference
# `os_baseline_linux_sbin` alongside the package manager when you
# want both layouts to satisfy the rule:
#
#   [[expect]]
#   command = "ls"
#   prefer = ["pacman", "os_baseline_linux_sbin"]
# /usr/sbin is split from /usr/bin on traditional distros (Debian,
# Fedora) but symlinked together on Arch / openSUSE Tumbleweed; both
# layouts work because pathlint matches by directory.
[source.os_baseline_linux_sbin]
description = "Linux baseline /usr/sbin binaries"
linux = "/usr/sbin"