INNER CODE UNIT · JavaScript
validateReviewContent
rancher/terraform-provider-rancher2 · agent-scripts/after-invoke.js:187
export function validateReviewContent(report) {
const errors = [];
// 1. Security Check
const securityMatch = /security|vulnerab|secret/i.test(report);
if (!securityMatch) {
errors.push('Review report must explicitly confirm verification of security and credential safeguards.');
}
// 2. Coding Standards Check
const standardsMatch = /standards|coding\s+standards|rules|conventions/i.test(report);
if (!standardsMatch) {
errors.push('Review report must explicitly confirm verification of repository coding standards.');
}
// 3. Spelling & Wording Check
const spellingMatch = /spelling|wording|typo|discrepancy/i.test(report);
if (!spellingMatch) {