Convert globs to regular expressions
100
Pending
Does it follow best practices?
Impact
100%
1.14xAverage score across 9 eval scenarios
Pending
The risk profile of this skill
{
"context": "This criteria evaluates how well the engineer uses the glob-to-regexp package to implement pattern matching with different matching modes (anchored vs global). The focus is on correct usage of the flags option to control whether patterns match entire strings or substrings.",
"type": "weighted_checklist",
"checklist": [
{
"name": "Import glob-to-regexp",
"description": "The solution imports or requires the glob-to-regexp package (typically imported as 'globToRegexp' or similar)",
"max_score": 10
},
{
"name": "Exact matching implementation",
"description": "The createExactMatcher function uses globToRegexp() without the flags option (or with default/empty flags) to create anchored patterns that match entire strings from start to end",
"max_score": 25
},
{
"name": "Substring matching implementation",
"description": "The createSubstringMatcher function uses globToRegexp() with the {flags: 'g'} option to create unanchored patterns that match substrings anywhere in the input",
"max_score": 25
},
{
"name": "RegExp usage",
"description": "The solution correctly uses the RegExp objects returned by globToRegexp() to test strings (e.g., using .test() method or similar)",
"max_score": 20
},
{
"name": "Filter function correctness",
"description": "The filterPaths function correctly delegates to the appropriate matcher (exact or substring) based on the mode parameter and properly filters the input array",
"max_score": 20
}
]
}docs
evals
scenario-1
scenario-2
scenario-3
scenario-4
scenario-5
scenario-6
scenario-7
scenario-8
scenario-9