Class: Pedant::CommandCheck
Class Method Summary
collapse
Methods inherited from Command
all, banner, find, inherited, initialize!, run
Class Method Details
.analyze(cfg, path, args) ⇒ Object
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
|
# File 'lib/pedant/commands/check.rb', line 33
def self.analyze(cfg, path, args)
Check.initialize!
pending = Check.all
kb = KnowledgeBase.new(:file_mode, path)
fatal = false
until pending.empty? || fatal
ready = pending.select { |cls| cls.ready?(kb) }
break if ready.empty?
ready.each do |cls|
chk = cls.new(kb)
pending.delete(cls)
chk.run
if chk.result == :fatal
fatal = true
break
end
puts chk.report(cfg[:verbose])
end
end
pending.each { |cls| puts cls.new(kb).report(cfg[:verbose]) }
end
|
.binding ⇒ Object
29
30
31
|
# File 'lib/pedant/commands/check.rb', line 29
def self.binding
'check'
end
|