Class: Dependabot::GoModules::FileParser

Inherits:
FileParsers::Base
  • Object
show all
Defined in:
lib/dependabot/go_modules/file_parser.rb

Constant Summary collapse

GIT_VERSION_REGEX =
/^v\d+\.\d+\.\d+-.*-(?<sha>[0-9a-f]{12})$/.freeze

Instance Method Summary collapse

Instance Method Details

#parseObject


17
18
19
20
21
22
23
24
25
# File 'lib/dependabot/go_modules/file_parser.rb', line 17

def parse
  dependency_set = Dependabot::FileParsers::Base::DependencySet.new

  required_packages.each do |dep|
    dependency_set << dependency_from_details(dep) unless skip_dependency?(dep)
  end

  dependency_set.dependencies
end