提交 c7da77fb 编写于 作者: T TommyLike

Fix debug issue

上级 0ba79cb7
......@@ -100,7 +100,7 @@ func (ds *DirScanner) ScanSigYaml(filename string, projects chan<- string) error
for _,s := range sig.Sigs {
for _, repo := range s.Repositories {
if Find(ds.ignoreProjects, repo) {
fmt.Printf("[Warning] Project %s will be ignored due to --ignoreproject options %v", repo, ds.ignoreProjects)
fmt.Printf("[Warning] Project %s will be ignored due to --ignoreproject options %v\n", repo, ds.ignoreProjects)
} else {
projects <- repo
}
......
......@@ -82,7 +82,7 @@ func CheckOwner() error {
return err
}
if len(failedUser) != 0 {
return fmt.Errorf("[Import] Failed to recognize gitee user:\n %s\n", strings.Join(failedUser,"\n"))
return fmt.Errorf("[Error] Failed to recognize gitee user:\n %s\n", strings.Join(failedUser,"\n"))
}
fmt.Printf("Owners successfully verified.")
return nil
......
......@@ -66,6 +66,7 @@ func CheckSigRepo() error {
var scanProjects []string
var invalidProjects []string
fmt.Printf("Starting to validating all of the repos in sig file %s\n", sigRepoCheck.FileName)
fmt.Printf("Found projects to ignore %v\n", sigRepoCheck.IgnoreProjects)
if _, err := os.Stat(sigRepoCheck.FileName); os.IsNotExist(err) {
return fmt.Errorf("sig file not existed %s", sigRepoCheck.FileName)
}
......@@ -100,9 +101,8 @@ func CheckSigRepo() error {
wg.Add(1)
go giteeHandler.CollectRepos(&wg,100, size, i, 5 , "open_euler", resultChannel, )
}
projects := strings.Split(checkOwnerFlags.FileName, ",")
scanner := NewDirScanner(checkOwnerFlags.DirName, projects)
projects := strings.Split(sigRepoCheck.IgnoreProjects, ",")
scanner := NewDirScanner("", projects)
err := scanner.ScanSigYaml(sigRepoCheck.FileName, sigChannel)
//Wait all gitee query threads to be finished
wg.Wait()
......@@ -121,7 +121,7 @@ func CheckSigRepo() error {
}
}
if len(invalidProjects) != 0 {
return fmt.Errorf("[Import] Failed to recognize gitee %d projects:\n %s\n", len(invalidProjects), strings.Join(invalidProjects,"\n"))
return fmt.Errorf("[Error] Failed to recognize gitee %d projects:\n %s\n", len(invalidProjects), strings.Join(invalidProjects,"\n"))
}
fmt.Printf("Projects successfully verified.")
return nil
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册