kolmafia / kolmafia

@@ -7,16 +7,8 @@
Loading
7 7
import java.io.PrintStream;
8 8
import java.net.HttpURLConnection;
9 9
import java.net.URL;
10 -
import java.util.ArrayList;
11 -
import java.util.Collection;
12 -
import java.util.HashSet;
13 -
import java.util.Iterator;
14 -
import java.util.List;
15 -
import java.util.Map;
10 +
import java.util.*;
16 11
import java.util.Map.Entry;
17 -
import java.util.Set;
18 -
import java.util.TreeMap;
19 -
import java.util.TreeSet;
20 12
import java.util.regex.Matcher;
21 13
import java.util.regex.Pattern;
22 14
import javax.xml.parsers.DocumentBuilder;
@@ -92,7 +84,7 @@
Loading
92 84
          byte[] bytes = ByteBufferUtilities.read(istream);
93 85
          return StringUtilities.getEncodedString(bytes, "UTF-8");
94 86
        }
95 -
87 +
        // JAA - Should this be && and not || ?
96 88
        if (responseCode >= 301 || responseCode < 308) {
97 89
          String redirectLocation = connection.getHeaderField("Location");
98 90
          System.out.println(url + " => " + redirectLocation);
@@ -3787,4 +3779,40 @@
Loading
3787 3779
      }
3788 3780
    }
3789 3781
  }
3782 +
3783 +
  public static void checkLocalSVNRepository(File root) {
3784 +
    List<File> theList;
3785 +
    theList = new LinkedList<>(curseAgain(root));
3786 +
    Collections.sort(theList);
3787 +
    RequestLogger.printLine("Found " + theList.size() + " repo files.");
3788 +
    Map<String, File> seen = new HashMap<>();
3789 +
    for (File p : theList) {
3790 +
      String name = p.getName().toLowerCase();
3791 +
      if (seen.containsKey(name)) {
3792 +
        RequestLogger.printLine("***");
3793 +
        RequestLogger.printLine(seen.get(name).toString());
3794 +
        RequestLogger.printLine(p.toString());
3795 +
        RequestLogger.printLine("***");
3796 +
      } else {
3797 +
        seen.put(name, p);
3798 +
      }
3799 +
    }
3800 +
  }
3801 +
3802 +
  private static List<File> curseAgain(File here) {
3803 +
    List<File> theList = new LinkedList<>();
3804 +
    File[] contents = here.listFiles();
3805 +
    if (contents != null) {
3806 +
      for (File f : contents) {
3807 +
        if (f.getName().startsWith(".")) continue;
3808 +
        if (f.getName().equalsIgnoreCase("dependencies.txt")) continue;
3809 +
        if (f.isDirectory()) {
3810 +
          theList.addAll(curseAgain(f));
3811 +
        } else {
3812 +
          theList.add(f);
3813 +
        }
3814 +
      }
3815 +
    }
3816 +
    return (theList);
3817 +
  }
3790 3818
}

@@ -563,6 +563,7 @@
Loading
563 563
        .register("checkpowers")
564 564
        .register("checkprofile")
565 565
        .register("checkpulverization")
566 +
        .register("checkrepo")
566 567
        .register("checkshields")
567 568
        .register("checkskills")
568 569
        .register("checkzapgroups");

@@ -3,11 +3,7 @@
Loading
3 3
import java.util.Set;
4 4
import java.util.regex.Matcher;
5 5
import java.util.regex.Pattern;
6 -
import net.sourceforge.kolmafia.AdventureResult;
7 -
import net.sourceforge.kolmafia.KoLmafia;
8 -
import net.sourceforge.kolmafia.Modifiers;
9 -
import net.sourceforge.kolmafia.RequestLogger;
10 -
import net.sourceforge.kolmafia.RequestThread;
6 +
import net.sourceforge.kolmafia.*;
11 7
import net.sourceforge.kolmafia.persistence.CandyDatabase;
12 8
import net.sourceforge.kolmafia.persistence.DebugDatabase;
13 9
import net.sourceforge.kolmafia.persistence.ItemDatabase;
@@ -174,6 +170,12 @@
Loading
174 170
      return;
175 171
    }
176 172
173 +
    if (command.equals("checkrepo")) {
174 +
      DebugDatabase.checkLocalSVNRepository(KoLConstants.SVN_LOCATION);
175 +
      RequestLogger.printLine("Local SVN repos scanned for possible duplicates.");
176 +
      return;
177 +
    }
178 +
177 179
    if (command.equals("checkshields")) {
178 180
      DebugDatabase.checkShields();
179 181
      RequestLogger.printLine("Shield power checked.");
Files Complexity Coverage
lib 14.24% 12.33%
src/net/sourceforge/kolmafia 13.07% 18.27%
Project Totals (1019 files) 13.09% 18.15%

No yaml found.

Create your codecov.yml to customize your Codecov experience

Sunburst
The inner-most circle is the entire project, moving away from the center are folders then, finally, a single file. The size and color of each slice is representing the number of statements and the coverage, respectively.
Icicle
The top section represents the entire project. Proceeding with folders and finally individual files. The size and color of each slice is representing the number of statements and the coverage, respectively.
Grid
Each block represents a single file in the project. The size and color of each block is represented by the number of statements and the coverage, respectively.
Loading