Documentation
¶
Overview ¶
Package paths centralizes filesystem layout constants and helpers for qlt.
Index ¶
- Constants
- func BundleArchivePath(bundleName string) (string, error)
- func BundleInstallDir(bundleName string) (string, error)
- func CLIArchivePath(version string) (string, error)
- func CLIInstallDir(version string) (string, error)
- func CustomBundlePath(base, bundleName string) (string, error)
- func ResolveCodeQLBinary(base string) (string, error)
- func VersionTag(version string) string
Constants ¶
const DefaultBundleDir = ".qlt/bundle"
DefaultBundleDir is the per-user directory (relative to $HOME) where qlt stores downloaded CodeQL bundle archives. The layout is:
$HOME/DefaultBundleDir/<md5(bundleName)>/codeql/ ← extracted bundle $HOME/DefaultBundleDir/<md5(bundleName)>/codeql-bundle.tar.gz $HOME/DefaultBundleDir/<md5(bundleName)>/codeql-bundle.tar.gz.checksum.txt
const DefaultCustomBundleDir = "target/custom-bundle"
DefaultCustomBundleDir is the directory (relative to --base) where qlt stores custom CodeQL bundles created by `qlt phase package`. The layout is:
<base>/target/custom-bundle/<md5(bundleName)>/codeql-bundle.tar.gz
const DefaultPackagesDir = ".qlt/packages"
DefaultPackagesDir is the per-user directory (relative to $HOME) where qlt installs CodeQL CLI binaries. The layout is:
$HOME/DefaultPackagesDir/<md5(version)>/codeql/ ← extracted CLI $HOME/DefaultPackagesDir/<md5(version)>/codeql-<platform>.zip $HOME/DefaultPackagesDir/<md5(version)>/codeql-<platform>.zip.checksum.txt
Variables ¶
This section is empty.
Functions ¶
func BundleArchivePath ¶
BundleArchivePath returns the expected path for a named bundle archive: $HOME/.qlt/bundle/<md5(bundleName)>/codeql-bundle.tar.gz.
func BundleInstallDir ¶
BundleInstallDir returns $HOME/.qlt/bundle/<md5(bundleName)> for the given bundle.
func CLIArchivePath ¶
func CLIInstallDir ¶
CLIInstallDir returns $HOME/.qlt/packages/<md5(version)> for the given version.
func CustomBundlePath ¶
CustomBundlePath returns the output path for a custom bundle created by `qlt phase package`: <base>/target/custom-bundle/<md5(bundleName)>/codeql-bundle.tar.gz.
func ResolveCodeQLBinary ¶
ResolveCodeQLBinary returns the path to the codeql binary. When EnableCustomCodeQLBundles is true in config it resolves the binary from the installed bundle; otherwise it resolves the standalone CLI installation. Falls back to codeql found on PATH.
func VersionTag ¶
VersionTag normalizes a version string to a "v"-prefixed git tag (e.g. "2.25.1" → "v2.25.1", "v2.25.1" → "v2.25.1").
Types ¶
This section is empty.