Regular expression for matching Unix shebang lines at the beginning of files
88
{
"context": "This criteria evaluates how well the engineer uses the shebang-regex package to validate shebang positioning, with specific focus on understanding the start-of-string anchoring behavior enforced by the package's regex pattern.",
"type": "weighted_checklist",
"checklist": [
{
"name": "Imports shebang-regex",
"description": "Code correctly imports or requires the shebang-regex package",
"max_score": 15
},
{
"name": "Uses .test() method",
"description": "Uses the shebang-regex .test() method to check for shebang presence, which is the appropriate method for boolean validation",
"max_score": 30
},
{
"name": "Relies on anchoring",
"description": "Implementation correctly relies on shebang-regex's built-in start-of-string anchoring (^) to validate proper shebang positioning, without adding redundant position checks",
"max_score": 35
},
{
"name": "Returns boolean correctly",
"description": "Function correctly returns the boolean result from shebang-regex.test() or appropriately converts the result to boolean",
"max_score": 20
}
]
}Install with Tessl CLI
npx tessl i tessl/npm-shebang-regexdocs
evals
scenario-1
scenario-2
scenario-3
scenario-4
scenario-5
scenario-6
scenario-7
scenario-8
scenario-9