feat(allowlist): add Julia (.jl) support#501
Merged
Merged
Conversation
Register the Julia extension (.jl) in the review allowlist, exclude the Pkg test-dir convention (**/test/**/*.jl), and add a Julia review rule doc with a glob mapping. Covered by positive/negative table-test cases in allowed_ext_test.go and a resolve case in system_rules_test.go. Part of alibaba#470.
Contributor
|
✅ OpenCodeReview: No comments generated. Looks good to me. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Adds Julia (
.jl) support to the review allowlist, as one of the language groups tracked in #470..jlinsupported_file_types.json**/test/**/*.jltodefault_exclude_patterns.json, matching Julia'sPkglayout where tests live undertest/(e.g.test/runtests.jl)julia.mdrule doc and maps**/*.jlto it insystem_rules.jsonThe change is entirely additive — no existing extension, pattern, or mapping is altered — and follows the same shape as the merged GraphQL PR #491.
The rule doc focuses on pitfalls that are genuinely Julia-specific rather than generic lint: type stability and inference, multiple-dispatch hazards (method ambiguity, type piracy),
@inbounds/indexing safety, thenothing/missing/NaNdistinction, thread-safety underThreads.@threads, performance anti-patterns, and security-sensitive constructs (eval/Meta.parseon untrusted input,unsafe_*andccall).Note on one detail: Julia backticks build a
Cmdand pass arguments to the process without a shell, sorun(`tool $input`)is not itself a command-injection vector. The doc therefore flags only explicit shell invocation (sh -c,bash -c), to avoid false positives on safe code.Type of Change
How Has This Been Tested?
make testpasses locallymake check(go mod tidy +gofmt -s -w .+go vet) is clean andgo.mod/go.sumare unchanged. Package tests pass with the race detector:ok github.com/open-code-review/open-code-review/internal/config/allowlist
ok github.com/open-code-review/open-code-review/internal/config/rules
Coverage on the touched packages is 88.9% (
allowlist) and 86.4% (rules), both above the 80% gate.Checklist
go fmt,go vet)Related Issues
Part of #470
closes #500