🛠 Add static analysis

This commit is contained in:
Dan Jones 2024-10-28 20:01:03 -05:00
commit 36ad4b260e
3 changed files with 32 additions and 8 deletions

View file

@ -38,10 +38,7 @@ func (s *Show) matchRegexp(path string) (f bool, err error) {
if s.re == nil {
p := s.Pattern
if s.Anime {
if strings.HasPrefix(p, "^") {
p = strings.TrimPrefix(p, "^")
}
p = animePattern + p
p = animePattern + strings.TrimPrefix(p, "^")
} else if !strings.HasPrefix(p, "^") {
p = "^" + p
}
@ -71,7 +68,7 @@ func (d *Data) AllShows(silent bool) iter.Seq[*Show] {
continue
}
if !silent {
fmt.Println("Checking", show, "shows\n")
fmt.Printf("Checking %s shows\n\n", show)
}
for s := range sh.All() {
if s == nil {