//! Embedded built-in rule JSON files.
//!
//! Each rule is embedded at compile time via `include_str!` so the module
//! works with zero external configuration.

/// All vendored rule JSON files embedded as `(id, json)` pairs.
///
/// The `generic/fallback` rule MUST be present; the compiler asserts this via
/// `builtin_rules()`.
///
/// Rules are listed alphabetically by id; `generic/fallback` is placed last
/// because the rule loader sorts it to the end of the compiled list.
pub static BUILTIN_RULE_JSONS: &[(&str, &str)] = &[
    (
        "archive/tar",
        include_str!("../vendor/rules/archive__tar.json"),
    ),
    (
        "archive/unzip",
        include_str!("../vendor/rules/archive__unzip.json"),
    ),
    (
        "archive/zip",
        include_str!("../vendor/rules/archive__zip.json"),
    ),
    (
        "build/esbuild",
        include_str!("../vendor/rules/build__esbuild.json"),
    ),
    ("build/tsc", include_str!("../vendor/rules/build__tsc.json")),
    (
        "build/tsdown",
        include_str!("../vendor/rules/build__tsdown.json"),
    ),
    (
        "build/vite",
        include_str!("../vendor/rules/build__vite.json"),
    ),
    (
        "build/webpack",
        include_str!("../vendor/rules/build__webpack.json"),
    ),
    ("cloud/aws", include_str!("../vendor/rules/cloud__aws.json")),
    ("cloud/az", include_str!("../vendor/rules/cloud__az.json")),
    (
        "cloud/flyctl",
        include_str!("../vendor/rules/cloud__flyctl.json"),
    ),
    (
        "cloud/gcloud",
        include_str!("../vendor/rules/cloud__gcloud.json"),
    ),
    ("cloud/gh", include_str!("../vendor/rules/cloud__gh.json")),
    (
        "cloud/vercel",
        include_str!("../vendor/rules/cloud__vercel.json"),
    ),
    (
        "database/mongosh",
        include_str!("../vendor/rules/database__mongosh.json"),
    ),
    (
        "database/mysql",
        include_str!("../vendor/rules/database__mysql.json"),
    ),
    (
        "database/psql",
        include_str!("../vendor/rules/database__psql.json"),
    ),
    (
        "database/redis-cli",
        include_str!("../vendor/rules/database__redis-cli.json"),
    ),
    (
        "database/sqlite3",
        include_str!("../vendor/rules/database__sqlite3.json"),
    ),
    (
        "devops/docker-build",
        include_str!("../vendor/rules/devops__docker-build.json"),
    ),
    (
        "devops/docker-compose",
        include_str!("../vendor/rules/devops__docker-compose.json"),
    ),
    (
        "devops/docker-images",
        include_str!("../vendor/rules/devops__docker-images.json"),
    ),
    (
        "devops/docker-logs",
        include_str!("../vendor/rules/devops__docker-logs.json"),
    ),
    (
        "devops/docker-ps",
        include_str!("../vendor/rules/devops__docker-ps.json"),
    ),
    (
        "devops/kubectl-describe",
        include_str!("../vendor/rules/devops__kubectl-describe.json"),
    ),
    (
        "devops/kubectl-get",
        include_str!("../vendor/rules/devops__kubectl-get.json"),
    ),
    (
        "devops/kubectl-logs",
        include_str!("../vendor/rules/devops__kubectl-logs.json"),
    ),
    (
        "filesystem/find",
        include_str!("../vendor/rules/filesystem__find.json"),
    ),
    (
        "filesystem/ls",
        include_str!("../vendor/rules/filesystem__ls.json"),
    ),
    (
        "generic/help",
        include_str!("../vendor/rules/generic__help.json"),
    ),
    (
        "git/branch",
        include_str!("../vendor/rules/git__branch.json"),
    ),
    (
        "git/diff-name-only",
        include_str!("../vendor/rules/git__diff-name-only.json"),
    ),
    (
        "git/diff-stat",
        include_str!("../vendor/rules/git__diff-stat.json"),
    ),
    (
        "git/log-oneline",
        include_str!("../vendor/rules/git__log-oneline.json"),
    ),
    (
        "git/remote-v",
        include_str!("../vendor/rules/git__remote-v.json"),
    ),
    ("git/show", include_str!("../vendor/rules/git__show.json")),
    (
        "git/stash-list",
        include_str!("../vendor/rules/git__stash-list.json"),
    ),
    (
        "git/status",
        include_str!("../vendor/rules/git__status.json"),
    ),
    (
        "install/bun-install",
        include_str!("../vendor/rules/install__bun-install.json"),
    ),
    (
        "install/npm-install",
        include_str!("../vendor/rules/install__npm-install.json"),
    ),
    (
        "install/pnpm-install",
        include_str!("../vendor/rules/install__pnpm-install.json"),
    ),
    (
        "install/yarn-install",
        include_str!("../vendor/rules/install__yarn-install.json"),
    ),
    (
        "lint/biome",
        include_str!("../vendor/rules/lint__biome.json"),
    ),
    (
        "lint/eslint",
        include_str!("../vendor/rules/lint__eslint.json"),
    ),
    (
        "lint/oxlint",
        include_str!("../vendor/rules/lint__oxlint.json"),
    ),
    (
        "lint/prettier-check",
        include_str!("../vendor/rules/lint__prettier-check.json"),
    ),
    (
        "media/ffmpeg",
        include_str!("../vendor/rules/media__ffmpeg.json"),
    ),
    (
        "media/mediainfo",
        include_str!("../vendor/rules/media__mediainfo.json"),
    ),
    (
        "network/curl",
        include_str!("../vendor/rules/network__curl.json"),
    ),
    (
        "network/dig",
        include_str!("../vendor/rules/network__dig.json"),
    ),
    (
        "network/nslookup",
        include_str!("../vendor/rules/network__nslookup.json"),
    ),
    (
        "network/ping",
        include_str!("../vendor/rules/network__ping.json"),
    ),
    (
        "network/ssh",
        include_str!("../vendor/rules/network__ssh.json"),
    ),
    (
        "network/traceroute",
        include_str!("../vendor/rules/network__traceroute.json"),
    ),
    (
        "network/wget",
        include_str!("../vendor/rules/network__wget.json"),
    ),
    (
        "observability/free",
        include_str!("../vendor/rules/observability__free.json"),
    ),
    (
        "observability/htop",
        include_str!("../vendor/rules/observability__htop.json"),
    ),
    (
        "observability/iostat",
        include_str!("../vendor/rules/observability__iostat.json"),
    ),
    (
        "observability/top",
        include_str!("../vendor/rules/observability__top.json"),
    ),
    (
        "observability/vmstat",
        include_str!("../vendor/rules/observability__vmstat.json"),
    ),
    (
        "package/apt-install",
        include_str!("../vendor/rules/package__apt-install.json"),
    ),
    (
        "package/apt-upgrade",
        include_str!("../vendor/rules/package__apt-upgrade.json"),
    ),
    (
        "package/brew-install",
        include_str!("../vendor/rules/package__brew-install.json"),
    ),
    (
        "package/brew-upgrade",
        include_str!("../vendor/rules/package__brew-upgrade.json"),
    ),
    (
        "package/dnf-install",
        include_str!("../vendor/rules/package__dnf-install.json"),
    ),
    (
        "package/yum-install",
        include_str!("../vendor/rules/package__yum-install.json"),
    ),
    (
        "search/git-grep",
        include_str!("../vendor/rules/search__git-grep.json"),
    ),
    (
        "search/grep",
        include_str!("../vendor/rules/search__grep.json"),
    ),
    ("search/rg", include_str!("../vendor/rules/search__rg.json")),
    (
        "service/journalctl",
        include_str!("../vendor/rules/service__journalctl.json"),
    ),
    (
        "service/launchctl",
        include_str!("../vendor/rules/service__launchctl.json"),
    ),
    (
        "service/lsof",
        include_str!("../vendor/rules/service__lsof.json"),
    ),
    (
        "service/netstat",
        include_str!("../vendor/rules/service__netstat.json"),
    ),
    (
        "service/service",
        include_str!("../vendor/rules/service__service.json"),
    ),
    (
        "service/ss",
        include_str!("../vendor/rules/service__ss.json"),
    ),
    (
        "service/systemctl-status",
        include_str!("../vendor/rules/service__systemctl-status.json"),
    ),
    ("system/df", include_str!("../vendor/rules/system__df.json")),
    ("system/du", include_str!("../vendor/rules/system__du.json")),
    (
        "system/file",
        include_str!("../vendor/rules/system__file.json"),
    ),
    ("system/ps", include_str!("../vendor/rules/system__ps.json")),
    ("task/just", include_str!("../vendor/rules/task__just.json")),
    ("task/make", include_str!("../vendor/rules/task__make.json")),
    (
        "tests/bun-test",
        include_str!("../vendor/rules/tests__bun-test.json"),
    ),
    (
        "tests/cargo-test",
        include_str!("../vendor/rules/tests__cargo-test.json"),
    ),
    (
        "tests/go-test",
        include_str!("../vendor/rules/tests__go-test.json"),
    ),
    (
        "tests/jest",
        include_str!("../vendor/rules/tests__jest.json"),
    ),
    (
        "tests/mocha",
        include_str!("../vendor/rules/tests__mocha.json"),
    ),
    (
        "tests/npm-test",
        include_str!("../vendor/rules/tests__npm-test.json"),
    ),
    (
        "tests/playwright",
        include_str!("../vendor/rules/tests__playwright.json"),
    ),
    (
        "tests/pnpm-test",
        include_str!("../vendor/rules/tests__pnpm-test.json"),
    ),
    (
        "tests/pytest",
        include_str!("../vendor/rules/tests__pytest.json"),
    ),
    (
        "tests/vitest",
        include_str!("../vendor/rules/tests__vitest.json"),
    ),
    (
        "tests/yarn-test",
        include_str!("../vendor/rules/tests__yarn-test.json"),
    ),
    (
        "transfer/rsync",
        include_str!("../vendor/rules/transfer__rsync.json"),
    ),
    (
        "transfer/scp",
        include_str!("../vendor/rules/transfer__scp.json"),
    ),
    // generic/fallback is always last — the loader sorts it to the tail of the
    // compiled rule list so it never shadows a more specific rule.
    (
        "generic/fallback",
        include_str!("../vendor/rules/generic__fallback.json"),
    ),
];

#[cfg(test)]
#[path = "builtin_tests.rs"]
mod tests;
