Chore: Enable whitespace linter (#25903)

Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>
This commit is contained in:
Arve Knudsen
2020-07-06 20:17:28 +02:00
committed by GitHub
parent 42295898b8
commit 41d432b5ae
189 changed files with 3 additions and 303 deletions

View File

@@ -17,7 +17,6 @@ func (w *FileLogWriter) WriteLine(line string) error {
}
func TestLogFile(t *testing.T) {
Convey("When logging to file", t, func() {
fileLogWrite := NewFileWriter()
So(fileLogWrite, ShouldNotBeNil)

View File

@@ -264,7 +264,6 @@ func ReadLoggingConfig(modes []string, logsPath string, cfg *ini.File) error {
func LogFilterHandler(maxLevel log15.Lvl, filters map[string]log15.Lvl, h log15.Handler) log15.Handler {
return log15.FilterHandler(func(r *log15.Record) (pass bool) {
if len(filters) > 0 {
for i := 0; i < len(r.Ctx); i += 2 {
key, ok := r.Ctx[i].(string)

View File

@@ -571,7 +571,6 @@ func initMetricVars() {
StatsTotalDashboardVersions,
StatsTotalAnnotations,
)
}
func newCounterVecStartingAtZero(opts prometheus.CounterOpts, labels []string, labelValues ...string) *prometheus.CounterVec {

View File

@@ -130,7 +130,6 @@ func (dc *databaseCache) Delete(key string) error {
return err
})
}
// CacheData is the struct representing the table in the database

View File

@@ -95,6 +95,5 @@ func Test_parseRedisConnStr(t *testing.T) {
}
assert.NoError(t, err, reason)
assert.EqualValues(t, testCase.OutputOptions, options, reason)
}
}

View File

@@ -33,7 +33,6 @@ func TestMetrics(t *testing.T) {
var getSystemStatsQuery *models.GetSystemStatsQuery
uss.Bus.AddHandler(func(query *models.GetSystemStatsQuery) error {
query.Result = &models.SystemStats{
Dashboards: 1,
Datasources: 2,
@@ -273,7 +272,6 @@ func TestMetrics(t *testing.T) {
So(metrics.Get("stats.auth_enabled.oauth_grafana_com.count").MustInt(), ShouldEqual, 1)
So(metrics.Get("stats.packaging.deb.count").MustInt(), ShouldEqual, 1)
})
})