diff --git a/.woodpecker/check.yml b/.woodpecker/check.yml index 3d929904..31ce0882 100644 --- a/.woodpecker/check.yml +++ b/.woodpecker/check.yml @@ -13,3 +13,8 @@ pipeline: settings: file_pattern: "*.java" path: "app/" + + test: + image: alvrme/alpine-android:android-31-jdk11 + commands: + - ./gradlew test diff --git a/app/src/main/java/org/mian/gitnex/helpers/ParseDiff.java b/app/src/main/java/org/mian/gitnex/helpers/ParseDiff.java index 1641bef9..0db62b6c 100644 --- a/app/src/main/java/org/mian/gitnex/helpers/ParseDiff.java +++ b/app/src/main/java/org/mian/gitnex/helpers/ParseDiff.java @@ -43,6 +43,12 @@ public class ParseDiff { Matcher rmMatcher = rmPattern.matcher(raw); Matcher addMatcher = addPattern.matcher(raw); + if(raw.startsWith("+")) { + add++; + } + else if(raw.startsWith("-")) { + rm++; + } while(rmMatcher.find()) rm++; while(addMatcher.find())