function getErrorsByRuleName(errorsList) {
    var errors = {};

    errorsList.forEach(function(error) {
        var rulename = error.rule;
        errors[rulename] = errors[rulename] || {
            files: {},
            violations: 0
        };
        errors[rulename].violations += 1;
        errors[rulename].files[error.filename] = true;
    });

    return errors;
}
@private
@param  {Object[]} errorsList
@return {Object}