@@ -23,14 +23,27 @@ type Aspell struct {
2323}
2424
2525var (
26- camelCaseOK = map [string ]struct {}{
27- "HAProxy " : {},
26+ acceptableWordsGlobal = map [string ]struct {}{
27+ "haproxy " : {},
2828 "golang" : {},
2929 "ascii" : {},
3030 "api" : {},
3131 "goreleaser" : {},
32+ "github" : {},
33+ "gitlab" : {},
34+ "yaml" : {},
35+ "env" : {},
36+ "config" : {},
37+ "workdir" : {},
38+ "entrypoint" : {},
39+ "sudo" : {},
40+ "dockerfile" : {},
41+ "ghcr" : {},
42+ "sed" : {},
43+ "stdin" : {},
44+ "args" : {},
3245 }
33- camelCaseNotOK = map [string ]struct {}{}
46+ badWordsGlobal = map [string ]struct {}{}
3447)
3548
3649func (a Aspell ) checkSingle (data string , allowedWords []string ) error {
@@ -50,11 +63,11 @@ func (a Aspell) checkSingle(data string, allowedWords []string) error {
5063 if len (word ) < a .MinLength {
5164 continue
5265 }
53- if _ , ok := camelCaseNotOK [wordLower ]; ok {
66+ if _ , ok := badWordsGlobal [wordLower ]; ok {
5467 badWords = append (badWords , wordLower )
5568 continue
5669 }
57- if _ , ok := camelCaseOK [wordLower ]; ok {
70+ if _ , ok := acceptableWordsGlobal [wordLower ]; ok {
5871 continue
5972 }
6073 if slices .Contains (a .AllowedWords , wordLower ) || slices .Contains (allowedWords , wordLower ) {
@@ -70,13 +83,13 @@ func (a Aspell) checkSingle(data string, allowedWords []string) error {
7083 for _ , s := range splitted {
7184 er := a .checkSingle (s , allowedWords )
7285 if er != nil {
73- camelCaseNotOK [wordLower ] = struct {}{}
86+ badWordsGlobal [wordLower ] = struct {}{}
7487 badWords = append (badWords , word + ":" + s )
7588 break
7689 }
7790 }
7891 } else {
79- camelCaseNotOK [wordLower ] = struct {}{}
92+ badWordsGlobal [wordLower ] = struct {}{}
8093 badWords = append (badWords , word )
8194 }
8295 }
0 commit comments