Preparing report...

Report for github.com/yuuki/diamondb

A+    Excellent!    Found 15 issues across 48 files

Tweet

gofmt97%

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


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!


gocyclo91%

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.

    • diamondb/pkg/query/yaccpar
    • Line 156: warning: cyclomatic complexity 50 of function (*yyParserImpl).Parse() is high (> 15) (gocyclo)
    • Line 53: warning: cyclomatic complexity 20 of function yyErrorMessage() is high (> 15) (gocyclo)

golint77%

Golint is a linter for Go source code.

    • diamondb/pkg/model/metric.go
    • Line 3: warning: exported type Metric should have comment or be unexported (golint)
    • Line 8: warning: exported type Datapoint should have comment or be unexported (golint)
    • diamondb/pkg/web/web.go
    • Line 37: warning: comment on exported type Option should be of the form "Option ..." (with optional leading article) (golint)
    • diamondb/pkg/storage/redis/testing.go
    • Line 18: warning: exported method FakeReadWriter.Fetch should have comment or be unexported (golint)
    • Line 22: warning: exported method FakeReadWriter.Get should have comment or be unexported (golint)
    • Line 22: warning: receiver name r should be consistent with previous receiver name s for FakeReadWriter (golint)
    • Line 26: warning: exported method FakeReadWriter.Len should have comment or be unexported (golint)
    • Line 26: warning: receiver name r should be consistent with previous receiver name s for FakeReadWriter (golint)
    • Line 30: warning: exported method FakeReadWriter.Put should have comment or be unexported (golint)
    • Line 30: warning: receiver name r should be consistent with previous receiver name s for FakeReadWriter (golint)
    • diamondb/pkg/model/series_map.go
    • Line 22: warning: receiver name sm1 should be consistent with previous receiver name sm for SeriesMap (golint)
    • Line 30: warning: receiver name sm1 should be consistent with previous receiver name sm for SeriesMap (golint)
    • Line 46: warning: receiver name sm1 should be consistent with previous receiver name sm for SeriesMap (golint)
    • diamondb/pkg/storage/dynamodb/dynamodb_mock.go
    • Line 13: warning: comment on exported type MockDynamoDBAPI should be of the form "MockDynamoDBAPI ..." (with optional leading article) (golint)
    • Line 24: warning: exported function NewMockDynamoDBAPI should have comment or be unexported (golint)
    • Line 30: warning: exported method MockDynamoDBAPI.EXPECT should have comment or be unexported (golint)
    • Line 34: warning: exported method MockDynamoDBAPI.BatchGetItem should have comment or be unexported (golint)
    • Line 45: warning: exported method MockDynamoDBAPI.BatchGetItemWithContext should have comment or be unexported (golint)
    • Line 61: warning: exported method MockDynamoDBAPI.BatchGetItemRequest should have comment or be unexported (golint)
    • Line 72: warning: exported method MockDynamoDBAPI.BatchGetItemPages should have comment or be unexported (golint)
    • Line 82: warning: exported method MockDynamoDBAPI.BatchGetItemPagesWithContext should have comment or be unexported (golint)
    • Line 97: warning: exported method MockDynamoDBAPI.BatchWriteItem should have comment or be unexported (golint)
    • Line 108: warning: exported method MockDynamoDBAPI.BatchWriteItemWithContext should have comment or be unexported (golint)
    • Line 124: warning: exported method MockDynamoDBAPI.BatchWriteItemRequest should have comment or be unexported (golint)
    • Line 135: warning: exported method MockDynamoDBAPI.CreateTable should have comment or be unexported (golint)
    • Line 146: warning: exported method MockDynamoDBAPI.CreateTableWithContext should have comment or be unexported (golint)
    • Line 162: warning: exported method MockDynamoDBAPI.CreateTableRequest should have comment or be unexported (golint)
    • Line 173: warning: exported method MockDynamoDBAPI.DeleteItem should have comment or be unexported (golint)
    • Line 184: warning: exported method MockDynamoDBAPI.DeleteItemWithContext should have comment or be unexported (golint)
    • Line 200: warning: exported method MockDynamoDBAPI.DeleteItemRequest should have comment or be unexported (golint)
    • Line 211: warning: exported method MockDynamoDBAPI.DeleteTable should have comment or be unexported (golint)
    • Line 222: warning: exported method MockDynamoDBAPI.DeleteTableWithContext should have comment or be unexported (golint)
    • Line 238: warning: exported method MockDynamoDBAPI.DeleteTableRequest should have comment or be unexported (golint)
    • Line 249: warning: exported method MockDynamoDBAPI.DescribeLimits should have comment or be unexported (golint)
    • Line 260: warning: exported method MockDynamoDBAPI.DescribeLimitsWithContext should have comment or be unexported (golint)
    • Line 276: warning: exported method MockDynamoDBAPI.DescribeLimitsRequest should have comment or be unexported (golint)
    • Line 287: warning: exported method MockDynamoDBAPI.DescribeTable should have comment or be unexported (golint)
    • Line 298: warning: exported method MockDynamoDBAPI.DescribeTableWithContext should have comment or be unexported (golint)
    • Line 314: warning: exported method MockDynamoDBAPI.DescribeTableRequest should have comment or be unexported (golint)
    • Line 325: warning: exported method MockDynamoDBAPI.DescribeTimeToLive should have comment or be unexported (golint)
    • Line 336: warning: exported method MockDynamoDBAPI.DescribeTimeToLiveWithContext should have comment or be unexported (golint)
    • Line 352: warning: exported method MockDynamoDBAPI.DescribeTimeToLiveRequest should have comment or be unexported (golint)
    • Line 363: warning: exported method MockDynamoDBAPI.GetItem should have comment or be unexported (golint)
    • Line 374: warning: exported method MockDynamoDBAPI.GetItemWithContext should have comment or be unexported (golint)
    • Line 390: warning: exported method MockDynamoDBAPI.GetItemRequest should have comment or be unexported (golint)
    • Line 401: warning: exported method MockDynamoDBAPI.ListTables should have comment or be unexported (golint)
    • Line 412: warning: exported method MockDynamoDBAPI.ListTablesWithContext should have comment or be unexported (golint)
    • Line 428: warning: exported method MockDynamoDBAPI.ListTablesRequest should have comment or be unexported (golint)
    • Line 439: warning: exported method MockDynamoDBAPI.ListTablesPages should have comment or be unexported (golint)
    • Line 449: warning: exported method MockDynamoDBAPI.ListTablesPagesWithContext should have comment or be unexported (golint)
    • Line 464: warning: exported method MockDynamoDBAPI.ListTagsOfResource should have comment or be unexported (golint)
    • Line 475: warning: exported method MockDynamoDBAPI.ListTagsOfResourceWithContext should have comment or be unexported (golint)
    • Line 491: warning: exported method MockDynamoDBAPI.ListTagsOfResourceRequest should have comment or be unexported (golint)
    • Line 502: warning: exported method MockDynamoDBAPI.PutItem should have comment or be unexported (golint)
    • Line 513: warning: exported method MockDynamoDBAPI.PutItemWithContext should have comment or be unexported (golint)
    • Line 529: warning: exported method MockDynamoDBAPI.PutItemRequest should have comment or be unexported (golint)
    • Line 540: warning: exported method MockDynamoDBAPI.Query should have comment or be unexported (golint)
    • Line 551: warning: exported method MockDynamoDBAPI.QueryWithContext should have comment or be unexported (golint)
    • Line 567: warning: exported method MockDynamoDBAPI.QueryRequest should have comment or be unexported (golint)
    • Line 578: warning: exported method MockDynamoDBAPI.QueryPages should have comment or be unexported (golint)
    • Line 588: warning: exported method MockDynamoDBAPI.QueryPagesWithContext should have comment or be unexported (golint)
    • Line 603: warning: exported method MockDynamoDBAPI.Scan should have comment or be unexported (golint)
    • Line 614: warning: exported method MockDynamoDBAPI.ScanWithContext should have comment or be unexported (golint)
    • Line 630: warning: exported method MockDynamoDBAPI.ScanRequest should have comment or be unexported (golint)
    • Line 641: warning: exported method MockDynamoDBAPI.ScanPages should have comment or be unexported (golint)
    • Line 651: warning: exported method MockDynamoDBAPI.ScanPagesWithContext should have comment or be unexported (golint)
    • Line 666: warning: exported method MockDynamoDBAPI.TagResource should have comment or be unexported (golint)
    • Line 677: warning: exported method MockDynamoDBAPI.TagResourceWithContext should have comment or be unexported (golint)
    • Line 693: warning: exported method MockDynamoDBAPI.TagResourceRequest should have comment or be unexported (golint)
    • Line 704: warning: exported method MockDynamoDBAPI.UntagResource should have comment or be unexported (golint)
    • Line 715: warning: exported method MockDynamoDBAPI.UntagResourceWithContext should have comment or be unexported (golint)
    • Line 731: warning: exported method MockDynamoDBAPI.UntagResourceRequest should have comment or be unexported (golint)
    • Line 742: warning: exported method MockDynamoDBAPI.UpdateItem should have comment or be unexported (golint)
    • Line 753: warning: exported method MockDynamoDBAPI.UpdateItemWithContext should have comment or be unexported (golint)
    • Line 769: warning: exported method MockDynamoDBAPI.UpdateItemRequest should have comment or be unexported (golint)
    • Line 780: warning: exported method MockDynamoDBAPI.UpdateTable should have comment or be unexported (golint)
    • Line 791: warning: exported method MockDynamoDBAPI.UpdateTableWithContext should have comment or be unexported (golint)
    • Line 807: warning: exported method MockDynamoDBAPI.UpdateTableRequest should have comment or be unexported (golint)
    • Line 818: warning: exported method MockDynamoDBAPI.UpdateTimeToLive should have comment or be unexported (golint)
    • Line 829: warning: exported method MockDynamoDBAPI.UpdateTimeToLiveWithContext should have comment or be unexported (golint)
    • Line 845: warning: exported method MockDynamoDBAPI.UpdateTimeToLiveRequest should have comment or be unexported (golint)
    • Line 856: warning: exported method MockDynamoDBAPI.WaitUntilTableExists should have comment or be unexported (golint)
    • Line 866: warning: exported method MockDynamoDBAPI.WaitUntilTableExistsWithContext should have comment or be unexported (golint)
    • Line 881: warning: exported method MockDynamoDBAPI.WaitUntilTableNotExists should have comment or be unexported (golint)
    • Line 891: warning: exported method MockDynamoDBAPI.WaitUntilTableNotExistsWithContext should have comment or be unexported (golint)
    • diamondb/pkg/storage/testing.go
    • Line 16: warning: exported method FakeReadWriter.Fetch should have comment or be unexported (golint)
    • Line 20: warning: exported method FakeReadWriter.InsertMetric should have comment or be unexported (golint)
    • Line 20: warning: receiver name r should be consistent with previous receiver name s for FakeReadWriter (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!