alibaba / open-code-review
Get started
Taken from the repository's own files on 24 Oct 2026. RepoPilot has not run these commands.
Prerequisites
node >=14from package.jsonGo 1.26.9from go.mod
Commands
Makefile| Task | Run | What it runs |
|---|---|---|
| run | make run | $(DIST_DIR)/$(BINARY_NAME)$(EXE) --staged |
| build | make build | $(GO) build -ldflags "$(LD_FLAGS)" -o $(DIST_DIR)/$(BINARY_NAME)$(EXE) ./cmd/opencodereview |
| test | make test | LC_ALL=C $(GO) test -v -race -count=1 $(PACKAGES) |
| check | make check | $(GO) mod tidy && gofmt -s -w . && LC_ALL=C $(GO) vet $(PACKAGES) && @echo "check passed" |
Install and use
README.mdnpm install -g @alibaba-group/open-code-review
After installation, the ocr command is available globally.
For other installation methods (install script, GitHub Release binary, from source), see Installation.
Developing
CONTRIBUTING.mdSetup
# 1. Fork the repository on GitHub
# 2. Clone your fork
git clone https://github.com/<your-username>/open-code-review.git
cd open-code-review
# 3. Add upstream remote (for syncing updates from the main repo)
git remote add upstream https://github.com/alibaba/open-code-review.git
# 4. Build the project
make build
# 5. Run tests
make test
If everything passes, you're ready to contribute.
Note: The
upstreamremote is read-only for contributors — it is used to pull the latest changes from the main repository. You cannot push directly to upstream. All commits must be pushed to your fork (origin) and submitted via Pull Request.