<commit_before>'use strict';

var util = require('util');

module.exports = {
    name: 'spaceAfterPropertyValue',
    nodeTypes: ['decl'],
    message: 'Semicolon after property value should%s be preceded by %s space.',

    lint: function spaceAfterPropertyValueLinter (config, node) {
        var results = [];
        var self = this;

        switch (config.style) {
            case 'no_space':
                if (node.raws.value && /.*\s$/.test(node.raws.value.raw)) {
                    results.push({
                        column: node.source.end.column - 1,
                        line: node.source.end.line,
                        message: util.format(self.message, ' not', 'any')
                    });
                }

                break;
            case 'one_space':
                if (!node.raws.value) {
                    results.push({
                        column: node.source.end.column,
                        line: node.source.end.line,
                        message: util.format(self.message, '', 'one')
                    });
                }

                break;
            default:
                throw new Error('Invalid setting value for spaceAfterPropertyValue: ' + config.style);
        }

        if (results.length) {
            return results;
        }
    }
};<commit_msg>Fixed column reporting in spaceAfterPropertyValue<commit_after>'use strict';

var util = require('util');

module.exports = {
    name: 'spaceAfterPropertyValue',
    nodeTypes: ['decl'],
    message: 'Semicolon after property value should%s be preceded by %s space.',

    lint: function spaceAfterPropertyValueLinter (config, node) {
        var results = [];
        var self = this;

        switch (config.style) {
            case 'no_space':
                if (node.raws.value && /.*\s$/.test(node.raws.value.raw)) {
                    results.push({
                        column: node.source.start.column + node.prop.length + node.raws.between.length + node.value.length,
                        line: node.source.end.line,
                        message: util.format(self.message, ' not', 'any')
                    });
                }

                break;
            case 'one_space':
                if (!node.raws.value) {
                    results.push({
                        column: node.source.start.column + node.prop.length + node.raws.between.length + node.value.length,
                        line: node.source.end.line,
                        message: util.format(self.message, '', 'one')
                    });
                }

                break;
            default:
                throw new Error('Invalid setting value for spaceAfterPropertyValue: ' + config.style);
        }

        if (results.length) {
            return results;
        }
    }
};
{'fraction_non_alphanumeric': 0.11654929577464788, 'fraction_numerical': 0.00035211267605633805, 'mean_word_length': 1.3363486842105263, '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': '3387842', 'n_tokens_mistral': 753, 'n_tokens_neox': 705, 'n_words': 159}