Files

Class/Module Index [+]

Quicksearch

RuboCop::Cop::Lint::Syntax

This is actually not a cop and inspects nothing. It just provides methods to repack Parser's diagnostics into RuboCop's offenses.

Constants

COP_NAME

Public Class Methods

offense_from_diagnostic(diagnostic) click to toggle source
# File lib/rubocop/cop/lint/syntax.rb, line 16
def self.offense_from_diagnostic(diagnostic)
  Offense.new(
    diagnostic.level,
    diagnostic.location,
    diagnostic.message,
    COP_NAME
  )
end
offenses_from_diagnostics(diagnostics) click to toggle source
# File lib/rubocop/cop/lint/syntax.rb, line 10
def self.offenses_from_diagnostics(diagnostics)
  diagnostics.map do |diagnostic|
    offense_from_diagnostic(diagnostic)
  end
end

[Validate]

Generated with the Darkfish Rdoc Generator 2.