go fmt
This commit is contained in:
parent
455b5565d8
commit
2e275015c3
|
@ -5,12 +5,12 @@ import (
|
|||
)
|
||||
|
||||
type entityTracker struct {
|
||||
entityDetector *regexp.Regexp
|
||||
openBracketDetector *regexp.Regexp
|
||||
entityDetector *regexp.Regexp
|
||||
openBracketDetector *regexp.Regexp
|
||||
closeBracketDetector *regexp.Regexp
|
||||
|
||||
currentEntity string
|
||||
lastEntity string
|
||||
lastEntity string
|
||||
openBracketCount map[string]int
|
||||
}
|
||||
|
||||
|
@ -31,10 +31,10 @@ func NewEntityTracker() (*entityTracker, error) {
|
|||
}
|
||||
|
||||
return &entityTracker{
|
||||
entityDetector: ed,
|
||||
openBracketDetector: obd,
|
||||
entityDetector: ed,
|
||||
openBracketDetector: obd,
|
||||
closeBracketDetector: cbd,
|
||||
openBracketCount: map[string]int{},
|
||||
openBracketCount: map[string]int{},
|
||||
}, nil
|
||||
}
|
||||
|
||||
|
|
14
main.go
14
main.go
|
@ -16,21 +16,21 @@ import (
|
|||
|
||||
const (
|
||||
statusDir = "../status-go"
|
||||
ignore = statusDir + "/vendor"
|
||||
ignore = statusDir + "/vendor"
|
||||
)
|
||||
|
||||
var (
|
||||
keywords = []string{"todo", "fixme"}
|
||||
found []todo
|
||||
found []todo
|
||||
|
||||
// todoMode tracks if subsequent comment lines should be included in the last to-do's description
|
||||
todoMode = false
|
||||
)
|
||||
|
||||
type todo struct {
|
||||
Filepath string
|
||||
Description string
|
||||
LineNumber int
|
||||
Filepath string
|
||||
Description string
|
||||
LineNumber int
|
||||
RelatedFuncOrType string
|
||||
}
|
||||
|
||||
|
@ -78,7 +78,7 @@ func processFilesInDir(dir string) error {
|
|||
}
|
||||
}
|
||||
|
||||
if !isGoFile(f.Name()){
|
||||
if !isGoFile(f.Name()) {
|
||||
continue
|
||||
}
|
||||
|
||||
|
@ -108,7 +108,7 @@ func processFilesInDir(dir string) error {
|
|||
|
||||
continue
|
||||
}
|
||||
found = append(found, todo{filepath, string(results[1]), i+1, et.Current()})
|
||||
found = append(found, todo{filepath, string(results[1]), i + 1, et.Current()})
|
||||
todoMode = true
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue