Skip to content

Commit 7d152b5

Browse files
srickettsclaude
andcommitted
fix(codeowners): normalize override paths to avoid silent mismatches
Strip leading "./" and trailing "/" from override paths when loading the JSON file. This prevents silent mismatches when users write paths like "./flashinfer/fused_moe/" instead of "flashinfer/fused_moe". Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
1 parent 2347c50 commit 7d152b5

1 file changed

Lines changed: 6 additions & 0 deletions

File tree

scripts/codeowner_analyzer.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -788,6 +788,12 @@ def main() -> int:
788788
file=sys.stderr,
789789
)
790790
return 1
791+
792+
# Normalize paths: strip leading "./" and trailing "/"
793+
owner_overrides = {
794+
path.lstrip("./").rstrip("/"): users
795+
for path, users in owner_overrides.items()
796+
}
791797
except FileNotFoundError:
792798
print(
793799
f"Error: Overrides file not found: {args.overrides_file}",

0 commit comments

Comments
 (0)