Skip to content

feat(allowlist): add Nix support - #615

Open
ousamabenyounes wants to merge 1 commit into
alibaba:mainfrom
ousamabenyounes:feat/allowlist-nix-614
Open

feat(allowlist): add Nix support#615
ousamabenyounes wants to merge 1 commit into
alibaba:mainfrom
ousamabenyounes:feat/allowlist-nix-614

Conversation

@ousamabenyounes

Copy link
Copy Markdown
Contributor

Description

Adds Nix allowlist support by recognizing .nix files, registering a Nix-specific review rule, and covering case-insensitive extension matching in the allowlist test.

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)

Manual testing:

docker run --rm -v "$PWD":/src -w /src golang:1.26.5 go test ./internal/config/allowlist -run TestIsAllowedExt -count=1
docker run --rm -v "$PWD":/src -w /src golang:1.26.5 go test ./internal/config/... -count=1

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

Fixes #614
Refs #470

@github-actions

Copy link
Copy Markdown
Contributor

OpenCodeReview: No comments generated. Looks good to me.

@lizhengfeng101 lizhengfeng101 left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Thanks for adding Nix support — the rule doc is thorough and well-structured!

One thing missing: whenever system_rules.json is updated, the documentation table in the review-rules pages needs to stay in sync (see PR #612 for the pattern). Please rebase onto the latest main and add a **/*.nixnix.md row to each locale's table:

  • pages/src/content/docs/en/review-rules.md
  • pages/src/content/docs/zh-cn/review-rules.md
  • pages/src/content/docs/ja/review-rules.md
  • pages/src/content/docs/ko/review-rules.md
  • pages/src/content/docs/ru/review-rules.md

The new row should go after the **/*.bicep entry and before the *(fallback) line, matching the declaration order in system_rules.json.

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 Nix support

2 participants