diff --git a/.golangci.yml b/.golangci.yml index 8f7242c9f..400924ab9 100644 --- a/.golangci.yml +++ b/.golangci.yml @@ -13,6 +13,7 @@ linters: - gofumpt - goimports - revive + - misspell issues: exclude-rules: diff --git a/model/labels/labels_test.go b/model/labels/labels_test.go index 2d5c2ed37..fccdee91d 100644 --- a/model/labels/labels_test.go +++ b/model/labels/labels_test.go @@ -548,7 +548,7 @@ func TestLabels_Get(t *testing.T) { // BenchmarkLabels_Get was written to check whether a binary search can improve the performance vs the linear search implementation // The results have shown that binary search would only be better when searching last labels in scenarios with more than 10 labels. -// In the following list, `old` is the linear search while `new` is the binary search implementaiton (without calling sort.Search, which performs even worse here) +// In the following list, `old` is the linear search while `new` is the binary search implementation (without calling sort.Search, which performs even worse here) // name old time/op new time/op delta // Labels_Get/with_5_labels/get_first_label 5.12ns ± 0% 14.24ns ± 0% ~ (p=1.000 n=1+1) // Labels_Get/with_5_labels/get_middle_label 13.5ns ± 0% 18.5ns ± 0% ~ (p=1.000 n=1+1) diff --git a/tsdb/agent/db_test.go b/tsdb/agent/db_test.go index 1e5ea1118..e99712f71 100644 --- a/tsdb/agent/db_test.go +++ b/tsdb/agent/db_test.go @@ -177,7 +177,7 @@ func TestCommit(t *testing.T) { } } - // Check that the WAL contained the same number of commited series/samples/exemplars. + // Check that the WAL contained the same number of committed series/samples/exemplars. require.Equal(t, numSeries, walSeriesCount, "unexpected number of series") require.Equal(t, numSeries*numDatapoints, walSamplesCount, "unexpected number of samples") require.Equal(t, numSeries*numDatapoints, walExemplarsCount, "unexpected number of exemplars") diff --git a/tsdb/head_test.go b/tsdb/head_test.go index 5d87bafbc..54dc82cf9 100644 --- a/tsdb/head_test.go +++ b/tsdb/head_test.go @@ -2969,7 +2969,7 @@ func TestSnapshotError(t *testing.T) { } head.tombstones.AddInterval(1, itvs...) - // Check existance of data. + // Check existence of data. require.NotNil(t, head.series.getByHash(lbls.Hash(), lbls)) tm, err := head.tombstones.Get(1) require.NoError(t, err)