-
Notifications
You must be signed in to change notification settings - Fork 27
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore: Update to sonar-java 6.9.0 (#156)
* Upgrade to sonar-java 6.9 * Fix issues with paths * Ignore the code factory test for now * Refactor RuleVerifier * Move comment in pom into proper scope * Add comment that we may want to set the Java version * Format code with spotless * Fix weird comment formatting * Apply optimization by only running symbolic execution if necessary * Bump spoon version to 8.3.0
- Loading branch information
Showing
12 changed files
with
183 additions
and
34 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
package sorald; | ||
|
||
import java.io.File; | ||
import java.nio.file.Path; | ||
import java.nio.file.Paths; | ||
|
||
public class FileUtils { | ||
|
||
/** | ||
* Compare the two given paths as absolute, normalized paths. | ||
* | ||
* @param lhs A path. | ||
* @param rhs A path. | ||
* @return Whether or not the paths are equal as absolute, normalized paths. | ||
*/ | ||
public static boolean pathAbsNormEqual(String lhs, String rhs) { | ||
return pathAbsNormEqual(Paths.get(lhs), Paths.get(rhs)); | ||
} | ||
|
||
/** | ||
* Compare the two given paths as absolute, normalized paths. | ||
* | ||
* @param lhs A path. | ||
* @param rhs A path. | ||
* @return Whether or not the paths are equal as absolute, normalized paths. | ||
*/ | ||
public static boolean pathAbsNormEqual(Path lhs, Path rhs) { | ||
return lhs.toAbsolutePath().normalize().equals(rhs.toAbsolutePath().normalize()); | ||
} | ||
|
||
/** | ||
* @param file A file. | ||
* @return The given file if it is a directory, or its parent directory if it is not a | ||
* directory. | ||
*/ | ||
public static File getClosestDirectory(File file) { | ||
return file.isDirectory() ? file : file.getParentFile(); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.