Class: AzureFormatter
- Inherits:
-
XCPretty::Simple
- Object
- XCPretty::Simple
- AzureFormatter
- Defined in:
- lib/xcpretty_azure_formatter.rb
Overview
xcpretty formatter for Azure Pipelines
Instance Method Summary collapse
- #_log_issue(type, message, file) ⇒ Object
- #format_compile_error(_file, file_path, reason, _line, _cursor) ⇒ Object
- #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(reason, file_path) ⇒ Object
- #format_ld_warning(message) ⇒ Object
- #format_undefined_symbols(message, _symbol, _reference) ⇒ Object
- #format_warning(message) ⇒ Object
Instance Method Details
#_log_issue(type, message, file) ⇒ Object
37 38 39 40 41 42 43 44 45 46 47 |
# File 'lib/xcpretty_azure_formatter.rb', line 37 def _log_issue(type, , file) log_params = "type=#{type}" unless file.nil? file_parts = file.split(":") log_params += ";sourcepath=#{file_parts[0]}" log_params += ";linenumber=#{file_parts[1]}" if file_parts.length >= 2 log_params += ";columnnumber=#{file_parts[2]}" if file_parts.length >= 3 log_params += ";" end "##vso[task.logissue #{log_params}]#{}" end |
#format_compile_error(_file, file_path, reason, _line, _cursor) ⇒ Object
21 22 23 |
# File 'lib/xcpretty_azure_formatter.rb', line 21 def format_compile_error(_file, file_path, reason, _line, _cursor) _log_issue("error", reason, file_path) end |
#format_compile_warning(_file_name, file_path, reason, _line, _cursor) ⇒ Object
13 14 15 |
# File 'lib/xcpretty_azure_formatter.rb', line 13 def format_compile_warning(_file_name, file_path, reason, _line, _cursor) _log_issue("warning", reason, file_path) end |
#format_duplicate_symbols(message, _file_paths) ⇒ Object
33 34 35 |
# File 'lib/xcpretty_azure_formatter.rb', line 33 def format_duplicate_symbols(, _file_paths) _log_issue("error", , nil) end |
#format_error(message) ⇒ Object
17 18 19 |
# File 'lib/xcpretty_azure_formatter.rb', line 17 def format_error() _log_issue("error", , nil) end |
#format_file_missing_error(reason, file_path) ⇒ Object
25 26 27 |
# File 'lib/xcpretty_azure_formatter.rb', line 25 def format_file_missing_error(reason, file_path) _log_issue("error", reason, file_path) end |
#format_ld_warning(message) ⇒ Object
5 6 7 |
# File 'lib/xcpretty_azure_formatter.rb', line 5 def format_ld_warning() _log_issue("warning", , nil) end |
#format_undefined_symbols(message, _symbol, _reference) ⇒ Object
29 30 31 |
# File 'lib/xcpretty_azure_formatter.rb', line 29 def format_undefined_symbols(, _symbol, _reference) _log_issue("error", , nil) end |
#format_warning(message) ⇒ Object
9 10 11 |
# File 'lib/xcpretty_azure_formatter.rb', line 9 def format_warning() _log_issue("warning", , nil) end |