diff --git a/analyzer/src/funTest/assets/projects/synthetic/conan-expected-output-py.yml b/analyzer/src/funTest/assets/projects/synthetic/conan-expected-output-py.yml index 7f89d41172fdb..9b64dca50d140 100644 --- a/analyzer/src/funTest/assets/projects/synthetic/conan-expected-output-py.yml +++ b/analyzer/src/funTest/assets/projects/synthetic/conan-expected-output-py.yml @@ -50,12 +50,12 @@ packages: algorithm: "" vcs: type: "Git" - url: "https://github.com/conan-io/conan-center-index" + url: "https://github.com/openssl/openssl.git" revision: "" path: "" vcs_processed: type: "Git" - url: "https://github.com/conan-io/conan-center-index.git" + url: "https://github.com/openssl/openssl.git" revision: "" path: "" - id: "Conan::zlib:1.2.11" @@ -78,12 +78,12 @@ packages: value: "" algorithm: "" vcs: - type: "Git" - url: "https://github.com/conan-io/conan-center-index" + type: "" + url: "" revision: "" path: "" vcs_processed: - type: "Git" - url: "https://github.com/conan-io/conan-center-index.git" + type: "" + url: "" revision: "" path: "" diff --git a/analyzer/src/funTest/assets/projects/synthetic/conan-expected-output-txt.yml b/analyzer/src/funTest/assets/projects/synthetic/conan-expected-output-txt.yml index 8e57464dc902d..81fe940fd80bb 100644 --- a/analyzer/src/funTest/assets/projects/synthetic/conan-expected-output-txt.yml +++ b/analyzer/src/funTest/assets/projects/synthetic/conan-expected-output-txt.yml @@ -50,13 +50,13 @@ packages: value: "" algorithm: "" vcs: - type: "Git" - url: "https://github.com/conan-io/conan-center-index" + type: "" + url: "" revision: "" path: "" vcs_processed: - type: "Git" - url: "https://github.com/conan-io/conan-center-index.git" + type: "" + url: "" revision: "" path: "" - id: "Conan::libiconv:1.16" @@ -80,13 +80,13 @@ packages: value: "" algorithm: "" vcs: - type: "Git" - url: "https://github.com/conan-io/conan-center-index" + type: "" + url: "" revision: "" path: "" vcs_processed: - type: "Git" - url: "https://github.com/conan-io/conan-center-index.git" + type: "" + url: "" revision: "" path: "" - id: "Conan::libxml2:2.9.12" @@ -108,13 +108,13 @@ packages: value: "" algorithm: "" vcs: - type: "Git" - url: "https://github.com/conan-io/conan-center-index" + type: "" + url: "" revision: "" path: "" vcs_processed: - type: "Git" - url: "https://github.com/conan-io/conan-center-index.git" + type: "" + url: "" revision: "" path: "" - id: "Conan::libxslt:1.1.34" @@ -137,13 +137,13 @@ packages: value: "" algorithm: "" vcs: - type: "Git" - url: "https://github.com/conan-io/conan-center-index" + type: "" + url: "" revision: "" path: "" vcs_processed: - type: "Git" - url: "https://github.com/conan-io/conan-center-index.git" + type: "" + url: "" revision: "" path: "" - id: "Conan::openssl:1.1.1l" @@ -167,12 +167,12 @@ packages: algorithm: "" vcs: type: "Git" - url: "https://github.com/conan-io/conan-center-index" + url: "https://github.com/openssl/openssl.git" revision: "" path: "" vcs_processed: type: "Git" - url: "https://github.com/conan-io/conan-center-index.git" + url: "https://github.com/openssl/openssl.git" revision: "" path: "" - id: "Conan::zlib:1.2.11" @@ -195,12 +195,12 @@ packages: value: "" algorithm: "" vcs: - type: "Git" - url: "https://github.com/conan-io/conan-center-index" + type: "" + url: "" revision: "" path: "" vcs_processed: - type: "Git" - url: "https://github.com/conan-io/conan-center-index.git" + type: "" + url: "" revision: "" path: "" diff --git a/analyzer/src/main/kotlin/managers/Conan.kt b/analyzer/src/main/kotlin/managers/Conan.kt index 869e1df2e1b5b..b5191ff94529a 100644 --- a/analyzer/src/main/kotlin/managers/Conan.kt +++ b/analyzer/src/main/kotlin/managers/Conan.kt @@ -263,17 +263,20 @@ class Conan( /** * Return the [Package] parsed from the given [node]. */ - private fun parsePackage(node: JsonNode, workingDir: File) = - Package( + private fun parsePackage(node: JsonNode, workingDir: File): Package { + val homepageUrl = node["homepage"].textValueOrEmpty() + + return Package( id = parsePackageId(node, workingDir), authors = parseAuthors(node), declaredLicenses = parseDeclaredLicenses(node), description = parsePackageField(node, workingDir, "description"), - homepageUrl = node["homepage"].textValueOrEmpty(), + homepageUrl = homepageUrl, binaryArtifact = RemoteArtifact.EMPTY, // TODO: implement me! sourceArtifact = RemoteArtifact.EMPTY, // TODO: implement me! - vcs = parseVcsInfo(node) + vcs = processPackageVcs(VcsInfo.EMPTY, homepageUrl) ) + } /** * Return the value `conan inspect` reports for the given [field].