pathlint 0.0.24

Lint the PATH environment variable against declarative ordering rules.
Documentation
# mise has three sources, intentional split:
# - mise: catch-all for backwards compatibility
# - mise_shims: the shim layer mise activate front-loads
# - mise_installs: the per-runtime install dirs
#
# Pre-0.0.3 rules used `prefer = ["mise"]` and still work because
# the catch-all matches both layers.

[source.mise]
# Catch-all that matches both the shim and per-runtime install layers.
description = "mise catch-all (shims + installs)"
windows = "$LocalAppData/mise"
unix    = "$HOME/.local/share/mise"

[source.mise_shims]
description = "mise shim layer"
windows = "$LocalAppData/mise/shims"
unix    = "$HOME/.local/share/mise/shims"

[source.mise_installs]
description = "mise per-runtime installs"
windows = "$LocalAppData/mise/installs"
unix    = "$HOME/.local/share/mise/installs"

# `mise` is the catch-all alias of the two layers below; matching
# the parent never excludes matching a child.
[[relation]]
kind = "alias_of"
parent = "mise"
children = ["mise_shims", "mise_installs"]

# Both shim and install layers being on PATH at the same time is
# usually a `mise activate` misconfiguration. doctor surfaces it
# as the `mise_activate_both` diagnostic.
[[relation]]
kind = "conflicts_when_both_in_path"
sources = ["mise_shims", "mise_installs"]
diagnostic = "mise_activate_both"

# Plugins under mise/installs/<installer>-... actually came from
# the upstream installer. Used by `pathlint trace` to attribute
# provenance through the mise wrapper.
[[relation]]
kind = "served_by_via"
host = "mise_installs"
guest_pattern = "cargo-*"
guest_provider = "cargo"
installer_token = "cargo"

[[relation]]
kind = "served_by_via"
host = "mise_installs"
guest_pattern = "npm-*"
guest_provider = "npm_global"
installer_token = "npm"

[[relation]]
kind = "served_by_via"
host = "mise_installs"
guest_pattern = "pipx-*"
guest_provider = "pip_user"
installer_token = "pipx"

[[relation]]
kind = "served_by_via"
host = "mise_installs"
guest_pattern = "go-*"
guest_provider = "go"
installer_token = "go"

[[relation]]
kind = "served_by_via"
host = "mise_installs"
guest_pattern = "aqua-*"
guest_provider = "aqua"
installer_token = "aqua"