feat(allowlist): add Mojo support - #977
Conversation
Add .mojo and .🔥 to the supported file types allowlist, a mojo.md review rule doc covering ownership/borrowing (borrowed/inout/owned, transfer semantics, copyinit/moveinit/del), unsafe pointer and FFI interop, the PythonObject boundary, parallelize/vectorize concurrency hazards, and Mojo-specific performance anti-patterns, and register the glob-to-rule mapping in system_rules.json. No conventional test-file exclusion pattern exists for Mojo yet. Part of the language-allowlist expansion tracked in alibaba#470.
|
✅ OpenCodeReview: Review complete: 0 finding(s) across 2 selected item(s). |
wu21-web
left a comment
There was a problem hiding this comment.
Site documentation updates missing, update at pages/src/content/docs/<locale>/review-rules.md.
|
@wu21-web Thanks for the catch — docs added in the latest commit. Updated Note: the ja/ru/zh translations are my best effort — please have a native speaker double-check the phrasing before merge. |
|
@wakqasahmed Same for here, merge conflicts. |
…upport # Conflicts: # internal/config/allowlist/allowed_ext_test.go # internal/config/allowlist/supported_file_types.json # internal/config/rules/system_rules.json # internal/config/rules/system_rules_test.go # pages/src/content/docs/en/review-rules.md # pages/src/content/docs/ja/review-rules.md # pages/src/content/docs/ru/review-rules.md # pages/src/content/docs/zh/review-rules.md
|
@wu21-web Resolved — rebased onto latest |
|
Hi @wu21-web — just checking in on this one, it's been about 4 days with CI green and mergeable. Is there anything needed from our side to help move it forward, or any rough idea on timing? No rush, just following up. Thanks for the review! |
|
@wakqasahmed Merge conflicts, please rebase branch main. |
|
@wu21-web Rebased — merged latest |
Summary
.mojoand.🔥to the supported file types allowlistallowed_ext_test.godocuments this explicitly (matching the existing Prisma/Shader precedent)internal/config/rules/rule_docs/mojo.md, a Mojo review rule doc covering ownership/borrowing conventions (borrowed/inout/ownedargument mismatches, unintended transfers with^,__copyinit__/__moveinit__/__del__correctness), value semantics and struct design, unsafe pointer and C/Python FFI interop, thePythonObjectinterop boundary,parallelize/vectorizeconcurrency hazards, Mojo-specific performance anti-patterns, and security-sensitive raw-pointer/deserialization concerns**/*.{mojo,🔥} -> mojo.mdinsystem_rules.jsonPart of the language-allowlist expansion tracked in #470.
Closes #976
Test plan
go test ./internal/config/allowlist/... -run 'TestIsAllowedExt|TestIsExcludedPath' -v— PASSgo test ./internal/config/rules/... -run TestResolve_DefaultRules -v— PASSgofmt -s -l .— cleango vet ./internal/config/...— cleango run scripts/verify-english-only.go— clean (423 files scanned, no unapproved non-English text)