Skip to content

feat: Add HarmonyOS support for .ets files and review configurations#48

Merged
lizhengfeng101 merged 3 commits into
alibaba:mainfrom
stay-foolish-forever:feat/harmony-os-support
Jun 5, 2026
Merged

feat: Add HarmonyOS support for .ets files and review configurations#48
lizhengfeng101 merged 3 commits into
alibaba:mainfrom
stay-foolish-forever:feat/harmony-os-support

Conversation

@stay-foolish-forever
Copy link
Copy Markdown
Contributor

Description

Add complete HarmonyOS/ArkTS development support to OCR's review capabilities.

HarmonyOS uses .ets (ArkTS) source files and .json5 configuration files (module.json5, app.json5, oh-package.json5). This PR enables OCR to review these file types with dedicated rules, while properly excluding dependency directories and test files.

Changes:

  • Add .ets and .json5 to the supported file types allowlist
  • Create arkts.md rule doc covering ArkTS-specific checks (state decorators, lifecycle, declarative UI, performance, resource access, component communication) plus TypeScript general checks
  • Map **/.ets → arkts.md and **/.json5 → json.md in system_rules.json
  • Exclude /oh_modules/ (HarmonyOS dependency directory) and **/*.test.ets (test files) from review
  • Add unit tests for all new extensions and patterns

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)

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

Issue #47

…config, and oh_modules exclusion

- Add arkts.md rule doc with ArkTS-specific and TypeScript general checks
- Add .json5 to supported file types for HarmonyOS config files
- Map .json5 to json.md rules in system_rules.json
- Exclude oh_modules/** (HarmonyOS dependency dir) from review
- Exclude *.test.ets (HarmonyOS test files) from review
- Add unit tests for all new extensions and patterns
@lizhengfeng101 lizhengfeng101 merged commit 95c5d59 into alibaba:main Jun 5, 2026
1 check passed
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.

2 participants