chore: rename parser secret -> dummy
This commit is contained in:
parent
86705cf85f
commit
92c35f92fc
|
@ -5,6 +5,7 @@ import (
|
|||
_ "focs.ji.sjtu.edu.cn/git/FOCS-dev/JOJ3/internal/parsers/cppcheck"
|
||||
_ "focs.ji.sjtu.edu.cn/git/FOCS-dev/JOJ3/internal/parsers/cpplint"
|
||||
_ "focs.ji.sjtu.edu.cn/git/FOCS-dev/JOJ3/internal/parsers/diff"
|
||||
_ "focs.ji.sjtu.edu.cn/git/FOCS-dev/JOJ3/internal/parsers/dummy"
|
||||
_ "focs.ji.sjtu.edu.cn/git/FOCS-dev/JOJ3/internal/parsers/healthcheck"
|
||||
_ "focs.ji.sjtu.edu.cn/git/FOCS-dev/JOJ3/internal/parsers/keyword"
|
||||
_ "focs.ji.sjtu.edu.cn/git/FOCS-dev/JOJ3/internal/parsers/resultstatus"
|
||||
|
|
|
@ -1,9 +1,9 @@
|
|||
package secret
|
||||
package dummy
|
||||
|
||||
import "focs.ji.sjtu.edu.cn/git/FOCS-dev/JOJ3/internal/stage"
|
||||
|
||||
var name = "secret"
|
||||
var name = "dummy"
|
||||
|
||||
func init() {
|
||||
stage.RegisterParser(name, &Secret{})
|
||||
stage.RegisterParser(name, &Dummy{})
|
||||
}
|
|
@ -1,16 +1,16 @@
|
|||
package secret
|
||||
package dummy
|
||||
|
||||
import (
|
||||
"focs.ji.sjtu.edu.cn/git/FOCS-dev/JOJ3/internal/stage"
|
||||
)
|
||||
|
||||
type Conf struct {
|
||||
Secret string
|
||||
Comment string
|
||||
}
|
||||
|
||||
type Secret struct{}
|
||||
type Dummy struct{}
|
||||
|
||||
func (*Secret) Run(results []stage.ExecutorResult, confAny any) (
|
||||
func (*Dummy) Run(results []stage.ExecutorResult, confAny any) (
|
||||
[]stage.ParserResult, bool, error,
|
||||
) {
|
||||
conf, err := stage.DecodeConf[Conf](confAny)
|
||||
|
@ -19,7 +19,7 @@ func (*Secret) Run(results []stage.ExecutorResult, confAny any) (
|
|||
}
|
||||
var res []stage.ParserResult
|
||||
for range results {
|
||||
res = append(res, stage.ParserResult{Score: 0, Comment: conf.Secret})
|
||||
res = append(res, stage.ParserResult{Score: 0, Comment: conf.Comment})
|
||||
}
|
||||
return res, false, nil
|
||||
}
|
Loading…
Reference in New Issue
Block a user