Browse Source

Log warnings as warnings

Signed-off-by: Robert Lin <robertlin1@gmail.com>
Robert Lin 6 years ago
parent
commit
a27240a7e2
1 changed files with 2 additions and 2 deletions
  1. 2 2
      leaves/research/typos.go

+ 2 - 2
leaves/research/typos.go

@@ -203,7 +203,7 @@ func (tdb *TyposDatasetBuilder) Consume(deps map[string]interface{}) (map[string
 		for _, n := range nodesAdded {
 		for _, n := range nodesAdded {
 			pos := uast.PositionsOf(n.(nodes.Object))
 			pos := uast.PositionsOf(n.(nodes.Object))
 			if pos.Start() == nil {
 			if pos.Start() == nil {
-				tdb.l.Infof("repo %s commit %s file %s adds identifier %s with no position",
+				tdb.l.Warnf("repo %s commit %s file %s adds identifier %s with no position",
 					tdb.remote, commit.String(), change.Change.To.Name,
 					tdb.remote, commit.String(), change.Change.To.Name,
 					n.(nodes.Object)["Name"].(nodes.String))
 					n.(nodes.Object)["Name"].(nodes.String))
 				continue
 				continue
@@ -216,7 +216,7 @@ func (tdb *TyposDatasetBuilder) Consume(deps map[string]interface{}) (map[string
 		for _, n := range nodesRemoved {
 		for _, n := range nodesRemoved {
 			pos := uast.PositionsOf(n.(nodes.Object))
 			pos := uast.PositionsOf(n.(nodes.Object))
 			if pos.Start() == nil {
 			if pos.Start() == nil {
-				tdb.l.Infof("repo %s commit %s file %s removes identifier %s with no position",
+				tdb.l.Warnf("repo %s commit %s file %s removes identifier %s with no position",
 					tdb.remote, commit.String(), change.Change.To.Name,
 					tdb.remote, commit.String(), change.Change.To.Name,
 					n.(nodes.Object)["Name"].(nodes.String))
 					n.(nodes.Object)["Name"].(nodes.String))
 				continue
 				continue