# configuration/strings/tool.strings.ts

> 182 lines of code and 42 definitions.

Tree: GovLab Quality
Language: typescript
Layer: product
Canonical: https://banes-lab.com/anatomy/quality#file-quality-configuration-strings-tool-strings-ts
Source text: https://banes-lab.com/source/quality/configuration/strings/tool.strings.ts.txt

Listed in [configuration/strings](https://banes-lab.com/api/source/quality/configuration/strings.md), after [configuration/strings/target.strings.ts](https://banes-lab.com/source/quality/configuration/strings/target.strings.ts.md) and before [configuration/strings/validation.strings.ts](https://banes-lab.com/source/quality/configuration/strings/validation.strings.ts.md).

## Definitions

- `toolErrorBecause` (lexical_declaration, line 122, exported)
- `notInstalledOutput` (lexical_declaration, line 102, exported)
- `signalDeathMessage` (lexical_declaration, line 155, exported)
- `toolErrorMessage` (lexical_declaration, line 118, exported)
- `pmdRecoverable` (lexical_declaration, line 151, exported)
- `unusedItem` (lexical_declaration, line 163, exported)
- `duplicatedBlock` (lexical_declaration, line 167, exported)
- `unusedDependency` (lexical_declaration, line 171, exported)
- `missingDependency` (lexical_declaration, line 175, exported)
- `dependencyEdge` (lexical_declaration, line 179, exported)
- `circularDependency` (lexical_declaration, line 183, exported)
- `unimportedExport` (lexical_declaration, line 187, exported)
- `dryRunFixes` (lexical_declaration, line 191, exported)
- `outsideWorkspace` (lexical_declaration, line 195, exported)
- `missingFlagValue` (lexical_declaration, line 208, exported)
- `unknownReporter` (lexical_declaration, line 212, exported)
- `unknownFlag` (lexical_declaration, line 216, exported)
- `unknownConcern` (lexical_declaration, line 220, exported)
- `installHint` (lexical_declaration, line 106, exported)
- `NO_STDERR_DETAIL` (lexical_declaration, line 1, exported)
- `NO_ERROR_DETAIL` (lexical_declaration, line 3, exported)
- `UNKNOWN_SIGNAL` (lexical_declaration, line 5, exported)
- `UNUSED_FILE` (lexical_declaration, line 7, exported)
- `UNFORMATTED_FILE` (lexical_declaration, line 9, exported)
- `MISSING_VERIFY` (lexical_declaration, line 11, exported)
- `NO_ECOSYSTEM` (lexical_declaration, line 13, exported)
- `UNUSED_LABELS` (lexical_declaration, line 15, exported)
- `INSTALL_HINTS` (lexical_declaration, line 26)
- `MISSING` (lexical_declaration, line 47)
- `UNRUNNABLE` (lexical_declaration, line 49)
- `COMMAND_HINTS` (lexical_declaration, line 51)
- `commandHint` (lexical_declaration, line 97, exported)
- `[lead, instruction]` (lexical_declaration, line 98, exported)
- `electedMissing` (lexical_declaration, line 110, exported)
- `spawnErrorMessage` (lexical_declaration, line 114, exported)
- `incompleteScan` (lexical_declaration, line 131, exported)
- `credoIncomplete` (lexical_declaration, line 135, exported)
- `scalastyleIncomplete` (lexical_declaration, line 139, exported)
- `semgrepFailed` (lexical_declaration, line 143, exported)
- `lintrFailed` (lexical_declaration, line 147, exported)
- `prettierFailed` (lexical_declaration, line 159, exported)
- `runSummary` (lexical_declaration, line 199, exported)

## Contained in

- [configuration/strings](https://banes-lab.com/anatomy/quality/folder-quality-configuration-strings.md)

## Used by

- [core/adapters/eslint.adapter.ts](https://banes-lab.com/source/quality/core/adapters/eslint.adapter.ts.md)
- [core/adapters/tool.clippy.adapter.ts](https://banes-lab.com/source/quality/core/adapters/tool.clippy.adapter.ts.md)
- [core/adapters/tool.golangci-lint.adapter.ts](https://banes-lab.com/source/quality/core/adapters/tool.golangci-lint.adapter.ts.md)
- [core/adapters/tool.oxlint.adapter.ts](https://banes-lab.com/source/quality/core/adapters/tool.oxlint.adapter.ts.md)
- [core/adapters/tool.pmd.adapter.ts](https://banes-lab.com/source/quality/core/adapters/tool.pmd.adapter.ts.md)
- [core/adapters/tool.rubocop.adapter.ts](https://banes-lab.com/source/quality/core/adapters/tool.rubocop.adapter.ts.md)
- [core/adapters/tool.ruff.adapter.ts](https://banes-lab.com/source/quality/core/adapters/tool.ruff.adapter.ts.md)
- [core/adapters/tool.sqlfluff.adapter.ts](https://banes-lab.com/source/quality/core/adapters/tool.sqlfluff.adapter.ts.md)
- [core/coordinators/access.coordinator.ts](https://banes-lab.com/source/quality/core/coordinators/access.coordinator.ts.md)
- [core/factories/tool.factory.ts](https://banes-lab.com/source/quality/core/factories/tool.factory.ts.md)
- [core/parsers/invocation.parser.ts](https://banes-lab.com/source/quality/core/parsers/invocation.parser.ts.md)
- [core/parsers/tool.depcheck.parser.ts](https://banes-lab.com/source/quality/core/parsers/tool.depcheck.parser.ts.md)
- [core/parsers/tool.dependency-cruiser.parser.ts](https://banes-lab.com/source/quality/core/parsers/tool.dependency-cruiser.parser.ts.md)
- [core/parsers/tool.jscpd.parser.ts](https://banes-lab.com/source/quality/core/parsers/tool.jscpd.parser.ts.md)
- [core/parsers/tool.knip.parser.ts](https://banes-lab.com/source/quality/core/parsers/tool.knip.parser.ts.md)
- [core/parsers/tool.madge.parser.ts](https://banes-lab.com/source/quality/core/parsers/tool.madge.parser.ts.md)
- [core/parsers/tool.ts-prune.parser.ts](https://banes-lab.com/source/quality/core/parsers/tool.ts-prune.parser.ts.md)
- [core/persistence/edit.persistence.ts](https://banes-lab.com/source/quality/core/persistence/edit.persistence.ts.md)
- [core/producers/tool.oxlint.producer.ts](https://banes-lab.com/source/quality/core/producers/tool.oxlint.producer.ts.md)

## Linked from

- [configuration/strings](https://banes-lab.com/anatomy/quality/folder-quality-configuration-strings.md)
- [core/adapters](https://banes-lab.com/anatomy/quality/folder-quality-core-adapters.md)
- [core/coordinators](https://banes-lab.com/anatomy/quality/folder-quality-core-coordinators.md)
- [core/factories](https://banes-lab.com/anatomy/quality/folder-quality-core-factories.md)
- [core/parsers](https://banes-lab.com/anatomy/quality/folder-quality-core-parsers.md)
- [core/persistence](https://banes-lab.com/anatomy/quality/folder-quality-core-persistence.md)
- [core/producers](https://banes-lab.com/anatomy/quality/folder-quality-core-producers.md)

## Source

```typescript
export const NO_STDERR_DETAIL = "(no detail on stderr)";

export const NO_ERROR_DETAIL = "(no error detail)";

export const UNKNOWN_SIGNAL = "unknown";

export const UNUSED_FILE = "Unused file";

export const UNFORMATTED_FILE = "File is not formatted — run govlab lint to format it.";

export const MISSING_VERIFY = "htmlhint is installed but exposes no verify entry point";

export const NO_ECOSYSTEM = "quality engine: contextFor requires at least one detected ecosystem";

export const UNUSED_LABELS: Readonly<Record<string, string>> = {
    binaries: "unlisted binary",
    dependencies: "dependency",
    devDependencies: "devDependency",
    duplicates: "duplicate export",
    exports: "export",
    types: "exported type",
    unlisted: "unlisted dependency",
    unresolved: "unresolved import",
};

const INSTALL_HINTS: Readonly<Record<string, string>> = {
    actionlint: "actionlint is not installed — install it (e.g. 'scoop install actionlint').",
    brakeman: "brakeman is not installed — run 'gem install brakeman' to scan Rails apps for security issues.",
    "clang-tidy":
        "clang-tidy is not installed — install LLVM (e.g. 'scoop install llvm') and expose clang-tidy on PATH.",
    clippy: "cargo/clippy is not installed — run 'govlab install rust' to add it.",
    "golangci-lint": "golangci-lint is not installed — run 'govlab install go' to add it.",
    gosec: "gosec is not installed. Install it with go install, as the gosec installation guide describes.",
    hadolint: "hadolint is not installed — run 'govlab install dockerfile' (or scoop/brew install hadolint).",
    luacheck: "luacheck is not installed — install it (e.g. 'scoop install luacheck').",
    oxlint: "oxlint is not installed — run 'npm install -D -E oxlint' to add it.",
    phpcs: "phpcs is not installed — run 'composer global require squizlabs/php_codesniffer'.",
    phpmd: "phpmd is not installed — run 'composer global require phpmd/phpmd'.",
    rubocop: "rubocop is not installed — run 'govlab install ruby' to add it.",
    ruff: "ruff is not installed — run 'govlab install python' to add it.",
    shellcheck: "shellcheck is not installed — run 'govlab install shell' (or scoop/apt install shellcheck).",
    stylua: "stylua is not installed — install it (e.g. 'scoop install stylua').",
    tflint: "tflint is not installed — install it (e.g. 'scoop install tflint').",
    trivy: "trivy is not installed — install it (e.g. 'scoop install trivy') to scan IaC misconfigurations.",
};

const MISSING = "is not installed";

const UNRUNNABLE = "could not run";

const COMMAND_HINTS: Readonly<Record<string, readonly [string, string]>> = {
    bandit: [MISSING, "set bandit.command in govlab.config to your bandit interpreter."],
    checkov: [
        MISSING,
        "set checkov.command in govlab.config to your checkov interpreter (e.g. 'py -3.14 -m checkov.main').",
    ],
    checkstyle: [
        UNRUNNABLE,
        "set checkstyle.command in govlab.config to your '<java> -jar <checkstyle.jar>' invocation.",
    ],
    "clj-kondo": [UNRUNNABLE, "set clj-kondo.command in govlab.config to your clj-kondo binary path."],
    credo: [
        UNRUNNABLE,
        "set credo.command in govlab.config to your mix invocation (e.g. 'mix' or 'wsl.exe -e mix') in a project with credo as a dependency.",
    ],
    detekt: [UNRUNNABLE, "set detekt.command in govlab.config to your '<java> -jar <detekt-cli-all.jar>' invocation."],
    kics: [UNRUNNABLE, "set kics.command, kics.queries (its query library) and kics.libraries in govlab.config."],
    lintr: [
        UNRUNNABLE,
        "set lintr.command in govlab.config to your Rscript invocation (e.g. 'Rscript' or 'wsl.exe -e Rscript') with the lintr package installed.",
    ],
    perlcritic: [UNRUNNABLE, "set perlcritic.command in govlab.config (e.g. 'perlcritic' or 'wsl.exe -e perlcritic')."],
    pmd: [
        UNRUNNABLE,
        "set pmd.command in govlab.config to your '<java> -cp \"<pmd>/lib/*\" net.sourceforge.pmd.cli.PmdCli' invocation.",
    ],
    scalastyle: [
        UNRUNNABLE,
        "set scalastyle.command (its '<java> -jar <scalastyle-batch.jar>' invocation) and scalastyle.config (the ruleset XML path) in govlab.config.",
    ],
    semgrep: [
        UNRUNNABLE,
        "set semgrep.command (e.g. 'semgrep' or 'wsl.exe <path>') and semgrep.config (a ruleset) in govlab.config.",
    ],
    slither: [
        UNRUNNABLE,
        "set slither.command (its binary) and slither.solc (the solc path) in govlab.config, e.g. 'pip install slither-analyzer solc-select'.",
    ],
    sqlfluff: [MISSING, "set sqlfluff.command in govlab.config to your sqlfluff interpreter."],
    swiftlint: [
        UNRUNNABLE,
        "set swiftlint.command in govlab.config (e.g. 'swiftlint' or 'wsl.exe -e swiftlint-static', the self-contained Linux binary).",
    ],
    yamllint: [MISSING, "set yamllint.command in govlab.config to your interpreter."],
};

export const commandHint = function commandHint(tool: string, bin: string): string {
    const [lead, instruction] = COMMAND_HINTS[tool] ?? [MISSING, ""];
    return `${bin} ${lead} — ${instruction}`;
};

export const notInstalledOutput = function notInstalledOutput(tool: string): string {
    return `${tool} is not installed.`;
};

export const installHint = function installHint(tool: string): string {
    return INSTALL_HINTS[tool] ?? notInstalledOutput(tool);
};

export const electedMissing = function electedMissing(tool: string): string {
    return `${tool} is not installed — elected as an owner in govlab.config quality.owners but missing from PATH.`;
};

export const spawnErrorMessage = function spawnErrorMessage(tool: string, detail: string): string {
    return `${tool} could not be spawned: ${detail}`;
};

export const toolErrorMessage = function toolErrorMessage(tool: string, status: number, detail: string): string {
    return `${tool} exited with a tool error (exit ${String(status)}): ${detail}`;
};

export const toolErrorBecause = function toolErrorBecause(
    tool: string,
    status: number,
    cause: string,
    detail: string,
): string {
    return `${tool} exited with a tool error (exit ${String(status)}) — likely ${cause}: ${detail}`;
};

export const incompleteScan = function incompleteScan(tool: string, cause: string, detail: string): string {
    return `${tool} could not complete a scan — likely ${cause}: ${detail}`;
};

export const credoIncomplete = function credoIncomplete(status: number, detail: string): string {
    return `mix credo could not complete (exit ${String(status)}) — likely a compile error or a missing credo dependency: ${detail}`;
};

export const scalastyleIncomplete = function scalastyleIncomplete(detail: string): string {
    return `scalastyle did not complete a scan (no "Processed" summary) — likely a missing/invalid ruleset or jar: ${detail}`;
};

export const semgrepFailed = function semgrepFailed(status: number, detail: string): string {
    return `semgrep exited with an error (exit ${String(status)}) — likely a missing/invalid ruleset: ${detail}`;
};

export const lintrFailed = function lintrFailed(status: number, detail: string): string {
    return `lintr (Rscript) exited with an error (exit ${String(status)}): ${detail}`;
};

export const pmdRecoverable = function pmdRecoverable(status: number): string {
    return `pmd exited with a recoverable error (exit ${String(status)}) — some files may not have been fully analyzed.`;
};

export const signalDeathMessage = function signalDeathMessage(tool: string, signal: string): string {
    return `${tool} was terminated by a signal (${signal}) before completing — a killed run is a tool error, not a clean result.`;
};

export const prettierFailed = function prettierFailed(code: number): string {
    return `prettier exited with code ${String(code)} — see output above.`;
};

export const unusedItem = function unusedItem(label: string, name: string): string {
    return `Unused ${label}: ${name}`;
};

export const duplicatedBlock = function duplicatedBlock(file: string, line: number): string {
    return `Duplicated block: also at ${file}:${String(line)}. Lift the shared logic rather than copying it.`;
};

export const unusedDependency = function unusedDependency(dependency: string, manifest: string): string {
    return `"${dependency}" is declared in ${manifest} but never used.`;
};

export const missingDependency = function missingDependency(dependency: string, manifest: string): string {
    return `"${dependency}" is used but not declared in ${manifest}.`;
};

export const dependencyEdge = function dependencyEdge(from: string, to: string): string {
    return `${from} → ${to}`;
};

export const circularDependency = function circularDependency(chain: string): string {
    return `Circular dependency: ${chain}`;
};

export const unimportedExport = function unimportedExport(name: string): string {
    return `"${name}" is exported but never imported.`;
};

export const dryRunFixes = function dryRunFixes(count: number, listed: string): string {
    return `\n${String(count)} file(s) would be fixed (dry-run):\n${listed}\n`;
};

export const outsideWorkspace = function outsideWorkspace(file: string, root: string): string {
    return `safe-fix: ${file} lies outside the workspace root ${root}, so its temp file has no cache home`;
};

export const runSummary = function runSummary(
    errors: number,
    advisory: number,
    notices: number,
    fixedCount: number,
): string {
    return `${String(errors)} error(s), ${String(advisory)} advisory, ${String(notices)} notice(s), ${String(fixedCount)} fixed`;
};

export const missingFlagValue = function missingFlagValue(flag: string): string {
    return `govlab: ${flag} needs a value`;
};

export const unknownReporter = function unknownReporter(value: string, valid: string): string {
    return `govlab: unknown reporter "${value}" — valid: ${valid}`;
};

export const unknownFlag = function unknownFlag(flag: string): string {
    return `govlab: unknown flag "${flag}"`;
};

export const unknownConcern = function unknownConcern(concern: string, valid: string): string {
    return `govlab: unknown concern "${concern}" — valid: ${valid}`;
};
```
