Skip to content

Commit

Permalink
- add test data to clarify that % encoding in file is also getting tr…
Browse files Browse the repository at this point in the history
…anslated
  • Loading branch information
theKBro committed Nov 4, 2024
1 parent a78a4a0 commit a7ff4b5
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@
import se.bjurr.violations.lib.parsers.SarifParser;

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

Expand Down Expand Up @@ -36,7 +38,7 @@ String convertFileUriSchemeToPath(final String fileName) {
Path path = Paths.get(new URI(fileName));
return path.toString();
}
catch (Exception e)
catch (URISyntaxException | InvalidPathException e)
{
// ignore
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ void handleFilePathsInFileURIschemeFormat() {
.hasSeverity(Severity.WARNING_NORMAL)
.hasLineStart(5)
.hasLineEnd(5)
.hasFileName("C:/my/workspace/project/whatever/path.cs");
.hasFileName("C:/my/workspace/project/whatever/path.cs");
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
{
"physicalLocation": {
"artifactLocation": {
"uri": "whatever/path.cs",
"uri": "whatever/%E2%82%ACpath.cs",
"uriBaseId": "solutionDir",
"index": 0
},
Expand Down Expand Up @@ -196,7 +196,7 @@
"artifacts": [
{
"location": {
"uri": "whatever/path.cs",
"uri": "whatever/%E2%82%ACpath.cs",
"uriBaseId": "solutionDir"
}
},
Expand Down

0 comments on commit a7ff4b5

Please sign in to comment.