Preparing report...

Report for github.com/K-Phoen/sdk

(v0.0.0-20211119151408-adef1e5fdd11)

A+    Excellent!    Found 12 issues across 47 files

Tweet

gofmt100%

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

No problems detected. Good job!


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!


gocyclo95%

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.

    • sdk/panel.go
    • Line 1031: warning: cyclomatic complexity 24 of function (*Panel).UnmarshalJSON() is high (> 15) (gocyclo)

golint76%

Golint is a linter for Go source code.

    • sdk/board.go
    • Line 69: warning: exported type Time should have comment or be unexported (golint)
    • Line 73: warning: exported type Timepicker should have comment or be unexported (golint)
    • Line 78: warning: exported type Templating should have comment or be unexported (golint)
    • Line 81: warning: exported type TemplateVar should have comment or be unexported (golint)
    • Line 101: warning: comment on exported type Option should be of the form "Option ..." (with optional leading article) (golint)
    • Line 107: warning: comment on exported type Current should be of the form "Current ..." (with optional leading article) (golint)
    • Line 113: warning: exported type Annotation should have comment or be unexported (golint)
    • Line 154: warning: exported method Height.UnmarshalJSON should have comment or be unexported (golint)
    • Line 169: warning: exported function NewBoard should have comment or be unexported (golint)
    • Line 182: warning: exported method Board.AddLink should have comment or be unexported (golint)
    • Line 186: warning: exported method Board.RemoveTags should have comment or be unexported (golint)
    • Line 200: warning: exported method Board.AddTags should have comment or be unexported (golint)
    • Line 214: warning: exported method Board.HasTag should have comment or be unexported (golint)
    • Line 223: warning: exported method Board.AddRow should have comment or be unexported (golint)
    • Line 237: warning: exported method Board.UpdateSlug should have comment or be unexported (golint)
    • sdk/rest-dashboard.go
    • Line 379: warning: comment on exported method Client.DeleteDashboardByUID should be of the form "DeleteDashboardByUID ..." (golint)
    • sdk/rest-snapshot.go
    • Line 13: warning: comment on exported method Client.CreateSnapshot should be of the form "CreateSnapshot ..." (golint)
    • sdk/user.go
    • Line 22: warning: exported type User should have comment or be unexported (golint)
    • Line 37: warning: exported type UserRole should have comment or be unexported (golint)
    • Line 42: warning: exported type UserPermissions should have comment or be unexported (golint)
    • Line 46: warning: exported type PageUsers should have comment or be unexported (golint)
    • sdk/row.go
    • Line 35: warning: exported method Row.Add should have comment or be unexported (golint)
    • Line 41: warning: exported method Row.AddDashlist should have comment or be unexported (golint)
    • Line 49: warning: exported method Row.AddGraph should have comment or be unexported (golint)
    • Line 57: warning: exported method Row.AddTable should have comment or be unexported (golint)
    • Line 65: warning: exported method Row.AddText should have comment or be unexported (golint)
    • Line 73: warning: exported method Row.AddStat should have comment or be unexported (golint)
    • Line 81: warning: exported method Row.AddSinglestat should have comment or be unexported (golint)
    • Line 89: warning: exported method Row.AddCustom should have comment or be unexported (golint)
    • sdk/custom-types.go
    • Line 30: warning: exported type BoolString should have comment or be unexported (golint)
    • Line 35: warning: exported method BoolString.UnmarshalJSON should have comment or be unexported (golint)
    • Line 60: warning: exported method BoolString.MarshalJSON should have comment or be unexported (golint)
    • Line 71: warning: exported type BoolInt should have comment or be unexported (golint)
    • Line 76: warning: exported method BoolInt.UnmarshalJSON should have comment or be unexported (golint)
    • Line 98: warning: exported method BoolInt.MarshalJSON should have comment or be unexported (golint)
    • Line 105: warning: exported function NewIntString should have comment or be unexported (golint)
    • Line 150: warning: exported function NewFloatString should have comment or be unexported (golint)
    • sdk/datasource.go
    • Line 42: warning: comment on exported type DatasourceType should be of the form "DatasourceType ..." (with optional leading article) (golint)
    • sdk/org.go
    • Line 21: warning: exported type Org should have comment or be unexported (golint)
    • Line 27: warning: exported type OrgUser should have comment or be unexported (golint)
    • sdk/panel.go
    • Line 45: warning: exported const MixedSource should have comment or be unexported (golint)
    • Line 68: warning: exported type CommonPanel should have comment or be unexported (golint)
    • Line 101: warning: exported type AlertEvaluator should have comment or be unexported (golint)
    • Line 105: warning: exported type AlertOperator should have comment or be unexported (golint)
    • Line 108: warning: exported type AlertQuery should have comment or be unexported (golint)
    • Line 111: warning: exported type AlertReducer should have comment or be unexported (golint)
    • Line 115: warning: exported type AlertCondition should have comment or be unexported (golint)
    • Line 122: warning: exported type Alert should have comment or be unexported (golint)
    • Line 134: warning: exported type GraphPanel should have comment or be unexported (golint)
    • Line 168: warning: exported type FieldConfig should have comment or be unexported (golint)
    • Line 171: warning: exported type Options should have comment or be unexported (golint)
    • Line 186: warning: exported type Threshold should have comment or be unexported (golint)
    • Line 204: warning: exported type Tooltip should have comment or be unexported (golint)
    • Line 210: warning: exported type TablePanel should have comment or be unexported (golint)
    • Line 218: warning: exported type TextPanel should have comment or be unexported (golint)
    • Line 232: warning: exported type SinglestatPanel should have comment or be unexported (golint)
    • Line 255: warning: exported type StatPanel should have comment or be unexported (golint)
    • Line 279: warning: exported type DashlistPanel should have comment or be unexported (golint)
    • Line 290: warning: exported type PluginlistPanel should have comment or be unexported (golint)
    • Line 293: warning: exported type AlertlistPanel should have comment or be unexported (golint)
    • Line 302: warning: exported type BarGaugePanel should have comment or be unexported (golint)
    • Line 307: warning: exported type RowPanel should have comment or be unexported (golint)
    • Line 311: warning: exported type HeatmapPanel should have comment or be unexported (golint)
    • Line 356: warning: exported type TimeseriesPanel should have comment or be unexported (golint)
    • Line 361: warning: exported type TimeseriesOptions should have comment or be unexported (golint)
    • Line 365: warning: exported type TimeseriesLegendOptions should have comment or be unexported (golint)
    • Line 370: warning: exported type TimeseriesTooltipOptions should have comment or be unexported (golint)
    • Line 373: warning: exported type FieldConfigDefaults should have comment or be unexported (golint)
    • Line 383: warning: exported type FieldConfigCustom should have comment or be unexported (golint)
    • Line 417: warning: exported type Thresholds should have comment or be unexported (golint)
    • Line 421: warning: exported type ThresholdStep should have comment or be unexported (golint)
    • Line 425: warning: exported type FieldConfigColor should have comment or be unexported (golint)
    • Line 430: warning: exported type CustomPanel should have comment or be unexported (golint)
    • Line 433: warning: comment on exported type Axis should be of the form "Axis ..." (with optional leading article) (golint)
    • Line 433: warning: comment on exported type Legend should be of the form "Legend ..." (with optional leading article) (golint)
    • Line 433: warning: comment on exported type SeriesOverride should be of the form "SeriesOverride ..." (with optional leading article) (golint)
    • Line 433: warning: comment on exported type Sort should be of the form "Sort ..." (with optional leading article) (golint)
    • Line 501: warning: comment on exported type Column should be of the form "Column ..." (with optional leading article) (golint)
    • Line 501: warning: comment on exported type ColumnStyle should be of the form "ColumnStyle ..." (with optional leading article) (golint)
    • Line 526: warning: comment on exported type Gauge should be of the form "Gauge ..." (with optional leading article) (golint)
    • Line 526: warning: comment on exported type SparkLine should be of the form "SparkLine ..." (with optional leading article) (golint)
    • Line 526: warning: comment on exported type ValueMap should be of the form "ValueMap ..." (with optional leading article) (golint)
    • Line 550: warning: comment on exported type Target should be of the form "Target ..." (with optional leading article) (golint)
    • Line 661: warning: exported type MapType should have comment or be unexported (golint)
    • Line 666: warning: exported type RangeMap should have comment or be unexported (golint)
    • Line 818: warning: exported function NewAlertlist should have comment or be unexported (golint)
    • Line 833: warning: exported function NewHeatmap should have comment or be unexported (golint)
    • Line 934: warning: comment on exported method Panel.RepeatDatasourcesForEachTarget should be of the form "RepeatDatasourcesForEachTarget ..." (golint)
    • Line 1031: warning: exported method Panel.UnmarshalJSON should have comment or be unexported (golint)
    • Line 1107: warning: exported method Panel.MarshalJSON should have comment or be unexported (golint)

license100%

Checks whether your project has a LICENSE file.

No problems detected. Good job!


ineffassign100%

IneffAssign detects ineffectual assignments in Go code.

No problems detected. Good job!


misspell100%

Misspell Finds commonly misspelled English words

No problems detected. Good job!