Skip to content

feat(allowlist): add Julia (.jl) support - #501

Merged
lizhengfeng101 merged 1 commit into
alibaba:mainfrom
hsdfat:feat/allowlist-julia
Jul 26, 2026
Merged

lizhengfeng101 merged 1 commit into
alibaba:mainfrom
hsdfat:feat/allowlist-julia

Conversation

@hsdfat

@hsdfat hsdfat commented Jul 25, 2026

Copy link
Copy Markdown
Contributor

Description

Adds Julia (.jl) support to the review allowlist, as one of the language groups tracked in #470.

  • registers .jl in supported_file_types.json
  • adds **/test/**/*.jl to default_exclude_patterns.json, matching Julia's Pkg layout where tests live under test/ (e.g. test/runtests.jl)
  • adds a julia.md rule doc and maps **/*.jl to it in system_rules.json
  • covers all of the above with positive/negative table-test cases

The 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, the nothing / missing / NaN distinction, thread-safety under Threads.@threads, performance anti-patterns, and security-sensitive constructs (eval/Meta.parse on untrusted input, unsafe_* and ccall).

Note on one detail: Julia backticks build a Cmd and pass arguments to the process without a shell, so run(`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

  • Bug fix (non-breaking change that fixes an issue)
  • New feature (non-breaking change that adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • Refactoring (no functional changes)
  • Documentation update
  • CI / Build / Tooling

How Has This Been Tested?

  • make test passes locally
  • Manual testing (describe below)

make check (go mod tidy + gofmt -s -w . + go vet) is clean and go.mod/go.sum are 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

  • My code follows the project's coding style (go fmt, go vet)
  • I have performed a self-review of my code
  • I have added tests that prove my fix is effective or my feature works
  • New and existing unit tests pass locally with my changes
  • I have updated the documentation accordingly (if applicable)
  • I have signed the CLA

Related Issues

Part of #470
closes #500

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 #470.
@CLAassistant

CLAassistant commented Jul 25, 2026 •

Copy link
Copy Markdown

CLA assistant check
All committers have signed the CLA.

@github-actions

Copy link
Copy Markdown
Contributor

✅ OpenCodeReview: No comments generated. Looks good to me.

@lizhengfeng101 lizhengfeng101 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@lizhengfeng101
lizhengfeng101 merged commit 013d71c into alibaba:main Jul 26, 2026
8 checks passed
mittalpk added a commit to mittalpk/open-code-review that referenced this pull request Jul 27, 2026
…explicitly

The previous commit on this branch was built from a local main that
predated the Julia (.jl) support merge (alibaba#501), so restoring stashed
changes onto a freshly-branched, up-to-date main silently replaced the
newer .jl allowlist entry, its system_rules.json mapping, and its
allowed_ext_test.go / system_rules_test.go cases with the stale
pre-Julia state instead of adding Bicep alongside them.

Restores every removed Julia entry (allowlist, TestIsExcludedPath
cases, system_rules.json mapping, and both test files) so this is now
a pure addition of Bicep support, not a replacement of Julia support.

Also lists common database ports (MySQL/3306, PostgreSQL/5432, SQL
Server/1433, MongoDB/27017) explicitly in bicep.md's sensitive-port
clause per review feedback.
mittalpk added a commit to mittalpk/open-code-review that referenced this pull request Jul 27, 2026
Same root cause as the sibling Bicep PR (alibaba#525): the local main used to
build this branch's working changes predated the Julia support merge
(alibaba#501), so restoring those changes onto a branch freshly cut from the
current upstream/main silently replaced the newer .jl allowlist entry
and its test cases with the stale pre-Julia state instead of adding
HCL/Terraform alongside them.

Restores .jl in supported_file_types.json, the TestIsAllowedExt and
TestIsExcludedPath Julia cases in allowed_ext_test.go, and the Julia
resolution cases in system_rules_test.go -- system_rules.json's
.jl -> julia.md mapping was already restored in a prior commit on
this branch. Now a pure addition of HCL/Terraform support, not a
replacement of Julia support.
lizhengfeng101 pushed a commit that referenced this pull request Jul 27, 2026
* feat(allowlist): add HCL/Terraform (.hcl, .tfvars) support

Adds .hcl and .tfvars to the allowlist and maps them, along with the
already-supported .tf, to a new dedicated terraform.md review rule
doc covering hardcoded secrets/credentials, overly permissive
network/IAM access, state file hygiene, and lifecycle protection on
stateful resources. .tf previously fell through to the generic
default rule set with no Terraform-specific guidance despite already
being allowlisted; bringing all three extensions under one doc gives
consistent coverage rather than leaving .tf behind.

Part of #470, closes #522.

* Update internal/config/rules/system_rules.json

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>

* fix: restore Julia (.jl) support accidentally removed

Same root cause as the sibling Bicep PR (#525): the local main used to
build this branch's working changes predated the Julia support merge
(#501), so restoring those changes onto a branch freshly cut from the
current upstream/main silently replaced the newer .jl allowlist entry
and its test cases with the stale pre-Julia state instead of adding
HCL/Terraform alongside them.

Restores .jl in supported_file_types.json, the TestIsAllowedExt and
TestIsExcludedPath Julia cases in allowed_ext_test.go, and the Julia
resolution cases in system_rules_test.go -- system_rules.json's
.jl -> julia.md mapping was already restored in a prior commit on
this branch. Now a pure addition of HCL/Terraform support, not a
replacement of Julia support.

---------

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
mittalpk added a commit to mittalpk/open-code-review that referenced this pull request Jul 27, 2026
…explicitly

The previous commit on this branch was built from a local main that
predated the Julia (.jl) support merge (alibaba#501), so restoring stashed
changes onto a freshly-branched, up-to-date main silently replaced the
newer .jl allowlist entry, its system_rules.json mapping, and its
allowed_ext_test.go / system_rules_test.go cases with the stale
pre-Julia state instead of adding Bicep alongside them.

Restores every removed Julia entry (allowlist, TestIsExcludedPath
cases, system_rules.json mapping, and both test files) so this is now
a pure addition of Bicep support, not a replacement of Julia support.

Also lists common database ports (MySQL/3306, PostgreSQL/5432, SQL
Server/1433, MongoDB/27017) explicitly in bicep.md's sensitive-port
clause per review feedback.
Githab-capibara added a commit to Githab-capibara/open-code-review that referenced this pull request Sep 17, 2026
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.
Githab-capibara added a commit to Githab-capibara/open-code-review that referenced this pull request Sep 17, 2026
* feat(allowlist): add HCL/Terraform (.hcl, .tfvars) support

Adds .hcl and .tfvars to the allowlist and maps them, along with the
already-supported .tf, to a new dedicated terraform.md review rule
doc covering hardcoded secrets/credentials, overly permissive
network/IAM access, state file hygiene, and lifecycle protection on
stateful resources. .tf previously fell through to the generic
default rule set with no Terraform-specific guidance despite already
being allowlisted; bringing all three extensions under one doc gives
consistent coverage rather than leaving .tf behind.

Part of alibaba#470, closes alibaba#522.

* Update internal/config/rules/system_rules.json

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>

* fix: restore Julia (.jl) support accidentally removed

Same root cause as the sibling Bicep PR (alibaba#525): the local main used to
build this branch's working changes predated the Julia support merge
(alibaba#501), so restoring those changes onto a branch freshly cut from the
current upstream/main silently replaced the newer .jl allowlist entry
and its test cases with the stale pre-Julia state instead of adding
HCL/Terraform alongside them.

Restores .jl in supported_file_types.json, the TestIsAllowedExt and
TestIsExcludedPath Julia cases in allowed_ext_test.go, and the Julia
resolution cases in system_rules_test.go -- system_rules.json's
.jl -> julia.md mapping was already restored in a prior commit on
this branch. Now a pure addition of HCL/Terraform support, not a
replacement of Julia support.

---------

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
@hsdfat
hsdfat deleted the feat/allowlist-julia branch November 6, 2026 11:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

feat(allowlist): add Julia (.jl) support

3 participants