<commit_before>#!/usr/bin/env node

var fs = require('fs');
var minimist = require('minimist2');
var esverify = require('../build/main/index.js');

function error(msg) {
  console.error(msg);
  process.exit(1);
}

function usage(err) {
  console.log('Usage: esverify [OPTIONS] FILE\n');
  console.log('Options:');
  console.log('  --z3path PATH           Path to local z3 executable');
  console.log('                          (default path is "z3")');
  console.log('  -r, --remote            Invokes z3 remotely via HTTP request');
  console.log('  --z3url URL             URL to remote z3 web server');
  console.log('  --noqi                  Disables quantifier instantiations');
  console.log('  -f, --logformat FORMAT  Format can be either "simple" or "colored"');
  console.log('                          (default format is "colored")');
  console.log('  -q, --quiet             Suppresses output');
  console.log('  -v, --verbose           Prints SMT input, output and test code');
  console.log('  --logsmt PATH           Path for logging SMT input in verbose mode');
  console.log('                          (default path is "/tmp/vc.smt")');
  console.log('  -h, --help              Prints this help text and exit');
  console.log('  --version               Prints version information');
  process.exit(err ? 1 : 0);
}

var opts = minimist(process.argv.slice(2), {
  boolean: ['noqi', 'remote', 'quiet', 'verbose', 'help', 'version'],
  string: ['logformat', 'z3path', 'z3url', 'logsmt'],
  default: { quiet: false },
  alias: {r: 'remote', f: 'logformat', q: 'quiet', v: 'verbose', h: 'help' },
  unknown: function(opt) { return opt[0] == '-' && opt != '-' ? usage(true) : true; }
});
if (opts.version) {
  console.log(require('../package.json').version);
  process.exit(0);
}
if (opts._.length != 1 || opts.help) usage(!opts.help);
opts.qi = !opts['noqi'];
opts.filename = opts._[0];

function run(err, js) {
  if (err) error('Error: ' + err.message);
  esverify.verify(js.toString(), opts)
    .then(msgs => msgs.some(msg => msg.status != 'verified') && error('failed'));<commit_msg>style(cli): consistent whitespace for function declarations<commit_after>#!/usr/bin/env node

var fs = require('fs');
var minimist = require('minimist2');
var esverify = require('../build/main/index.js');

function error (msg) {
  console.error(msg);
  process.exit(1);
}

function usage (err) {
  console.log('Usage: esverify [OPTIONS] FILE\n');
  console.log('Options:');
  console.log('  --z3path PATH           Path to local z3 executable');
  console.log('                          (default path is "z3")');
  console.log('  -r, --remote            Invokes z3 remotely via HTTP request');
  console.log('  --z3url URL             URL to remote z3 web server');
  console.log('  --noqi                  Disables quantifier instantiations');
  console.log('  -f, --logformat FORMAT  Format can be either "simple" or "colored"');
  console.log('                          (default format is "colored")');
  console.log('  -q, --quiet             Suppresses output');
  console.log('  -v, --verbose           Prints SMT input, output and test code');
  console.log('  --logsmt PATH           Path for logging SMT input in verbose mode');
  console.log('                          (default path is "/tmp/vc.smt")');
  console.log('  -h, --help              Prints this help text and exit');
  console.log('  --version               Prints version information');
  process.exit(err ? 1 : 0);
}

var opts = minimist(process.argv.slice(2), {
  boolean: ['noqi', 'remote', 'quiet', 'verbose', 'help', 'version'],
  string: ['logformat', 'z3path', 'z3url', 'logsmt'],
  default: { quiet: false },
  alias: {r: 'remote', f: 'logformat', q: 'quiet', v: 'verbose', h: 'help' },
  unknown: function(opt) { return opt[0] == '-' && opt != '-' ? usage(true) : true; }
});
if (opts.version) {
  console.log(require('../package.json').version);
  process.exit(0);
}
if (opts._.length != 1 || opts.help) usage(!opts.help);
opts.qi = !opts['noqi'];
opts.filename = opts._[0];

function run (err, js) {
  if (err) error('Error: ' + err.message);
  esverify.verify(js.toString(), opts)
    .then(msgs => msgs.some(msg => msg.status != 'verified') && error('failed'));
{'fraction_non_alphanumeric': 0.18492343934040048, 'fraction_numerical': 0.00800942285041225, 'mean_word_length': 2.7608503100088573, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 7, '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': '6764747', 'n_tokens_mistral': 1383, 'n_tokens_neox': 1347, 'n_words': 377}