repochecker/grammalecte: Extract struct in a dedicated lib

This commit is contained in:
nemunaire 2022-10-31 17:00:09 +01:00
commit acdf0a6261
3 changed files with 7 additions and 5 deletions

View file

@ -10,6 +10,7 @@ import (
"strings"
"srs.epita.fr/fic-server/admin/sync"
lib "srs.epita.fr/fic-server/repochecker/grammalecte/lib"
)
type GrammalecteOptions struct {
@ -169,7 +170,7 @@ func grammalecte(name string, text string, exceptions *sync.CheckExceptions, opt
}
suggestions, _ := suggest(serror.Value)
errs = append(errs, SpellingError{
errs = append(errs, lib.SpellingError{
Prefix: name,
Source: data.Text,
NSource: data.Paragraph,
@ -190,7 +191,7 @@ func grammalecte(name string, text string, exceptions *sync.CheckExceptions, opt
continue
}
errs = append(errs, GrammarError{
errs = append(errs, lib.GrammarError{
Prefix: name,
Source: data.Text,
NSource: data.Paragraph,