{"record":{"id":"fe83f9d6bb70affb","repo":"Hmbown/CodeWhale","slug":"path-lineno-expected-alias-name-email","errorCode":null,"errorMessage":"{path}:{lineno}: expected 'alias = Name <email>'","messagePattern":"(.+?):(.+?): expected 'alias = Name <email>'","errorType":"exception","errorClass":"ValueError","httpStatus":null,"severity":"error","filePath":"scripts/check-coauthor-trailers.py","lineNumber":149,"sourceCode":"    match = IDENTITY_RE.match(raw)\n    if not match:\n        raise ValueError(f\"{context}: expected 'Name <id+login@users.noreply.github.com>'\")\n    identity = Identity(match.group(\"name\").strip(), match.group(\"email\").strip())\n    if not CANONICAL_NOREPLY_RE.match(identity.email):\n        raise ValueError(\n            f\"{context}: right-hand email must be numeric GitHub noreply, got {identity.email}\"\n        )\n    return identity\n\n\ndef load_author_map(path: Path) -> dict[str, Identity]:\n    aliases: dict[str, Identity] = {}\n    for lineno, raw_line in enumerate(path.read_text(encoding=\"utf-8\").splitlines(), start=1):\n        line = raw_line.split(\"#\", 1)[0].strip()\n        if not line:\n            continue\n        if \"=\" not in line:\n            raise ValueError(f\"{path}:{lineno}: expected 'alias = Name <email>'\")\n        alias, raw_identity = [part.strip() for part in line.split(\"=\", 1)]\n        identity = parse_identity(raw_identity, f\"{path}:{lineno}\")\n        key = norm_key(alias)\n        if key in aliases and aliases[key] != identity:\n            raise ValueError(f\"{path}:{lineno}: duplicate alias {alias!r}\")\n        aliases[key] = identity\n        aliases.setdefault(norm_key(identity.email), identity)\n        aliases.setdefault(norm_key(identity.name), identity)\n        if login := github_login_from_noreply(identity.email):\n            aliases.setdefault(norm_key(login), identity)\n    return aliases\n\n\ndef git_log(commit_range: str) -> list[Commit]:\n    try:\n        raw = subprocess.check_output(\n            [\n                \"git\",","sourceCodeStart":131,"sourceCodeEnd":167,"githubUrl":"https://github.com/Hmbown/CodeWhale/blob/8880682c63083a91624de936797efa3ce9e498fd/scripts/check-coauthor-trailers.py#L131-L167","documentation":"Each non-empty, non-comment line of .github/AUTHOR_MAP must be 'alias = Name <email>'. This error is raised while loading the map when a line contains no '=' separator at all, with the file path and 1-based line number of the bad line.","triggerScenarios":"A map line like 'Jane Doe <1234+jane@users.noreply.github.com>' (identity without alias), a free-text note left in the file, or a line where '=' was replaced by ':' or omitted. Comments after '#' and blank lines are allowed; everything else must be an assignment.","commonSituations":"Hand-edits to AUTHOR_MAP that paste a raw identity instead of an alias mapping; documenting entries with prose lines instead of '#'-comments; merge conflicts leaving conflict markers ('<<<<<<<') that contain no '='.","solutions":["Open .github/AUTHOR_MAP at the reported line and rewrite it as 'alias = Name <id+login@users.noreply.github.com>'.","Move any explanatory text into a '#' comment line.","Resolve leftover merge-conflict markers in the file.","Validate with a quick run: python3 scripts/check-coauthor-trailers.py <range> before pushing."],"exampleFix":"# before (line 12 of .github/AUTHOR_MAP)\nJane Doe <1234567+janedoe@users.noreply.github.com>\n# after\njane = Jane Doe <1234567+janedoe@users.noreply.github.com>","handlingStrategy":"validation","validationCode":"def map_line_is_assignment(line: str) -> bool:\n    line = line.split(\"#\", 1)[0].strip()\n    return (not line) or (\"=\" in line)","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Keep AUTHOR_MAP lines strictly 'alias = Name <email>'; put prose in '#' comments.","Lint the map in CI with the checker itself so bad lines fail fast.","Resolve merge conflicts in AUTHOR_MAP fully — leftover markers lack '=' and raise this error."],"tags":["git","author-map","validation","ci","config"],"backgroundTag":null,"analyzedSha":"8880682c63083a91624de936797efa3ce9e498fd","analyzedAt":"2026-08-16T11:31:27.956Z","schemaVersion":2},"datasetVersion":"2026-08-16T13:17:31.715Z"}