Class: AzurePipelinesFormatter
- Inherits:
-
XCPretty::Simple
- Object
- XCPretty::Simple
- AzurePipelinesFormatter
- Defined in:
- lib/azure_pipelines_formatter.rb
Instance Method Summary collapse
-
#format_compile_error(file_name, file_path, reason, line, cursor) ⇒ Object
Errors and warnings.
- #format_compile_warning(file_name, file_path, reason, line, cursor) ⇒ Object
- #format_duplicate_symbols(message, file_paths) ⇒ Object
- #format_error(message) ⇒ Object
- #format_file_missing_error(error, file_path) ⇒ Object
- #format_ld_warning(message) ⇒ Object
- #format_undefined_symbols(message, symbol, reference) ⇒ Object
- #format_warning(message) ⇒ Object
- #logIssue(type, path, message) ⇒ Object
Instance Method Details
#format_compile_error(file_name, file_path, reason, line, cursor) ⇒ Object
Errors and warnings.
22 |
# File 'lib/azure_pipelines_formatter.rb', line 22 def format_compile_error(file_name, file_path, reason, line, cursor); logIssue("error", file_path, reason); super; end |
#format_compile_warning(file_name, file_path, reason, line, cursor) ⇒ Object
29 |
# File 'lib/azure_pipelines_formatter.rb', line 29 def format_compile_warning(file_name, file_path, reason, line, cursor); logIssue("warning", file_path, reason); super; end |
#format_duplicate_symbols(message, file_paths) ⇒ Object
27 |
# File 'lib/azure_pipelines_formatter.rb', line 27 def format_duplicate_symbols(, file_paths); super; end |
#format_error(message) ⇒ Object
23 |
# File 'lib/azure_pipelines_formatter.rb', line 23 def format_error(); logIssue("error", nil, ); super; end |
#format_file_missing_error(error, file_path) ⇒ Object
24 |
# File 'lib/azure_pipelines_formatter.rb', line 24 def format_file_missing_error(error, file_path); super; end |
#format_ld_warning(message) ⇒ Object
25 |
# File 'lib/azure_pipelines_formatter.rb', line 25 def format_ld_warning(); logIssue("warning", nil, ); super; end |
#format_undefined_symbols(message, symbol, reference) ⇒ Object
26 |
# File 'lib/azure_pipelines_formatter.rb', line 26 def format_undefined_symbols(, symbol, reference); super; end |
#format_warning(message) ⇒ Object
28 |
# File 'lib/azure_pipelines_formatter.rb', line 28 def format_warning(); logIssue("warning", nil, ); super; end |
#logIssue(type, path, message) ⇒ Object
4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 |
# File 'lib/azure_pipelines_formatter.rb', line 4 def logIssue(type, path, ) if path == nil .sub!("error: ", "") STDOUT.puts "##vso[task.logissue type=#{type}]#{message}" return end matches = path.match(/^(.+):([0-9]+):([0-9]+)+$/) if matches == nil STDOUT.puts "##vso[task.logissue type=#{type};sourcepath=#{path}]#{message}" else sourcepath = matches[1] line = matches[2] column = matches[3] STDOUT.puts "##vso[task.logissue type=#{type};sourcepath=#{sourcepath};linenumber=#{line};columnnumber=#{column};]#{message}" end end |