Complete jenkinsfile toolkit with generation and validation capabilities
97
97%
Does it follow best practices?
Impact
Pending
No eval scenarios have been run
Risky
Do not use without reviewing
{
"context": "Tests validation of a src/**/*.groovy class file: missing package declaration, class name not matching filename (BuildHelper vs BuildUtils.groovy), missing Serializable implementation (required for Jenkins CPS serialization), and wildcard imports.",
"type": "weighted_checklist",
"checklist": [
{
"name": "Shared library script used",
"description": "class-review.md mentions invoking or attempting bash scripts/validate_shared_library.sh for the src class file",
"max_score": 15
},
{
"name": "Missing package declaration flagged",
"description": "Report identifies that the file lacks a package declaration (should be 'package com.company')",
"max_score": 20
},
{
"name": "Class-filename mismatch flagged",
"description": "Report identifies that the class is named 'BuildHelper' but the file is named 'BuildUtils.groovy' — these must match",
"max_score": 20
},
{
"name": "Serializable missing flagged",
"description": "Report identifies that BuildHelper does not implement Serializable, which is required for Jenkins pipeline CPS serialization",
"max_score": 20
},
{
"name": "Wildcard imports flagged",
"description": "Report flags the wildcard imports (import com.company.* and import jenkins.model.*) as a violation",
"max_score": 10
},
{
"name": "Corrected code provided",
"description": "Report includes corrected class declaration with package statement, matching class name, and Serializable implementation",
"max_score": 15
}
]
}