<commit_before>const self = {
    name: 'sotd.process-document'
};

exports.check = function (sr, done) {
    var BOILERPLATE_PREFIX = 'This document is governed by the '
    ,   BOILERPLATE_SUFFIX = ' W3C Process Document.'
    ;
    var $sotd = sr.getSotDSection()
    ,   proc = "1 September 2015"
    ,   procUri = "https://www.w3.org/2015/Process-20150901/";
    if ($sotd && $sotd.length) {
        var found = false
        ,   boilerplate = BOILERPLATE_PREFIX + proc + BOILERPLATE_SUFFIX
        ,   regex = new RegExp(BOILERPLATE_PREFIX + '.+' + BOILERPLATE_SUFFIX)
        ,   deprecatedBoilerplate = BOILERPLATE_PREFIX + '1 August 2014' + BOILERPLATE_SUFFIX
        ,   deprecatedUri = 'http://www.w3.org/2014/Process-20140801/'
        ;
        $sotd.parent().find("p").each(function () {
            var $p = sr.$(this);
            if (sr.norm($p.text()) === boilerplate && $p.find("a").attr("href") === procUri) {
                if (found) sr.error(self, "multiple-times", { process: proc });
                else {
                    found = true;
                }
            }
            else if (deprecatedBoilerplate === sr.norm($p.text()) || deprecatedUri === $p.find('a').attr('href')) {
                sr.error(self, 'deprecated');
            }
            else if (sr.norm($p.text()) !== boilerplate && regex.test($p.text())) {
                sr.error(self, "wrong-process", { process: proc });
            }
            else if (sr.norm($p.text()) === boilerplate && $p.find("a").attr("href") !== procUri) {
                sr.error(self, "wrong-link");
            }
        });
        if (!found) sr.error(self, "not-found", { process: proc });
    }
    done();
};<commit_msg>#565 : Use Process 2017 and accept 2015 for now<commit_after>const self = {
    name: 'sotd.process-document'
};

exports.check = function (sr, done) {
    var BOILERPLATE_PREFIX = 'This document is governed by the '
    ,   BOILERPLATE_SUFFIX = ' W3C Process Document.'
    ;
    var $sotd = sr.getSotDSection()
    ,   proc = "1 March 2017"
    ,   procUri = "https://www.w3.org/2017/Process-20170301/";
    if ($sotd && $sotd.length) {
        var found = false
        ,   boilerplate = BOILERPLATE_PREFIX + proc + BOILERPLATE_SUFFIX
        ,   regex = new RegExp(BOILERPLATE_PREFIX + '.+' + BOILERPLATE_SUFFIX)
        ,   deprecatedBoilerplate = BOILERPLATE_PREFIX + '1 September 2015' + BOILERPLATE_SUFFIX
        ,   deprecatedUri = 'https://www.w3.org/2015/Process-20150901/'
        ;
        $sotd.parent().find("p").each(function () {
            var $p = sr.$(this);
            if (sr.norm($p.text()) === boilerplate && $p.find("a").attr("href") === procUri) {
                if (found) sr.error(self, "multiple-times", { process: proc });
                else {
                    found = true;
                }
            }
            else if (deprecatedBoilerplate === sr.norm($p.text()) || deprecatedUri === $p.find('a').attr('href')) {
                // to be changed to err after 1 April 2017 and remove found = true
                sr.warning(self, 'deprecated');
                found = true;
            }
            else if (sr.norm($p.text()) !== boilerplate && regex.test($p.text())) {
                sr.error(self, "wrong-process", { process: proc });
            }
            else if (sr.norm($p.text()) === boilerplate && $p.find("a").attr("href") !== procUri) {
                sr.error(self, "wrong-link");
            }
        });
        if (!found) sr.error(self, "not-found", { process: proc });
    }
    done();
};
{'fraction_non_alphanumeric': 0.16755244755244755, 'fraction_numerical': 0.025174825174825177, 'mean_word_length': 1.9651741293532339, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 3, 'lorem ipsum': 0, 'www.': 4, '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': '4209064', 'n_tokens_mistral': 1263, 'n_tokens_neox': 1149, 'n_words': 225}