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"}