CtrlK
BlogDocsLog inGet started
Tessl Logo

tessl/npm-shebang-regex

Regular expression for matching Unix shebang lines at the beginning of files

88

1.54x
Overview
Eval results
Files

rubric.jsonevals/scenario-8/

{
  "context": "This criteria evaluates how well the engineer uses the shebang-regex package to detect and extract shebang lines, particularly focusing on understanding the greedy capture pattern for complex interpreter specifications with arguments.",
  "type": "weighted_checklist",
  "checklist": [
    {
      "name": "Uses shebangRegex",
      "description": "Imports and uses the shebangRegex package to match shebang lines in the script content.",
      "max_score": 20
    },
    {
      "name": "Uses test method",
      "description": "Uses the shebangRegex.test() method to check if a shebang exists at the beginning of the script content.",
      "max_score": 15
    },
    {
      "name": "Uses exec method",
      "description": "Uses the shebangRegex.exec() method to extract the shebang line and capture groups from the script content.",
      "max_score": 20
    },
    {
      "name": "Extracts full shebang",
      "description": "Correctly extracts the complete shebang line including #! using shebangRegex.exec()[0].",
      "max_score": 10
    },
    {
      "name": "Extracts interpreter path",
      "description": "Correctly extracts the interpreter path without #! using the capture group shebangRegex.exec()[1].",
      "max_score": 15
    },
    {
      "name": "Parses greedy capture",
      "description": "Correctly parses the greedy capture group content (the full interpreter directive with arguments) to separate the interpreter command from its arguments.",
      "max_score": 20
    }
  ]
}

Install with Tessl CLI

npx tessl i tessl/npm-shebang-regex

tile.json