mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
Chore: Enable whitespace linter (#25903)
Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>
This commit is contained in:
@@ -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)
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -571,7 +571,6 @@ func initMetricVars() {
|
||||
StatsTotalDashboardVersions,
|
||||
StatsTotalAnnotations,
|
||||
)
|
||||
|
||||
}
|
||||
|
||||
func newCounterVecStartingAtZero(opts prometheus.CounterOpts, labels []string, labelValues ...string) *prometheus.CounterVec {
|
||||
|
||||
@@ -130,7 +130,6 @@ func (dc *databaseCache) Delete(key string) error {
|
||||
|
||||
return err
|
||||
})
|
||||
|
||||
}
|
||||
|
||||
// CacheData is the struct representing the table in the database
|
||||
|
||||
@@ -95,6 +95,5 @@ func Test_parseRedisConnStr(t *testing.T) {
|
||||
}
|
||||
assert.NoError(t, err, reason)
|
||||
assert.EqualValues(t, testCase.OutputOptions, options, reason)
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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)
|
||||
|
||||
})
|
||||
})
|
||||
|
||||
|
||||
Reference in New Issue
Block a user