Class: JRuby::Lint::Checkers::Timeout

Inherits:
Object
  • Object
show all
Includes:
JRuby::Lint::Checker
Defined in:
lib/jruby/lint/checkers/timeout.rb

Instance Attribute Summary

Attributes included from JRuby::Lint::Checker

#collector

Instance Method Summary collapse

Methods included from JRuby::Lint::Checker

included, loaded_checkers

Instance Method Details

#add_finding(collector, node) ⇒ Object



15
16
17
18
# File 'lib/jruby/lint/checkers/timeout.rb', line 15

def add_finding(collector, node)
  collector.findings << Finding.new("Timeout in JRuby does not work in many cases",
                                    [:timeout, :warning], node.position)
end

#visitCallNode(node) ⇒ Object



6
7
8
9
10
11
12
13
# File 'lib/jruby/lint/checkers/timeout.rb', line 6

def visitCallNode(node)
  if node.name == "timeout"
    begin
      add_finding(collector, node)
    rescue
    end
  end
end