Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type PatternReport ¶
type PatternReport struct { // PatternRating is the pattern similarity with the closest pattern PatternRating float64 // OptimalLimit is the exercise limit (similarity) for approve as optimal OptimalLimit float64 // ApproveLimit is the exercise limit (similarity) for approve with comments ApproveLimit float64 // Match is true if one of the patterns was a perfect match PerfectMatch bool // MinDiff is a git-like diff to the closest pattern MinDiff string }
PatternReport contain information on pattern matching
func CheckPattern ¶
func CheckPattern(exercise string, solution *astrav.Package) (*PatternReport, error)
CheckPattern checks if the given package matches any good pattern
type Result ¶
type Result struct { Status Status `json:"status"` Comments []sugg.Comment `json:"comments"` Errors []string `json:"errors,omitempty"` Severity int `json:"-"` Rating float64 `json:"-"` MinDiff string `json:"-"` }
Result defines the result of the analyzer
func GetResultFromFile ¶
GetResultFromFile returns the content of the `expected.json` file in given path.
func NewErrResult ¶
NewErrResult creates a result with an error.
Click to show internal directories.
Click to hide internal directories.