Class: RuboCop::LSP::Severity Private
- Inherits:
-
Object
- Object
- RuboCop::LSP::Severity
- Defined in:
- lib/rubocop/lsp/severity.rb
Overview
This class is part of a private API. You should avoid using this class if possible, as it may be removed or be changed in the future.
Severity for Language Server Protocol of RuboCop.
Constant Summary collapse
- SEVERITIES =
This constant is part of a private API. You should avoid using this constant if possible, as it may be removed or be changed in the future.
{ 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
Class Method Summary collapse
Class Method Details
.find_by(rubocop_severity) ⇒ Object
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
17 18 19 20 21 22 23 24 |
# File 'lib/rubocop/lsp/severity.rb', line 17 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 |