Fix misspell issues (#23905)

* Fix misspell issues

See,
$ golangci-lint run --timeout 10m --disable-all -E misspell ./...

Signed-off-by: Mario Trangoni <mjtrangoni@gmail.com>

* Fix codespell issues

See,
$ codespell -S './.git*' -L 'uint,thru,pres,unknwon,serie,referer,uptodate,durationm'

Signed-off-by: Mario Trangoni <mjtrangoni@gmail.com>

* ci please?

* non-empty commit - ci?

* Trigger build

Co-authored-by: bergquist <carl.bergquist@gmail.com>
Co-authored-by: Kyle Brandt <kyle@grafana.com>
This commit is contained in:
Mario Trangoni
2020-04-29 21:37:21 +02:00
committed by GitHub
co-authored by bergquist Kyle Brandt
parent 023c1a6e3f
commit 5116420e9a
23 changed files with 33 additions and 32 deletions
+2 -2
View File
@@ -64,7 +64,7 @@ func TestAlertingUsageStats(t *testing.T) {
for k := range expected {
if expected[k] != result.DatasourceUsage[k] {
t.Errorf("result missmatch for %s. got %v expected %v", k, result.DatasourceUsage[k], expected[k])
t.Errorf("result mismatch for %s. got %v expected %v", k, result.DatasourceUsage[k], expected[k])
}
}
}
@@ -118,7 +118,7 @@ func TestParsingAlertRuleSettings(t *testing.T) {
tc.shouldErr(t, err)
diff := cmp.Diff(tc.expected, result)
if diff != "" {
t.Errorf("result missmatch (-want +got) %s\n", diff)
t.Errorf("result mismatch (-want +got) %s\n", diff)
}
})
}
@@ -140,7 +140,7 @@ func inSlice(a string, list []string) bool {
return false
}
// HumanThresholdType converts a treshold "type" string to a string that matches the UI
// HumanThresholdType converts a threshold "type" string to a string that matches the UI
// so errors are less confusing.
func HumanThresholdType(typ string) string {
switch typ {
+3 -3
View File
@@ -44,7 +44,7 @@ func (e *AlertEngine) IsDisabled() bool {
return !setting.AlertingEnabled || !setting.ExecuteAlerts
}
// Init initalizes the AlertingService.
// Init initializes the AlertingService.
func (e *AlertEngine) Init() error {
e.ticker = NewTicker(time.Now(), time.Second*0, clock.New())
e.execQueue = make(chan *Job, 1000)
@@ -209,8 +209,8 @@ func (e *AlertEngine) processJob(attemptID int, attemptChan chan int, cancelChan
// override the context used for evaluation with a new context for notifications.
// This makes it possible for notifiers to execute when datasources
// dont respond within the timeout limit. We should rewrite this so notifications
// dont reuse the evalContext and get its own context.
// don't respond within the timeout limit. We should rewrite this so notifications
// don't reuse the evalContext and get its own context.
evalContext.Ctx = resultHandleCtx
evalContext.Rule.State = evalContext.GetNewState()
if err := e.resultHandler.handle(evalContext); err != nil {
+1 -1
View File
@@ -141,7 +141,7 @@ func (n *NotifierBase) GetDisableResolveMessage() bool {
return n.DisableResolveMessage
}
// GetFrequency returns the freqency for how often
// GetFrequency returns the frequency for how often
// alerts should be evaluated.
func (n *NotifierBase) GetFrequency() time.Duration {
return n.Frequency
+1 -1
View File
@@ -78,7 +78,7 @@ type ThreemaNotifier struct {
log log.Logger
}
// NewThreemaNotifier is the constructor for the Threema notifer
// NewThreemaNotifier is the constructor for the Threema notifier
func NewThreemaNotifier(model *models.AlertNotification) (alerting.Notifier, error) {
if model.Settings == nil {
return nil, alerting.ValidationError{Reason: "No Settings Supplied"}
+1 -1
View File
@@ -157,7 +157,7 @@ func (server *Server) Close() {
// 2. Single bind
// // If all the users meant to be used with Grafana have the ability to search in LDAP server
// then we bind with LDAP server with targeted login/password
// and then search for the said user in order to retrive all the information about them
// and then search for the said user in order to retrieve all the information about them
// 3. Unauthenticated bind
// For some LDAP configurations it is allowed to search the
// user without login/password binding with LDAP server, in such case
+2 -2
View File
@@ -5,13 +5,13 @@ import (
"github.com/grafana/grafana/pkg/setting"
)
// AttachedFile is struct representating email attached files
// AttachedFile struct represents email attached files.
type AttachedFile struct {
Name string
Content []byte
}
// Message is representation of the email message
// Message is representation of the email message.
type Message struct {
To []string
SingleEmail bool
@@ -14,7 +14,7 @@ notifiers:
- name: another-not-default-notification
type: email
settings:
addresses: example@exmaple.com
addresses: example@example.com
org_id: 3
uid: "notifier2"
is_default: false
@@ -29,7 +29,7 @@ notifiers:
org_id: 3
uid: "notifier4"
settings:
addresses: example@exmaple.com
addresses: example@example.com
delete_notifiers:
- name: default-slack-notification
org_id: 2
+4 -3
View File
@@ -1,10 +1,11 @@
package sqlstore
import (
"github.com/grafana/grafana/pkg/models"
"github.com/stretchr/testify/assert"
"testing"
"time"
"github.com/grafana/grafana/pkg/models"
"github.com/stretchr/testify/assert"
)
func TestApiKeyDataAccess(t *testing.T) {
@@ -54,7 +55,7 @@ func TestApiKeyDataAccess(t *testing.T) {
assert.True(t, *query.Result.Expires >= timeNow().Unix())
// timeNow() has been called twice since creation; once by AddApiKey and once by GetApiKeyByName
// therefore two seconds should be subtracted by next value retuned by timeNow()
// therefore two seconds should be subtracted by next value returned by timeNow()
// that equals the number by which timeSeed has been advanced
then := timeNow().Add(-2 * time.Second)
expected := then.Add(1 * time.Hour).UTC().Unix()
+1 -1
View File
@@ -308,7 +308,7 @@ type ITestDB interface {
Fatalf(format string, args ...interface{})
}
// InitTestDB initiliaze test DB
// InitTestDB initialize test DB.
func InitTestDB(t ITestDB) *SqlStore {
t.Helper()
sqlstore := &SqlStore{}
+1 -1
View File
@@ -322,7 +322,7 @@ func TestUserDataAccess(t *testing.T) {
})
})
Convey("when retreiving signed in user for orgId=0 result should return active org id", func() {
Convey("when retrieving signed in user for orgId=0 result should return active org id", func() {
ss.CacheService.Flush()
query := &models.GetSignedInUserQuery{OrgId: users[1].OrgId, UserId: users[1].Id}