Skip to content

Commit

Permalink
- fix problem with absolute paths
Browse files Browse the repository at this point in the history
  • Loading branch information
theKBro committed Nov 4, 2024
1 parent a7ff4b5 commit 26e6452
Showing 1 changed file with 3 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,10 @@
import se.bjurr.violations.lib.model.Violation;
import se.bjurr.violations.lib.parsers.SarifParser;

import java.io.File;
import java.net.URI;
import java.net.URISyntaxException;
import java.nio.file.InvalidPathException;
import java.nio.file.Path;
import java.nio.file.Paths;

/**
* Parses SARIF files.
Expand All @@ -35,8 +34,8 @@ String convertFileUriSchemeToPath(final String fileName) {
}

try {
Path path = Paths.get(new URI(fileName));
return path.toString();
File file = new File(new URI(fileName));
return file.toPath().toString();
}
catch (URISyntaxException | InvalidPathException e)
{

Check warning on line 41 in src/main/java/edu/hm/hafner/analysis/parser/violations/SarifAdapter.java

View check run for this annotation

ci.jenkins.io / Java Compiler

assertj:generate-assertions

NORMAL: (blocks) LeftCurly: '{' at column 9 should be on the previous line.

Check warning on line 41 in src/main/java/edu/hm/hafner/analysis/parser/violations/SarifAdapter.java

View check run for this annotation

ci.jenkins.io / Java Compiler

checkstyle:check

NORMAL: (blocks) LeftCurly: '{' at column 9 should be on the previous line.

Check warning on line 41 in src/main/java/edu/hm/hafner/analysis/parser/violations/SarifAdapter.java

View check run for this annotation

ci.jenkins.io / CheckStyle

LeftCurlyCheck

NORMAL: '{' at column 9 should be on the previous line.
Raw output
<p>Since Checkstyle 3.0</p><p> Checks for the placement of left curly braces (<code>'{'</code>) for code blocks. The policy to verify is specified using the property <code>option</code>. </p>
Expand Down

0 comments on commit 26e6452

Please sign in to comment.