Sha256: 61593f77259da95250d9ef8bd2c6b38dbe00dd5dd4177d18135d3dd8cc398a9e
Contents?: true
Size: 969 Bytes
Versions: 116
Compression:
Stored size: 969 Bytes
Contents
# frozen_string_literal: true module RuboCop module Lsp # Severity for Language Server Protocol of RuboCop. # @api private class Severity SEVERITIES = { fatal: LanguageServer::Protocol::Constant::DiagnosticSeverity::ERROR, error: LanguageServer::Protocol::Constant::DiagnosticSeverity::ERROR, warning: LanguageServer::Protocol::Constant::DiagnosticSeverity::WARNING, convention: LanguageServer::Protocol::Constant::DiagnosticSeverity::INFORMATION, refactor: LanguageServer::Protocol::Constant::DiagnosticSeverity::HINT, info: LanguageServer::Protocol::Constant::DiagnosticSeverity::HINT }.freeze def self.find_by(rubocop_severity) if (severity = SEVERITIES[rubocop_severity.to_sym]) return severity end Logger.log("Unknown severity: #{rubocop_severity}") LanguageServer::Protocol::Constant::DiagnosticSeverity::HINT end end end end
Version data entries
116 entries across 116 versions & 9 rubygems