Просмотр исходного кода

Applied maven spotless to the preview commit

Pascal Krieg 4 лет назад
Родитель
Сommit
1e12433149

+ 2 - 4
languages/cpp/src/main/java/de/jplag/cpp/experimental/GCCSourceAnalysis.java

@@ -7,14 +7,14 @@ import java.io.InputStreamReader;
 import java.util.*;
 
 /**
- * Uses GCC to find unused variables and saves their location. The scanner can then check if a token belongs to an unused variable
+ * Uses GCC to find unused variables and saves their location. The scanner can then check if a token belongs to an
+ * unused variable
  */
 public class GCCSourceAnalysis implements SourceAnalysis {
 
     public static final String COMPILE_COMMAND = "gcc -Wall -fsyntax-only %s";
     private Map<String, List<Integer>> linesToDelete = new HashMap<>();
 
-
     public boolean isTokenIgnored(de.jplag.cpp.Token token, String file) {
         if (linesToDelete.containsKey(file)) {
             var ignoredLineNumbers = linesToDelete.get(file);
@@ -23,11 +23,9 @@ public class GCCSourceAnalysis implements SourceAnalysis {
         return false;
     }
 
-
     public void findUnusedVariableLines(Set<File> files) {
         linesToDelete = new HashMap<>();
 
-
         for (File file : files) {
             try {
                 Runtime runtime = Runtime.getRuntime();

+ 3 - 4
languages/cpp/src/main/java/de/jplag/cpp/experimental/SourceAnalysis.java

@@ -1,6 +1,5 @@
 package de.jplag.cpp.experimental;
 
-
 import java.io.File;
 import java.util.Set;
 
@@ -10,9 +9,9 @@ import java.util.Set;
 public interface SourceAnalysis {
 
     /**
-     * Tells the caller if a token is located in a line containing an unused variable.
-     * This usually indicates that the token belongs to a declaration of an unused variable.
-     * An edge case is multiple variable declarations in a single line, e.g. 'int a, b;' where a is used an b is unused.
+     * Tells the caller if a token is located in a line containing an unused variable. This usually indicates that the token
+     * belongs to a declaration of an unused variable. An edge case is multiple variable declarations in a single line, e.g.
+     * 'int a, b;' where a is used an b is unused.
      * @param token The token that will be checked
      * @param file The file the token was scanned in
      * @return True, if the token should not be added to a TokenList, false if it should