[feature] 新增基于规则的 provider#231
Merged
Triple-Z merged 1 commit intoJun 3, 2026
Merged
Conversation
Contributor
Author
|
@gaocegege @Triple-Z @deb-sig/generator-dev need review |
gaocegege
approved these changes
May 30, 2026
Member
|
This feature can be considered as v3 core feature. |
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
新增运行时模板 Provider 的核心解释器能力,用规则表达导入逻辑,并补充模板 Provider 的使用文档与示例配置。
本 PR 未关联具体 issue。
Motivation and Context
当前各 Provider 的导入逻辑分散在专用代码里,维护和扩展新账单格式成本较高。
本 PR 将可复用的解析、规则匹配、变量、posting 生成等能力收敛到运行时模板 Provider 中。后续模板可以在独立模板仓库维护,DEG 主库只保留解释器、CLI 和文档入口,减少主库与模板数据的耦合。
Dependencies
无新增运行时外部依赖。
Type of change
How has this been tested?
已在本地运行以下测试:
GOCACHE=/private/tmp/go-build-cache GOPATH=/private/tmp/go-path make check-formatGOCACHE=/private/tmp/go-build-cache GOPATH=/private/tmp/go-path go test ./pkg/cmd ./pkg/importer ./pkg/compiler/...GOCACHE=/private/tmp/go-build-cache GOPATH=/private/tmp/go-path make testGOCACHE=/private/tmp/go-build-cache GOPATH=/private/tmp/go-path GOLANGCI_LINT_CACHE=/private/tmp/golangci-lint-cache PATH=/private/tmp/go-path/bin:$PATH golangci-lint run --timeout=5m测试配置:macOS,本地 Go cache/GOPATH 指向
/private/tmp。Is this change properly documented?
是。已补充模板 Provider 文档、配置说明和示例。