Skip to content
Merged
Show file tree
Hide file tree
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
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ public class GoModFileParser {
private static final Pattern MODULE_PATTERN = Pattern.compile("^module\\s+(.+)$");
private static final Pattern GO_VERSION_PATTERN = Pattern.compile("^go\\s+(.+)$");
private static final Pattern TOOLCHAIN_PATTERN = Pattern.compile("^toolchain\\s+(.+)$");
private static final Pattern DEPENDENCY_PATTERN = Pattern.compile("^\\s*([^\\s]+)\\s+([^\\s]+(?:-[^\\s]+)*)(?:\\s+//\\s*(.+))?$");
private static final Pattern DEPENDENCY_PATTERN = Pattern.compile("^\\s*([^\\s]+)\\s+([^\\s]+)(?:\\s+//\\s*(.+))?$");
private static final Pattern REPLACE_PATTERN = Pattern.compile("^\\s*([^\\s]+)(?:\\s+([^\\s]+))?\\s+=>");
private static final Pattern COMMENT_PATTERN = Pattern.compile("^\\s*//.*$");
private static final Pattern EMPTY_LINE_PATTERN = Pattern.compile("^\\s*$");
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
package com.blackduck.integration.detectable.detectables.go.gomodfile.parse.model;

import java.util.List;
import java.util.Objects;

import com.blackduck.integration.bdio.model.dependency.Dependency;

Expand Down Expand Up @@ -45,6 +46,11 @@ public boolean equals(Object o) {

return dependency != null ? dependency.equals(that.dependency) : that.dependency == null;
}

@Override
public int hashCode() {
return Objects.hash(dependency, children, isRootNode);
}

/**
* Utility method to get the total count of all dependencies in the graph (including transitive).
Expand Down