feat(lang): add Starlark review support - #1021
Open
Qiyuanqiii wants to merge 6 commits into
Open
Conversation
Co-authored-by: wu21-web <wu2196674@icloud.com>
Contributor
|
✅ OpenCodeReview: Review complete: 0 finding(s) across 3 selected item(s). |
Qiyuanqiii
marked this pull request as ready for review
August 20, 2026 09:48
Contributor
Author
|
@wu21-web Thank you for drafting the Starlark-specific review instructions. I’ve integrated them into this draft PR and added you as a co-author using the email you provided. Could you please review the instructions and confirm that the integration accurately reflects your contribution? |
Contributor
|
Sure, I will review soon. |
Co-authored-by: Qiyuanqiii <qiiiqiyuan@gmail.com>
chore: update documentation
wu21-web
reviewed
Aug 20, 2026
Co-authored-by: Tao Xin <wu2196674@icloud.com>
18 tasks
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
Summary
.bzl,.bazel, and.starto OCR's supported file types.BUILDandWORKSPACEfiles, to a dedicated built-in Starlark review rule.BUILDandWORKSPACEdiscoverable through thefile_findtool while preserving the existing filtering of unknown extensionless files.Motivation and Scope
Issue #1014 requests review support for Starlark, including the files commonly used by Bazel. OCR previously did not allow
.bzl,.bazel, or.starfiles through its extension filter. Extensionless Bazel build files could reach the review pipeline, but they had no Starlark-specific system rule, andfile_findomitted them when the review agent searched the repository.This PR adds consistent support across file selection, rule resolution, repository discovery, tests, and documentation. It does not execute Starlark, invoke Bazel, or run Buildifier; the new Markdown rule supplies language-specific guidance to the existing review agent.
Contributor Attribution
starlark.md, based on the official Bazel and Starlark documentation.BUILD/WORKSPACEdiscovery, tests, localized documentation, integration, Windows verification, and technical review of the follow-up documentation.dc6d2carecords both contributors through itsCo-authored-bytrailer; follow-up commitcf180762was authored by @wu21-web and co-authored by @Qiyuanqiii.Implementation
.bzl,.bazel, and.star.starlark.mdand map**/{BUILD,WORKSPACE,.bzl,.bazel,*.star}to it.BUILDandWORKSPACEin the file discovery tool's extensionless-file exceptions.Compatibility and User Impact
file_find.Type of Change
How Has This Been Tested?
Validation Environment
go1.26.5 windows/amd64699c91444ae1b485d7c6553e7858e1e1b95a2c6aAutomated Validation
make checktarget throughmingw32-make: license headers, English-only source check,go mod tidy, formatting, andgo vetmake testtarget throughmingw32-make: complete Go test suite with the race detectormake coveragetarget throughmingw32-make: 90.9% total statement coverage, above the required 90%git diff --checkManual and CLI Validation
A freshly built Windows executable resolved the built-in Starlark rule for every requested path form:
rules/library.bzlconfig.starMODULE.bazelpkg/BUILDWORKSPACEEach path matched
**/{BUILD,WORKSPACE,.bzl,.bazel,*.star}and loaded the Starlark rule. A workspace preview also selected all five supported forms while continuing to exclude an unknown extension.The repository-requested self-review completed successfully:
Checklist
go fmt,go vet)Known Limitations
Related Issues
Closes #1014.