advpl-code-review

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

ADVPL/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 (
BP-*
,
PERF-*
,
SEC-*
,
MOD-*
), 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.
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
.prw
to
.tlpp
. It does not cover generating new code (see
advpl-code-generation
), diagnosing a specific runtime/compilation error (see
advpl-debugging
), restructuring code without adding features (see
advpl-refactoring
), or performing the actual
.prw
to
.tlpp
conversion (see
advpl-to-tlpp-migration
).
Reference fileRead when
reference.mdAlways -- review categories, output format, severity levels, review process, rule ID prefixes
rules-best-practices.mdChecking RecLock/MsUnlock pairing, variable scope, area management, error handling, documentation (BP-* rules)
rules-performance.mdChecking Embedded SQL efficiency, loop efficiency, string operations, index usage (PERF-* rules)
rules-security.mdChecking SQL injection, input validation, credential exposure, sensitive data logging (SEC-* rules)
rules-modernization.mdChecking TLPP migration candidates, namespace usage, OOP patterns, modern UI frameworks (MOD-* rules)
sonarqube-rules-catalog.mdAligning findings with the official TOTVS SonarQube ruleset (groups G1-G5, CA/BG/CS codes)
本技能为现有ADVPL/TLPP代码提供系统化的代码审查方法,生成的审查发现将标注规则ID(
BP-*
、
PERF-*
、
SEC-*
、
MOD-*
)、严重级别(CRITICAL/WARNING/INFO)、文件/行号、问题描述及修复方案。审查涵盖最佳实践、性能、安全、现代化四大类别,并且可将审查发现与官方TOTVS SonarQube质量门禁进行映射。
当用户需要检查现有代码的质量、合规性、安全或性能问题时——例如在合并前、部署前、入职审计期间,或评估从
.prw
到
.tlpp
的迁移就绪性时,激活本技能。本技能不涵盖生成新代码(参见
advpl-code-generation
)、诊断特定运行时/编译错误(参见
advpl-debugging
)、在不新增功能的前提下重构代码(参见
advpl-refactoring
)或执行实际的
.prw
到
.tlpp
转换(参见
advpl-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代码)