mirror of
https://gitlab.com/pulsechaincom/prysm-pulse.git
synced 2024-12-22 11:32:09 +00:00
f537a98fcd
* Update staticcheck to latest * Add static checks while ignoring for third party / external stuff * Added a hack to keep go mod happy. * disable SA2002 * Pin go mod tidy checker image to golang:1.20-alpine
18 lines
482 B
Go
18 lines
482 B
Go
package main
|
|
|
|
// AddExclusion adds an exclusion to the Configs, if they do not exist already.
|
|
func (c Configs) AddExclusion(check string, exclusions []string) {
|
|
for _, e := range exclusions {
|
|
if cc, ok := c[check]; !ok {
|
|
c[check] = Config{
|
|
ExcludeFiles: make(map[string]string),
|
|
}
|
|
} else if cc.ExcludeFiles == nil {
|
|
cc.ExcludeFiles = make(map[string]string)
|
|
}
|
|
if _, ok := c[check].ExcludeFiles[e]; !ok {
|
|
c[check].ExcludeFiles[e] = exclusionMessage
|
|
}
|
|
}
|
|
}
|