Preparing report...

Report for github.com/famarks/grafarg

(v0.0.0-20240117043352-7a736eb05646)

A+    Excellent!    Found 158 issues across 874 files

Tweet

go_vet100%

go vet examines Go source code and reports suspicious constructs, such as Printf calls whose arguments do not align with the format string.

No problems detected. Good job!


gofmt88%

Gofmt formats Go programs. We run gofmt -s on your code, where -s is for the "simplify" command


ineffassign100%

IneffAssign detects ineffectual assignments in Go code.

No problems detected. Good job!


gocyclo92%

Gocyclo calculates cyclomatic complexities of functions in Go source code. The cyclomatic complexity of a function is calculated according to the following rules: 1 is the base complexity of a function +1 for each 'if', 'for', 'case', '&&' or '||' Go Report Card warns on functions with cyclomatic complexity > 15.

    • pkg/tsdb/sqleng/sql_engine.go
    • Line 573: warning: cyclomatic complexity 37 of function ConvertSqlValueColumnToFloat() is high (> 15) (gocyclo)
    • Line 522: warning: cyclomatic complexity 23 of function ConvertSqlTimeColumnToEpochMs() is high (> 15) (gocyclo)
    • Line 310: warning: cyclomatic complexity 23 of function (*sqlQueryEndpoint).transformToTimeSeries() is high (> 15) (gocyclo)
    • Line 420: warning: cyclomatic complexity 21 of function (*sqlQueryEndpoint).processRow() is high (> 15) (gocyclo)
    • pkg/expr/mathexp/exp.go
    • Line 330: warning: cyclomatic complexity 31 of function binaryOp() is high (> 15) (gocyclo)
    • Line 245: warning: cyclomatic complexity 22 of function (*State).walkBinary() is high (> 15) (gocyclo)
    • pkg/services/sqlstore/dashboard.go
    • Line 576: warning: cyclomatic complexity 28 of function getExistingDashboardByIdOrUidForUpdate() is high (> 15) (gocyclo)
    • Line 53: warning: cyclomatic complexity 21 of function saveDashboard() is high (> 15) (gocyclo)
    • pkg/services/sqlstore/sqlstore.go
    • Line 208: warning: cyclomatic complexity 16 of function (*SQLStore).buildConnectionString() is high (> 15) (gocyclo)
    • Line 411: warning: cyclomatic complexity 16 of function InitTestDB() is high (> 15) (gocyclo)
    • pkg/services/login/login.go
    • Line 36: warning: cyclomatic complexity 22 of function (*LoginService).UpsertUser() is high (> 15) (gocyclo)
    • Line 183: warning: cyclomatic complexity 16 of function syncOrgRoles() is high (> 15) (gocyclo)
    • pkg/tsdb/elasticsearch/response_parser.go
    • Line 435: warning: cyclomatic complexity 25 of function (*responseParser).getSeriesName() is high (> 15) (gocyclo)
    • Line 165: warning: cyclomatic complexity 25 of function (*responseParser).processMetrics() is high (> 15) (gocyclo)
    • Line 293: warning: cyclomatic complexity 23 of function (*responseParser).processAggregationDocs() is high (> 15) (gocyclo)
    • Line 88: warning: cyclomatic complexity 17 of function (*responseParser).processBuckets() is high (> 15) (gocyclo)
    • pkg/api/index.go
    • Line 128: warning: cyclomatic complexity 24 of function (*HTTPServer).getNavTree() is high (> 15) (gocyclo)
    • pkg/tsdb/models.go
    • Line 51: warning: cyclomatic complexity 23 of function (*QueryResult).UnmarshalJSON() is high (> 15) (gocyclo)
    • pkg/tsdb/influxdb/flux/builder.go
    • Line 96: warning: cyclomatic complexity 19 of function (*frameBuilder).Init() is high (> 15) (gocyclo)
    • Line 237: warning: cyclomatic complexity 17 of function (*frameBuilder).Append() is high (> 15) (gocyclo)
    • pkg/plugins/plugins.go
    • Line 192: warning: cyclomatic complexity 21 of function (*PluginManager).scan() is high (> 15) (gocyclo)
    • Line 69: warning: cyclomatic complexity 16 of function (*PluginManager).Init() is high (> 15) (gocyclo)
    • pkg/api/dashboard.go
    • Line 50: warning: cyclomatic complexity 20 of function (*HTTPServer).GetDashboard() is high (> 15) (gocyclo)
    • Line 248: warning: cyclomatic complexity 17 of function (*HTTPServer).PostDashboard() is high (> 15) (gocyclo)
    • pkg/api/frontendsettings.go
    • Line 18: warning: cyclomatic complexity 19 of function (*HTTPServer).getFSDataSources() is high (> 15) (gocyclo)
    • Line 126: warning: cyclomatic complexity 16 of function (*HTTPServer).getFrontendSettingsMap() is high (> 15) (gocyclo)
    • pkg/api/plugins.go
    • Line 65: warning: cyclomatic complexity 21 of function (*HTTPServer).GetPluginList() is high (> 15) (gocyclo)

license100%

Checks whether your project has a LICENSE file.

No problems detected. Good job!


misspell100%

Misspell Finds commonly misspelled English words

No problems detected. Good job!