<commit_before>#!/bin/bash

PATH_TO_COMPILER=node_modules/google-closure-compiler/compiler.jar
PATH_TO_EXTERNS_CHROME=node_modules/google-closure-compiler/contrib/externs/chrome_extensions.js

java -jar $PATH_TO_COMPILER \
  --checks-only --language_in=ECMASCRIPT5  --warning_level=VERBOSE \
  --externs=externs_js/polymer.js --externs=$PATH_TO_EXTERNS_CHROME \
  --externs=externs_js/chrome.js \
  js/unpacker.js js/*.js<commit_msg>check_js_for_errors: find the closure-compiler automatically<commit_after>#!/bin/bash

NPM_ROOT=$(npm root)
CLOSURE_DIR="${NPM_ROOT}/google-closure-compiler"
PATH_TO_COMPILER="${CLOSURE_DIR}/compiler.jar"
PATH_TO_EXTERNS_CHROME="${CLOSURE_DIR}/contrib/externs/chrome_extensions.js"

java -jar $PATH_TO_COMPILER \
  --checks-only --language_in=ECMASCRIPT5  --warning_level=VERBOSE \
  --externs=externs_js/polymer.js --externs=$PATH_TO_EXTERNS_CHROME \
  --externs=externs_js/chrome.js \
  js/unpacker.js js/*.js
{'fraction_non_alphanumeric': 0.13665254237288135, 'fraction_numerical': 0.00211864406779661, 'mean_word_length': 5.654929577464789, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5914684', 'n_tokens_mistral': 392, 'n_tokens_neox': 368, 'n_words': 34}