mirror of
https://github.com/anchore/syft.git
synced 2026-11-03 07:56:36 +01:00
feat: Add R cataloger (#1790)
Add a cataloger that detects installed R packages by looking for DESCRIPTION files. The base R package is now picked up in coverageImage tests in test/cli/packages_cmd_test.go, so increment expected package counts for the tests that use that image. Signed-off-by: Will Murphy <will.murphy@anchore.com>
This commit is contained in:
@@ -23,6 +23,7 @@ const (
|
||||
JavaScript Language = "javascript"
|
||||
PHP Language = "php"
|
||||
Python Language = "python"
|
||||
R Language = "R"
|
||||
Ruby Language = "ruby"
|
||||
Rust Language = "rust"
|
||||
Swift Language = "swift"
|
||||
@@ -41,6 +42,7 @@ var AllLanguages = []Language{
|
||||
JavaScript,
|
||||
PHP,
|
||||
Python,
|
||||
R,
|
||||
Ruby,
|
||||
Rust,
|
||||
Swift,
|
||||
@@ -91,6 +93,8 @@ func LanguageByName(name string) Language {
|
||||
// answer: no. We want this to definitively answer "which language does this package represent?"
|
||||
// which might not be possible in all cases. See for more context: https://github.com/package-url/purl-spec/pull/178
|
||||
return UnknownLanguage
|
||||
case packageurl.TypeCran, "r":
|
||||
return R
|
||||
default:
|
||||
return UnknownLanguage
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user