Method: Pod::Source::HealthReporter#lint_spec

Defined in:
lib/cocoapods-core/source/health_reporter.rb

#lint_spec(name, version, spec_path) ⇒ Specification, Nil (private)

Checks the validity of the specification with the linter.

Parameters:

  • name (String)

    The name of the Pod.

  • version (Version)

    The version of the specification.

  • spec_path (Pathname)

    The path of the specification to check.

Returns:

  • (Specification)

    The specification loaded by the linter.

  • (Nil)

    If the specifications raised during evaluation.



86
87
88
89
90
91
92
93
94
# File 'lib/cocoapods-core/source/health_reporter.rb', line 86

def lint_spec(name, version, spec_path)
  linter = Specification::Linter.new(spec_path)
  linter.lint
  linter.results.each do |result|
    next if result.public_only?
    report.add_message(result.type, result.message, name, version)
  end
  linter.spec
end