chore: rename parser secret -> dummy

This commit is contained in:
张泊明518370910136 2024-09-14 16:43:21 -04:00
parent 86705cf85f
commit 92c35f92fc
GPG Key ID: D47306D7062CDA9D
3 changed files with 9 additions and 8 deletions

View File

@ -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"

View File

@ -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{})
}

View File

@ -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
}