Class: Pod::Specification::Linter
- Inherits:
-
Object
- Object
- Pod::Specification::Linter
- Defined in:
- lib/cocoapods-bb-bin/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.
14 15 16 17 18 19 20 21 22 23 |
# File 'lib/cocoapods-bb-bin/native/linter.rb', line 14 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 |