lib/cocoapods/validator.rb
# It checks that every file pattern specified in a spec yields
# at least one file. It requires the pods to be already present
# in the current working directory under Pods/spec.name.
#
# @return [void]
#
It checks that every file pattern specified in a spec yields
at least one file. It requires the pods to be already present
in the current working directory under Pods/spec.name.
It checks that every file pattern specified in a spec yields at least one file . It requires the pods to be already present in the current working directory under Pods / spec . name .
def check_file_patterns
      [:source_files, :resources, :preserve_paths].each do |attr_name|
        if !file_accessor.spec_consumer.send(attr_name).empty? && file_accessor.send(attr_name).empty?
          error "The `#{attr_name}` pattern did not match any file."
        end
      end
      unless file_accessor.license || spec.license && ( spec.license[:type] == 'Public Domain' || spec.license[:text] )
        warning "Unable to find a license file"
      end
    end
def check_file_patterns [ :source_files , :resources , :preserve_paths ] . each do | attr_name | if ! file_accessor . spec_consumer . send ( attr_name ) . empty? && file_accessor . send ( attr_name ) . empty? error "The `#{attr_name}` pattern did not match any file." end end unless file_accessor . license || spec . license && ( spec . license [ :type ] == 'Public Domain' || spec . license [ :text ] ) warning "Unable to find a license file" end end
It checks that every file pattern specified in a spec yields
at least one file.
It checks that every file pattern specified in a spec yields at least one file .
# file_attr = Specification::DSL.attributes.values.find{|attr| attr.name == attr_name }
None
void