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

/*
 * Copyright 2013-2015, All Rights Reserved.
 *
 * Code licensed under the BSD License:
 * https://github.com/node-gh/gh/blob/master/LICENSE.md
 *
 * @author <NAME> <<EMAIL>>
 */

'use strict';

var path = require('path'),
    fs = require('fs'),
    logger = require('../lib/logger'),
    pkg = require('../package.json'),
    semver = require('semver'),
    tracker = require('../lib/tracker'),
    configs = require('../lib/configs');

// Check node version
if (!isCompatibleNodeVersion()) {
    logger.error('Please update your NodeJS version: http://nodejs.org/download');
}

if (!fs.existsSync(configs.getUserHomePath())) {
    configs.createGlobalConfig();
}

// If configs.PLUGINS_PATH_KEY is undefined, try to cache it before proceeding.
if (configs.getConfig()[configs.PLUGINS_PATH_KEY] === undefined) {
    configs.getNodeModulesGlobalPath();
}

// -- Env ------------------------------------------------------------------------------------------
try {
    process.env.GH_PATH = path.join(__dirname, '../');

    require('../lib/cmd.js').run();
} catch (e) {
    tracker.track('error');
    throw e;
}

function isCompatibleNodeVersion() {
    return semver.satisfies(process.version, pkg.engines.node);
}<commit_msg>Fix linting issue. Source formatting.<commit_after>#!/usr/bin/env node

/*
 * Copyright 2013-2015, All Rights Reserved.
 *
 * Code licensed under the BSD License:
 * https://github.com/node-gh/gh/blob/master/LICENSE.md
 *
 * @author <NAME> <<EMAIL>>
 */

'use strict';

var path = require('path'),
    fs = require('fs'),
    logger = require('../lib/logger'),
    pkg = require('../package.json'),
    semver = require('semver'),
    tracker = require('../lib/tracker'),
    configs = require('../lib/configs');

// Check node version
function isCompatibleNodeVersion() {
    return semver.satisfies(process.version, pkg.engines.node);
}

if (!isCompatibleNodeVersion()) {
    logger.error('Please update your NodeJS version: http://nodejs.org/download');
}

if (!fs.existsSync(configs.getUserHomePath())) {
    configs.createGlobalConfig();
}

// If configs.PLUGINS_PATH_KEY is undefined, try to cache it before proceeding.
if (configs.getConfig()[configs.PLUGINS_PATH_KEY] === undefined) {
    configs.getNodeModulesGlobalPath();
}

// -- Env ------------------------------------------------------------------------------------------
try {
    process.env.GH_PATH = path.join(__dirname, '../');

    require('../lib/cmd.js').run();
} catch (e) {
    tracker.track('error');
    throw e;
}
{'fraction_non_alphanumeric': 0.23846755277560594, 'fraction_numerical': 0.006254886630179828, 'mean_word_length': 2.6820143884892085, 'pattern_counts': {'":': 0, '<': 9, '<?xml version=': 0, '>': 9, 'https://': 2, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 2, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5054879', 'n_tokens_mistral': 801, 'n_tokens_neox': 776, 'n_words': 158}