Class: AdLint::Postfilter::AnalysisCommand
- Inherits:
-
Object
- Object
- AdLint::Postfilter::AnalysisCommand
show all
- Defined in:
- lib/adlint/postfilter/command.rb
Class Method Summary
collapse
Instance Method Summary
collapse
Constructor Details
#initialize(command_line, config_fpath, src_vpath = nil) ⇒ AnalysisCommand
Returns a new instance of AnalysisCommand.
60
61
62
63
64
65
66
67
|
# File 'lib/adlint/postfilter/command.rb', line 60
def initialize(command_line, config_fpath, src_vpath = nil)
@command_line = command_line
@config_fpath = config_fpath
@src_vpath = src_vpath
@traits_fpath, @strip_num, @output_dpath, @src_fpaths =
parse_adlint_command_line(@command_line, @src_vpath)
end
|
Class Method Details
.for(command_line, config_fpath, src_vpath = nil) ⇒ Object
45
46
47
48
49
50
51
52
53
54
55
56
57
58
|
# File 'lib/adlint/postfilter/command.rb', line 45
def self.for(command_line, config_fpath, src_vpath = nil)
case name = command_line.split.first
when "adlint"
ADLINT.new(command_line, config_fpath, src_vpath)
when "adlint_sma"
ADLINT_SMA.new(command_line, config_fpath, src_vpath)
when "adlint_cma"
ADLINT_CMA.new(command_line, config_fpath, src_vpath)
when "adlint_chk"
ADLINT_CHK.new(command_line, config_fpath, src_vpath)
else
raise "unknown command `#{name}'"
end
end
|
Instance Method Details
#execute ⇒ Object
69
70
71
72
73
|
# File 'lib/adlint/postfilter/command.rb', line 69
def execute
status, stderr_content = exec_adlint_command(@command_line)
filter_results(create_filters, stderr_content)
status
end
|