Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(osv-linter): add stubs for all current defined ecosystems #315

Merged
merged 1 commit into from
Nov 27, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 16 additions & 4 deletions tools/osv-linter/internal/pkgchecker/ecosystems.go
Original file line number Diff line number Diff line change
Expand Up @@ -27,10 +27,10 @@ var SupportedEcosystems = []string{
// Dispatcher for ecosystem-specific package existence checking.
func ExistsInEcosystem(pkg string, ecosystem string) bool {
switch ecosystem {
case "Alpine":
return true
case "AlmaLinux":
return true
case "Alpine":
return true
case "Android":
return true
case "Bitnami":
Expand Down Expand Up @@ -63,6 +63,8 @@ func ExistsInEcosystem(pkg string, ecosystem string) bool {
return true
case "NuGet":
return true
case "openSUSE":
return true
case "OSS-Fuzz":
return true
case "Packagist":
Expand All @@ -71,10 +73,14 @@ func ExistsInEcosystem(pkg string, ecosystem string) bool {
return true
case "PyPI":
return existsInPyPI(pkg)
case "Red Hat":
return true
case "Rocky Linux":
return true
case "RubyGems":
return true
case "SUSE":
return true
case "SwiftURL":
return true
case "Ubuntu":
Expand Down Expand Up @@ -102,10 +108,10 @@ func (e *MissingVersionsError) Error() string {
// Dispatcher for ecosystem-specific package version existence checking.
func VersionsExistInEcosystem(pkg string, versions []string, ecosystem string) error {
switch ecosystem {
case "Alpine":
return nil
case "AlmaLinux":
return nil
case "Alpine":
return nil
case "Android":
return nil
case "Bitnami":
Expand Down Expand Up @@ -138,6 +144,8 @@ func VersionsExistInEcosystem(pkg string, versions []string, ecosystem string) e
return nil
case "NuGet":
return nil
case "openSUSE":
return nil
case "OSS-Fuzz":
return nil
case "Packagist":
Expand All @@ -146,10 +154,14 @@ func VersionsExistInEcosystem(pkg string, versions []string, ecosystem string) e
return nil
case "PyPI":
return versionsExistInPyPI(pkg, versions)
case "Red Hat":
return nil
case "Rocky Linux":
return nil
case "RubyGems":
return nil
case "SUSE":
return nil
case "SwiftURL":
return nil
case "Ubuntu":
Expand Down
Loading