-
Notifications
You must be signed in to change notification settings - Fork 0
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
Showing
8 changed files
with
138 additions
and
105 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
This file was deleted.
Oops, something went wrong.
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,28 @@ | ||
package io.codemodder.codetf; | ||
|
||
import com.fasterxml.jackson.annotation.JsonCreator; | ||
import com.fasterxml.jackson.annotation.JsonProperty; | ||
import java.util.Objects; | ||
|
||
/** Describes a fixed finding. */ | ||
public final class FixedFinding { | ||
|
||
private final String id; | ||
private final DetectorRule rule; | ||
|
||
@JsonCreator | ||
public FixedFinding( | ||
@JsonProperty(value = "id", index = 1) final String id, | ||
@JsonProperty(value = "rule", index = 2) final DetectorRule rule) { | ||
this.id = CodeTFValidator.requireNonBlank(id); | ||
this.rule = Objects.requireNonNull(rule); | ||
} | ||
|
||
public String getId() { | ||
return id; | ||
} | ||
|
||
public DetectorRule getRule() { | ||
return rule; | ||
} | ||
} |
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,49 @@ | ||
package io.codemodder.codetf; | ||
|
||
import com.fasterxml.jackson.annotation.JsonCreator; | ||
import com.fasterxml.jackson.annotation.JsonProperty; | ||
import java.util.Objects; | ||
|
||
/** Describes an unfixed finding. */ | ||
public final class UnfixedFinding { | ||
|
||
private final String id; | ||
private final DetectorRule rule; | ||
private final String path; | ||
private final Integer line; | ||
private final String reason; | ||
|
||
@JsonCreator | ||
public UnfixedFinding( | ||
@JsonProperty(value = "id", index = 1) final String id, | ||
@JsonProperty(value = "rule", index = 2) final DetectorRule rule, | ||
@JsonProperty(value = "path", index = 3) final String path, | ||
@JsonProperty(value = "line", index = 4) final Integer line, | ||
@JsonProperty(value = "reason", index = 5) final String reason) { | ||
this.id = CodeTFValidator.requireNonBlank(id); | ||
this.rule = Objects.requireNonNull(rule); | ||
this.path = CodeTFValidator.requireNonBlank(path); | ||
this.line = line; | ||
this.reason = CodeTFValidator.requireNonBlank(reason); | ||
} | ||
|
||
public String getId() { | ||
return id; | ||
} | ||
|
||
public String getPath() { | ||
return path; | ||
} | ||
|
||
public String getReason() { | ||
return reason; | ||
} | ||
|
||
public DetectorRule getRule() { | ||
return rule; | ||
} | ||
|
||
public Integer getLine() { | ||
return line; | ||
} | ||
} |
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