Class: Pod::Specification::Linter
- Inherits:
- 
      Object
      
        - Object
- Pod::Specification::Linter
 
- Defined in:
- lib/swordfish/native/linter.rb
Instance Method Summary collapse
- 
  
    
      #validate_root_name  ⇒ void 
    
    
  
  
  
  
  
  
  
  
  
    Checks that the spec’s root name matches the filename. 
Instance Method Details
#validate_root_name ⇒ void
This method returns an undefined value.
Checks that the spec’s root name matches the filename.
| 13 14 15 16 17 18 19 20 21 22 | # File 'lib/swordfish/native/linter.rb', line 13 def validate_root_name if spec.root.name && file acceptable_names = Specification::VALID_EXTNAME.map { |extname| "#{spec.root.name}#{extname}" } names_match = acceptable_names.include?(file.basename.to_s) unless names_match results.add_error('name', 'The name of the spec should match the ' \ 'name of the file.') end end end |