Commit 91820040 authored by Samuel E. Giddins's avatar Samuel E. Giddins Committed by Marius Rackwitz

[RuboCop] Refactor validator checking of file patterns

parent 9787122b
...@@ -399,13 +399,8 @@ module Pod ...@@ -399,13 +399,8 @@ module Pod
end end
if consumer.spec.root? if consumer.spec.root?
unless file_accessor.license || spec.license && (spec.license[:type] == 'Public Domain' || spec.license[:text]) _validate_license
warning('license', 'Unable to find a license file') _validate_module_map
end
if spec.module_map && !file_accessor.module_map.exist?
error('module_map', "Unable to find the specified module map file.")
end
end end
end end
...@@ -417,6 +412,18 @@ module Pod ...@@ -417,6 +412,18 @@ module Pod
_validate_header_files(:public_header_files) _validate_header_files(:public_header_files)
end end
def _validate_license
unless file_accessor.license || spec.license && (spec.license[:type] == 'Public Domain' || spec.license[:text])
warning('license', 'Unable to find a license file')
end
end
def _validate_module_map
if spec.module_map && !file_accessor.module_map.exist?
error('module_map', 'Unable to find the specified module map file.')
end
end
# Ensures that a list of header files only contains header files. # Ensures that a list of header files only contains header files.
# #
def _validate_header_files(attr_name) def _validate_header_files(attr_name)
......
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