repochecker/grammalecte: Extract struct in a dedicated lib
This commit is contained in:
parent
23ac512ce6
commit
acdf0a6261
3 changed files with 7 additions and 5 deletions
|
|
@ -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,
|
||||
|
|
|
|||
Reference in a new issue