Skip to content

Commit 2b6966f

Browse files
committed
chore: code clean up
Signed-off-by: Chao Wang <chaowan@redhat.com>
1 parent 2d593e2 commit 2b6966f

1 file changed

Lines changed: 1 addition & 3 deletions

File tree

src/main/java/com/redhat/exhort/providers/GoModulesProvider.java

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -194,16 +194,14 @@ private void performManifestVersionsCheck(String[] goModGraphLines, Path manifes
194194
}
195195

196196
private List<String> collectAllDepsFromManifest(String[] lines, String goModLines) {
197-
List<String> result;
198197
// collect all deps that starts with require keyword
199-
result =
198+
List<String> result =
200199
Arrays.stream(lines)
201200
.filter((line) -> line.trim().startsWith("require") && !line.contains("("))
202201
.map((dep) -> dep.substring("require".length()).trim())
203202
.collect(Collectors.toList());
204203

205204
// collect all deps that are inside `require` blocks
206-
207205
String currentSegmentOfGoMod = goModLines;
208206
Map<String, Integer> requirePosObject = decideRequireBlockIndex(currentSegmentOfGoMod);
209207
while (requirePosObject.get("index") > -1) {

0 commit comments

Comments
 (0)