advpl-code-review
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChineseADVPL/TLPP Code Review
ADVPL/TLPP 代码审查
This skill provides a systematic code review methodology for existing ADVPL/TLPP code, producing findings tagged with a rule ID (, , , ), a severity (CRITICAL/WARNING/INFO), the file/line, the issue, and the fix. It covers four review categories: best practices, performance, security, and modernization, and can map findings to the official TOTVS SonarQube quality gate.
BP-*PERF-*SEC-*MOD-*Activate this skill when the user wants existing code inspected for quality, compliance, security, or performance issues -- e.g. before a merge, before a deploy, during an onboarding audit, or when assessing migration readiness from to . It does not cover generating new code (see ), diagnosing a specific runtime/compilation error (see ), restructuring code without adding features (see ), or performing the actual to conversion (see ).
.prw.tlppadvpl-code-generationadvpl-debuggingadvpl-refactoring.prw.tlppadvpl-to-tlpp-migration| Reference file | Read when |
|---|---|
| reference.md | Always -- review categories, output format, severity levels, review process, rule ID prefixes |
| rules-best-practices.md | Checking RecLock/MsUnlock pairing, variable scope, area management, error handling, documentation (BP-* rules) |
| rules-performance.md | Checking Embedded SQL efficiency, loop efficiency, string operations, index usage (PERF-* rules) |
| rules-security.md | Checking SQL injection, input validation, credential exposure, sensitive data logging (SEC-* rules) |
| rules-modernization.md | Checking TLPP migration candidates, namespace usage, OOP patterns, modern UI frameworks (MOD-* rules) |
| sonarqube-rules-catalog.md | Aligning findings with the official TOTVS SonarQube ruleset (groups G1-G5, CA/BG/CS codes) |
本技能为现有ADVPL/TLPP代码提供系统化的代码审查方法,生成的审查发现将标注规则ID(、、、)、严重级别(CRITICAL/WARNING/INFO)、文件/行号、问题描述及修复方案。审查涵盖最佳实践、性能、安全、现代化四大类别,并且可将审查发现与官方TOTVS SonarQube质量门禁进行映射。
BP-*PERF-*SEC-*MOD-*当用户需要检查现有代码的质量、合规性、安全或性能问题时——例如在合并前、部署前、入职审计期间,或评估从到的迁移就绪性时,激活本技能。本技能不涵盖生成新代码(参见)、诊断特定运行时/编译错误(参见)、在不新增功能的前提下重构代码(参见)或执行实际的到转换(参见)。
.prw.tlppadvpl-code-generationadvpl-debuggingadvpl-refactoring.prw.tlppadvpl-to-tlpp-migration| 参考文件 | 读取时机 |
|---|---|
| reference.md | 始终读取——审查类别、输出格式、严重级别、审查流程、规则ID前缀 |
| rules-best-practices.md | 检查RecLock/MsUnlock配对、变量作用域、工作区管理、错误处理、文档时(BP-*规则) |
| rules-performance.md | 检查嵌入式SQL效率、循环效率、字符串操作、索引使用时(PERF-*规则) |
| rules-security.md | 检查SQL注入、输入验证、凭证泄露、敏感数据日志记录时(SEC-*规则) |
| rules-modernization.md | 检查TLPP迁移候选、命名空间使用、OOP模式、现代UI框架时(MOD-*规则) |
| sonarqube-rules-catalog.md | 将审查发现与官方TOTVS SonarQube规则集对齐时(G1-G5组、CA/BG/CS代码) |