style: Edited naming.
@@ -14,7 +14,7 @@ import com.synopsys.integration.detectable.detectable.codelocation.CodeLocation;
import com.synopsys.integration.detectable.extraction.Extraction;
public class CarthageExtractor {
- private static String GITHUB_SOURCE_ID = "github";
+ private static String GITHUB_ORIGIN_ID = "github";
private ExternalIdFactory externalIdFactory = new ExternalIdFactory();
@@ -26,14 +26,14 @@ public class CarthageExtractor {
while ((dependencyDeclaration = reader.readLine()) != null) {
// Each line in a Cartfile.resolved file is a dependency declaration: <origin> <name/resource> <version>
// eg. github "realm/realm-cocoa" "v10.7.2"
- String[] pieces = dependencyDeclaration.split("\\s+");
- String origin = pieces[0];
+ String[] dependencyDeclarationPieces = dependencyDeclaration.split("\\s+");
+ String origin = dependencyDeclarationPieces[0];
// Carthage supports declarations of dependencies via github org/repo, a URL, or a local path
// As of now, Detect only supports dependencies with github origins
// The KB does not have mappings for binaries, or resources that are not open source. It has some mappings, though, for GitHub repos
- if (origin.equals(GITHUB_SOURCE_ID)) {
- String name = pieces[1].replace("\"", "");
- String version = pieces[2].replace("\"", "");
+ if (origin.equals(GITHUB_ORIGIN_ID)) {
+ String name = dependencyDeclarationPieces[1].replace("\"", "");
+ String version = dependencyDeclarationPieces[2].replace("\"", "");
ExternalId externalId = externalIdFactory.createNameVersionExternalId(Forge.GITHUB, name, version);
// As of Carthage 0.38.0 the dependencies in Cartfile.resolved are produced as a flat list
