Commit 449c64f5 authored by Fabio Pelosin's avatar Fabio Pelosin

[Linter] Improved detection of xcodebuild errors.

parent 63c5e456
...@@ -237,7 +237,7 @@ module Pod ...@@ -237,7 +237,7 @@ module Pod
install_pod install_pod
puts "Building with xcodebuild.\n".yellow if config.verbose? puts "Building with xcodebuild.\n".yellow if config.verbose?
# treat xcodebuild warnings as notes because the spec maintainer might not be the author of the library # treat xcodebuild warnings as notes because the spec maintainer might not be the author of the library
xcodebuild_output.each { |msg| ( msg.include?('error') ? @platform_errors[@platform] : @platform_notes[@platform] ) << msg } xcodebuild_output.each { |msg| ( msg.include?('error: ') ? @platform_errors[@platform] : @platform_notes[@platform] ) << msg }
@platform_errors[@platform] += file_patterns_errors @platform_errors[@platform] += file_patterns_errors
@platform_warnings[@platform] += file_patterns_warnings @platform_warnings[@platform] += file_patterns_warnings
tear_down_lint_environment tear_down_lint_environment
...@@ -399,9 +399,9 @@ module Pod ...@@ -399,9 +399,9 @@ module Pod
def process_xcode_build_output(output) def process_xcode_build_output(output)
output_by_line = output.split("\n") output_by_line = output.split("\n")
selected_lines = output_by_line.select do |l| selected_lines = output_by_line.select do |l|
l.include?('error:') && (l !~ /errors? generated\./) \ l.include?('error: ') && (l !~ /errors? generated\./) \
|| l.include?('warning:') && (l !~ /warnings? generated\./)\ || l.include?('warning: ') && (l !~ /warnings? generated\./)\
|| l.include?('note:') && (l !~ /expanded from macro/) || l.include?('note: ') && (l !~ /expanded from macro/)
end end
selected_lines.map do |l| selected_lines.map do |l|
new = l.gsub(/\/tmp\/CocoaPods\/Lint\/Pods\//,'') # Remove the unnecessary tmp path new = l.gsub(/\/tmp\/CocoaPods\/Lint\/Pods\//,'') # Remove the unnecessary tmp path
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment