<commit_before>"use strict";

require("colors");

let
    errors = 0;

/* Need source version because of https support */
global.gpfSourcesPath = "src/";
require("../src/boot.js");

const
    START = 0,
    CACHE_FILE = "tmp/doc.cache",
    AFTER_COMMAND = 2,
    HTTP_OK = 200,
    HTTP_MOVED_PERMANENTLY = 301,
    HTTP_FOUND = 302,
    gpfFs = gpf.fs.getFileStorage(),
    processed = {},
    cache = [],
    stack = [{
        method: "GET",
        url: process.argv[AFTER_COMMAND]
    }],
    verbose = process.argv.some(arg => arg === "-verbose"),
    log = verbose ? console.log.bind(console) : () => {},

    enqueue = ({url, method}) => {
        if (!processed.hasOwnProperty(url)) {
            stack.push({url, method});
        }
    },

    check = ({url, method}) => {
        if (processed.hasOwnProperty(url)) {
            return Promise.resolve();
        }
        return gpf.http[method.toLowerCase()](url).then(response => {<commit_msg>New ESLint rules<commit_after>"use strict";

require("colors");

let
    errors = 0;

/* Need source version because of https support */
global.gpfSourcesPath = "src/";
require("../src/boot.js");

const
    START = 0,
    CACHE_FILE = "tmp/doc.cache",
    AFTER_COMMAND = 2,
    HTTP_OK = 200,
    HTTP_MOVED_PERMANENTLY = 301,
    HTTP_FOUND = 302,
    gpfFs = gpf.fs.getFileStorage(),
    processed = {},
    cache = [],
    stack = [{
        method: "GET",
        url: process.argv[AFTER_COMMAND]
    }],
    verbose = process.argv.some(arg => arg === "-verbose"),
    log = verbose ? console.log.bind(console) : () => {},

    enqueue = ({url, method}) => {
        if (!Object.prototype.hasOwnProperty.call(processed, url)) {
            stack.push({url, method});
        }
    },

    check = ({url, method}) => {
        if (Object.prototype.hasOwnProperty.call(processed, url)) {
            return Promise.resolve();
        }
        return gpf.http[method.toLowerCase()](url).then(response => {
{'fraction_non_alphanumeric': 0.16980172852058972, 'fraction_numerical': 0.012201321809862735, 'mean_word_length': 2.4586994727592266, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 13, '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': '5237528', 'n_tokens_mistral': 665, 'n_tokens_neox': 634, 'n_words': 126}