forked from Silverfish/proton-bridge
Other: add straightforward linters
This commit is contained in:
@ -35,7 +35,7 @@ var systemFolderMapping = map[string]string{ //nolint[gochecknoglobals]
|
||||
// Add more translations.
|
||||
}
|
||||
|
||||
// LeastUsedColor is intended to return color for creating a new inbox or label
|
||||
// LeastUsedColor is intended to return color for creating a new inbox or label.
|
||||
func LeastUsedColor(mailboxes []Mailbox) string {
|
||||
usedColors := []string{}
|
||||
for _, m := range mailboxes {
|
||||
|
||||
@ -27,7 +27,7 @@ import (
|
||||
|
||||
type IMAPClientProvider interface {
|
||||
Capability() (map[string]bool, error)
|
||||
Support(cap string) (bool, error)
|
||||
Support(capability string) (bool, error)
|
||||
State() imap.ConnState
|
||||
SupportAuth(mech string) (bool, error)
|
||||
Authenticate(auth sasl.Client) error
|
||||
|
||||
@ -329,10 +329,10 @@ func (p *PMAPIProvider) importMessage(msgSourceID string, progress *Progress, re
|
||||
}
|
||||
if results[0].Error != nil {
|
||||
importedErr = errors.Wrap(results[0].Error, "failed to import message")
|
||||
return nil // Call passed but API refused this message, skip this one.
|
||||
return nil //nolint[nilerr] Call passed but API refused this message, skip this one.
|
||||
}
|
||||
importedID = results[0].MessageID
|
||||
return nil
|
||||
})
|
||||
return
|
||||
return importedID, importedErr
|
||||
}
|
||||
|
||||
@ -85,7 +85,7 @@ func testTransferFrom(t *testing.T, rules transferRules, provider TargetProvider
|
||||
progress.finish()
|
||||
}()
|
||||
|
||||
maxWait := time.Duration(len(messages)) * 2 * time.Second
|
||||
maxWait := time.Duration(len(messages)*2) * time.Second
|
||||
a.Eventually(t, func() bool {
|
||||
return progress.updateCh == nil
|
||||
}, maxWait, 10*time.Millisecond, "Waiting for imported messages timed out")
|
||||
|
||||
Reference in New Issue
Block a user