-
Notifications
You must be signed in to change notification settings - Fork 23
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
b8d99c9
commit d573719
Showing
6 changed files
with
132 additions
and
2 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
18 changes: 18 additions & 0 deletions
18
...r-scalastyle/src/main/java/io/codety/scanner/analyzer/scalastyle/ScalastyleConverter.java
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,18 @@ | ||
package io.codety.scanner.analyzer.scalastyle; | ||
|
||
import io.codety.scanner.reporter.dto.CodeAnalysisIssueDto; | ||
|
||
import java.util.ArrayList; | ||
import java.util.List; | ||
|
||
public class ScalastyleConverter { | ||
|
||
|
||
public static List<CodeAnalysisIssueDto> convertResult(String payload) { | ||
ArrayList<CodeAnalysisIssueDto> codeAnalysisIssueDtos = new ArrayList<>(); | ||
|
||
|
||
|
||
return codeAnalysisIssueDtos; | ||
} | ||
} |
24 changes: 24 additions & 0 deletions
24
...lastyle/src/main/java/io/codety/scanner/analyzer/scalastyle/dto/ScalastyleCheckstyle.java
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,24 @@ | ||
package io.codety.scanner.analyzer.scalastyle.dto; | ||
|
||
import java.util.List; | ||
|
||
public class ScalastyleCheckstyle { | ||
private List<ScalastyleFile> file; | ||
private double version; | ||
|
||
public List<ScalastyleFile> getFile() { | ||
return file; | ||
} | ||
|
||
public void setFile(List<ScalastyleFile> file) { | ||
this.file = file; | ||
} | ||
|
||
public double getVersion() { | ||
return version; | ||
} | ||
|
||
public void setVersion(double version) { | ||
this.version = version; | ||
} | ||
} |
50 changes: 50 additions & 0 deletions
50
...r-scalastyle/src/main/java/io/codety/scanner/analyzer/scalastyle/dto/ScalastyleError.java
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,50 @@ | ||
package io.codety.scanner.analyzer.scalastyle.dto; | ||
|
||
public class ScalastyleError { | ||
private int line; | ||
private String source; | ||
private String severity; | ||
private String message; | ||
private int column; | ||
|
||
public int getLine() { | ||
return line; | ||
} | ||
|
||
public void setLine(int line) { | ||
this.line = line; | ||
} | ||
|
||
public String getSource() { | ||
return source; | ||
} | ||
|
||
public void setSource(String source) { | ||
this.source = source; | ||
} | ||
|
||
public String getSeverity() { | ||
return severity; | ||
} | ||
|
||
public void setSeverity(String severity) { | ||
this.severity = severity; | ||
} | ||
|
||
public String getMessage() { | ||
return message; | ||
} | ||
|
||
public void setMessage(String message) { | ||
this.message = message; | ||
} | ||
|
||
public int getColumn() { | ||
return column; | ||
} | ||
|
||
public void setColumn(int column) { | ||
this.column = column; | ||
} | ||
} | ||
|
24 changes: 24 additions & 0 deletions
24
...er-scalastyle/src/main/java/io/codety/scanner/analyzer/scalastyle/dto/ScalastyleFile.java
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,24 @@ | ||
package io.codety.scanner.analyzer.scalastyle.dto; | ||
|
||
import java.util.List; | ||
|
||
public class ScalastyleFile { | ||
private List<ScalastyleError> error; | ||
private String name; | ||
|
||
public List<ScalastyleError> getError() { | ||
return error; | ||
} | ||
|
||
public void setError(List<ScalastyleError> error) { | ||
this.error = error; | ||
} | ||
|
||
public String getName() { | ||
return name; | ||
} | ||
|
||
public void setName(String name) { | ||
this.name = name; | ||
} | ||
} |
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,12 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<checkstyle version="5.0"> | ||
<file name="/Users/user/git/codety-scanner/code-issue-examples/scala/emptyclass.scala"> | ||
<error line="1" source="org.scalastyle.file.HeaderMatchesChecker" severity="warning" message="Header does not match expected text"/> | ||
<error source="org.scalastyle.file.NewLineAtEofChecker" severity="warning" message="File must end with newline character"/> | ||
<error column="7" line="1" source="org.scalastyle.scalariform.EmptyClassChecker" severity="warning" message="Redundant braces after class definition"/> | ||
</file> | ||
<file name="/Users/user/git/codety-scanner/code-issue-examples/scala/test.scala"> | ||
<error line="1" source="org.scalastyle.file.HeaderMatchesChecker" severity="warning" message="Header does not match expected text"/> | ||
<error source="org.scalastyle.file.NewLineAtEofChecker" severity="warning" message="File must end with newline character"/> | ||
</file> | ||
</checkstyle> |