# Imperative forms of verbs, seeded from
# https://github.com/crate-ci/imperative/blob/master/assets/imperatives.txt
# and extended since.
#
# This is NOT an allow-list, and a subject is never rejected for being absent
# from it. CC003 decides on the word's form (see SubjectImperativeValidator),
# and the only thing this set is still consulted for is the stem test behind
# the third-person -s rule: "fixes" is a verb because "fix" is in here, while
# "status" is not, because dropping its -s leaves nothing this set contains.
#
# So a missing verb costs a missed violation, never a false rejection -- there
# is nothing to keep up with, and no need to send a patch adding the verb you
# just used. Additions still help the -s rule catch more, and cost nothing.

IMPERATIVES = {
    "abort",
    "absorb",
    "abstract",
    "accept",
    "access",
    "accommodate",
    "acknowledge",
    "activate",
    "adapt",
    "add",
    "address",
    "adjust",
    "advertise",
    "aggregate",
    "align",
    "allow",
    "amend",
    "annotate",
    "append",
    "apply",
    "archive",
    "assert",
    "assign",
    "attach",
    "attempt",
    "audit",
    "authenticate",
    "authorise",
    "authorize",
    "automate",
    "avoid",
    "await",
    "backport",
    "balance",
    "batch",
    "be",
    "bind",
    "block",
    "break",
    "broadcast",
    "broaden",
    "build",
    "bump",
    "bypass",
    "cache",
    "calculate",
    "call",
    "cancel",
    "capture",
    "centralise",
    "centralize",
    "change",
    "check",
    "clarify",
    "clean",
    "clear",
    "close",
    "collapse",
    "collect",
    "combine",
    "comment",
    "commit",
    "compare",
    "complete",
    "compose",
    "compress",
    "compute",
    "configure",
    "confirm",
    "connect",
    "consolidate",
    "construct",
    "consume",
    "control",
    "convert",
    "copy",
    "correct",
    "count",
    "create",
    "customise",
    "customize",
    "debug",
    "declare",
    "decode",
    "decompress",
    "decorate",
    "decrease",
    "decrypt",
    "deduplicate",
    "defer",
    "define",
    "delegate",
    "delete",
    "demonstrate",
    "deprecate",
    "derive",
    "describe",
    "deselect",
    "detach",
    "detect",
    "determine",
    "diagnose",
    "die",
    "differentiate",
    "disable",
    "disallow",
    "discard",
    "disconnect",
    "dispatch",
    "display",
    "dispose",
    "distinguish",
    "distribute",
    "do",
    "document",
    "downgrade",
    "download",
    "drop",
    "dump",
    "duplicate",
    "elaborate",
    "eliminate",
    "embed",
    "emit",
    "empty",
    "enable",
    "encapsulate",
    "encode",
    "encrypt",
    "end",
    "enforce",
    "enhance",
    "ensure",
    "enumerate",
    "escape",
    "establish",
    "evaluate",
    "evolve",
    "examine",
    "exclude",
    "execute",
    "exit",
    "expand",
    "expect",
    "expire",
    "explain",
    "export",
    "expose",
    "extend",
    "extract",
    "factor",
    "feed",
    "fetch",
    "fill",
    "filter",
    "finalise",
    "finalize",
    "find",
    "fire",
    "fix",
    "flag",
    "flatten",
    "flush",
    "fold",
    "forbid",
    "force",
    "format",
    "forward",
    "free",
    "freeze",
    "generate",
    "get",
    "give",
    "go",
    "grant",
    "group",
    "guard",
    "halt",
    "handle",
    "harden",
    "hash",
    "help",
    "hide",
    "highlight",
    "hoist",
    "hold",
    "honor",
    "honour",
    "identify",
    "ignore",
    "illustrate",
    "implement",
    "import",
    "improve",
    "include",
    "increase",
    "index",
    "indicate",
    "infer",
    "inform",
    "init",
    "initialise",
    "initialize",
    "initiate",
    "inject",
    "inline",
    "input",
    "insert",
    "instantiate",
    "instrument",
    "integrate",
    "intercept",
    "introduce",
    "invalidate",
    "invoke",
    "isolate",
    "iterate",
    "join",
    "keep",
    "launch",
    "let",
    "lift",
    "link",
    "list",
    "listen",
    "load",
    "locate",
    "lock",
    "log",
    "look",
    "lower",
    "make",
    "manage",
    "manipulate",
    "map",
    "mark",
    "marshal",
    "mask",
    "match",
    "maximise",
    "maximize",
    "measure",
    "memoise",
    "memoize",
    "mention",
    "merge",
    "migrate",
    "minimise",
    "minimize",
    "mirror",
    "mock",
    "modernise",
    "modernize",
    "modify",
    "modularise",
    "modularize",
    "monitor",
    "mount",
    "move",
    "name",
    "narrow",
    "navigate",
    "neutralise",
    "neutralize",
    "normalise",
    "normalize",
    "note",
    "notify",
    "obtain",
    "offset",
    "omit",
    "open",
    "optimise",
    "optimize",
    "orchestrate",
    "organise",
    "organize",
    "outline",
    "output",
    "overhaul",
    "override",
    "overwrite",
    "package",
    "pad",
    "paginate",
    "parameterise",
    "parameterize",
    "parse",
    "pass",
    "pause",
    "perform",
    "permit",
    "persist",
    "pick",
    "pin",
    "ping",
    "pipe",
    "plot",
    "plug",
    "pluralise",
    "pluralize",
    "poll",
    "polyfill",
    "populate",
    "port",
    "post",
    "postpone",
    "precompute",
    "prefer",
    "prefix",
    "prepare",
    "prepend",
    "preserve",
    "prevent",
    "print",
    "prioritise",
    "prioritize",
    "process",
    "produce",
    "propagate",
    "provide",
    "proxy",
    "prune",
    "publish",
    "pull",
    "purge",
    "push",
    "put",
    "qualify",
    "quarantine",
    "query",
    "quote",
    "raise",
    "randomise",
    "randomize",
    "rank",
    "read",
    "reassign",
    "rebase",
    "rebuild",
    "recall",
    "receive",
    "reclaim",
    "recommend",
    "reconcile",
    "reconnect",
    "record",
    "recover",
    "redact",
    "redesign",
    "redirect",
    "reduce",
    "refactor",
    "refer",
    "reformat",
    "refresh",
    "register",
    "reinstate",
    "reject",
    "relate",
    "relax",
    "release",
    "reload",
    "relocate",
    "remap",
    "remove",
    "rename",
    "render",
    "reorder",
    "reorganise",
    "reorganize",
    "repeat",
    "rephrase",
    "replace",
    "replay",
    "reply",
    "report",
    "represent",
    "repurpose",
    "request",
    "require",
    "rescue",
    "reset",
    "resolve",
    "respect",
    "restore",
    "restrict",
    "resume",
    "retarget",
    "rethrow",
    "retire",
    "retrieve",
    "retry",
    "return",
    "reuse",
    "revalidate",
    "revamp",
    "revert",
    "revoke",
    "rewire",
    "rework",
    "rewrite",
    "roll",
    "rollback",
    "round",
    "route",
    "run",
    "sample",
    "sanitise",
    "sanitize",
    "save",
    "scan",
    "schedule",
    "scope",
    "seal",
    "search",
    "select",
    "send",
    "separate",
    "serialise",
    "serialize",
    "serve",
    "set",
    "settle",
    "shard",
    "shorten",
    "show",
    "shuffle",
    "silence",
    "simplify",
    "simulate",
    "skip",
    "slice",
    "sort",
    "source",
    "spawn",
    "specify",
    "speed",
    "spell",
    "split",
    "spread",
    "squash",
    "stabilise",
    "stabilize",
    "standardise",
    "standardize",
    "start",
    "step",
    "stop",
    "store",
    "streamline",
    "strip",
    "stub",
    "subclass",
    "submit",
    "subscribe",
    "substitute",
    "suggest",
    "sum",
    "supersede",
    "support",
    "suppress",
    "suspend",
    "swap",
    "switch",
    "sync",
    "synchronise",
    "synchronize",
    "tag",
    "take",
    "teach",
    "tear",
    "terminate",
    "test",
    "throttle",
    "throw",
    "tighten",
    "time",
    "toggle",
    "tolerate",
    "trace",
    "track",
    "transfer",
    "transform",
    "translate",
    "transmit",
    "treat",
    "trigger",
    "trim",
    "truncate",
    "try",
    "tune",
    "turn",
    "tweak",
    "unbind",
    "unescape",
    "unify",
    "unlock",
    "unmarshal",
    "unpack",
    "unsubscribe",
    "untangle",
    "unwind",
    "unwrap",
    "update",
    "upgrade",
    "uphold",
    "upload",
    "use",
    "validate",
    "vendor",
    "verify",
    "view",
    "wait",
    "walk",
    "warm",
    "warn",
    "weaken",
    "widen",
    "wire",
    "withdraw",
    "work",
    "wrap",
    "write",
    "yield",
    "zip",
}


# Imperative verbs that end in -ed or -ing without being a past tense or a
# gerund, and so would be misread by the morphology rule in
# SubjectImperativeValidator. Short enough to enumerate, which is what lets
# that rule work on shape instead of on a vocabulary of every English verb.
#
# Both groups are meant to be the whole family rather than a sample of it --
# a half-enumerated closed set would put back exactly the "add my word"
# treadmill this check was rebuilt to escape. Err towards including a word:
# an entry that never comes up costs nothing, a missing one rejects someone
# who wrote correct English.
NON_IMPERATIVE_LOOKALIKES = {
    # -ed, but not a past tense
    "bleed",
    "breed",
    "embed",
    "exceed",
    "feed",
    "heed",
    "need",
    "proceed",
    "seed",
    "shed",
    "shred",
    "speed",
    "spread",
    "succeed",
    "wed",
    "weed",
    # -ing, but not a gerund
    "bring",
    "cling",
    "ding",
    "fling",
    "ping",
    "ring",
    "sing",
    "sling",
    "spring",
    "sting",
    "string",
    "swing",
    "wing",
    "wring",
    "zing",
}
