Compare commits
No commits in common. "f04a4719692da66706d614d01ee89acd9540b963" and "18cd2a8c4d6d154d22da17388723eeb948535442" have entirely different histories.
f04a471969
...
18cd2a8c4d
|
@ -41,7 +41,7 @@ type Binder struct {
|
|||
}
|
||||
|
||||
func (b Binder) String() string {
|
||||
return fmt.Sprintf("in the definition of %s (at %s)", b.Binder, b.Pos)
|
||||
return fmt.Sprintf("In the definition of %s (at %s)", b.Binder, b.Pos)
|
||||
}
|
||||
|
||||
type Binders []Binder
|
||||
|
@ -51,12 +51,7 @@ func (bs Binders) String() string {
|
|||
for _, b := range bs {
|
||||
s = append(s, b.String())
|
||||
}
|
||||
combinedStr := strings.Join(s, "; ")
|
||||
if len(combinedStr) > 0 && combinedStr[0] == 'i' {
|
||||
return "I" + combinedStr[1:]
|
||||
}
|
||||
|
||||
return combinedStr
|
||||
return strings.Join(s, "; ")
|
||||
}
|
||||
|
||||
type Source struct {
|
||||
|
|
|
@ -35,19 +35,14 @@ func (p *Elf) parse(executorResult stage.ExecutorResult, conf Conf) stage.Parser
|
|||
slog.Error("elf parse", "mapstructure decode err", err)
|
||||
}
|
||||
comment += fmt.Sprintf("### [%s] %s\n", report.File, report.Name)
|
||||
caseScore := 0
|
||||
for range report.Cases {
|
||||
for _, caseObj := range report.Cases {
|
||||
for _, match := range conf.Matches {
|
||||
for _, keyword := range match.Keywords {
|
||||
if strings.Contains(kind, keyword) {
|
||||
caseScore += -match.Score
|
||||
score += -match.Score
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
score += caseScore
|
||||
comment += fmt.Sprintf("%d point(s)\n", caseScore)
|
||||
for _, caseObj := range report.Cases {
|
||||
switch kind {
|
||||
case "ParenDep":
|
||||
// "<binders>:\n<context> below reaches a parentheses depths of <depths>:\n<code>"
|
||||
|
|
Loading…
Reference in New Issue
Block a user