CtrlK
BlogDocsLog inGet started
Tessl Logo

tessl/npm-uglify-save-license

License detector for UglifyJS that identifies and preserves license comments during minification

Overall
score

98%

Overview
Eval results
Files

rubric.jsonevals/scenario-10/

{
  "context": "This criteria evaluates how well the engineer uses uglify-save-license's multi-criteria decision logic approach. The focus is on correctly implementing the OR-based decision tree with pattern matching, comment type detection, line-based logic, and stateful processing.",
  "type": "weighted_checklist",
  "checklist": [
    {
      "name": "License pattern matching",
      "description": "Uses regular expression or pattern matching to detect license-related keywords (@preserve, @cc_on, MIT, MPL, GPL, BSD, ISCL, (c), License, Copyright) in comment content, with case-insensitive matching",
      "max_score": 25
    },
    {
      "name": "Bang comment detection",
      "description": "Correctly identifies and preserves block comments (comment2) that start with '!' character by checking the first character of the comment value",
      "max_score": 15
    },
    {
      "name": "First-line preservation",
      "description": "Automatically preserves any comment appearing on line 1 of a file, regardless of content",
      "max_score": 15
    },
    {
      "name": "Consecutive comment tracking",
      "description": "Implements stateful logic to preserve comments that appear immediately after (on the next line number) a previously preserved comment in the same file",
      "max_score": 20
    },
    {
      "name": "Cross-file state management",
      "description": "Maintains state variables (previous line number and previous file path) at module level or closure scope, and correctly resets state when switching between different files",
      "max_score": 15
    },
    {
      "name": "OR-based decision logic",
      "description": "Implements the decision logic as an OR operation where meeting ANY of the four criteria results in preserving the comment (returns true if any condition is satisfied)",
      "max_score": 10
    }
  ]
}

Install with Tessl CLI

npx tessl i tessl/npm-uglify-save-license

tile.json