Preparing report...

Report for github.com/slrtbtfs/promql-lsp

A+    Excellent!    Found 36 issues across 98 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!


gocyclo90%

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.


golint72%

Golint is a linter for Go source code.

    • promql-lsp/internal/vendored/go-tools/span/span.go
    • Line 53: warning: exported function New should have comment or be unexported (golint)
    • Line 59: warning: exported function NewPoint should have comment or be unexported (golint)
    • Line 65: warning: exported function Compare should have comment or be unexported (golint)
    • Line 75: warning: exported function ComparePoint should have comment or be unexported (golint)
    • Line 104: warning: exported method Span.HasPosition should have comment or be unexported (golint)
    • Line 105: warning: exported method Span.HasOffset should have comment or be unexported (golint)
    • Line 106: warning: exported method Span.IsValid should have comment or be unexported (golint)
    • Line 107: warning: exported method Span.IsPoint should have comment or be unexported (golint)
    • Line 108: warning: exported method Span.URI should have comment or be unexported (golint)
    • Line 109: warning: exported method Span.Start should have comment or be unexported (golint)
    • Line 110: warning: exported method Span.End should have comment or be unexported (golint)
    • Line 111: warning: exported method Span.MarshalJSON should have comment or be unexported (golint)
    • Line 112: warning: exported method Span.UnmarshalJSON should have comment or be unexported (golint)
    • Line 114: warning: exported method Point.HasPosition should have comment or be unexported (golint)
    • Line 115: warning: exported method Point.HasOffset should have comment or be unexported (golint)
    • Line 116: warning: exported method Point.IsValid should have comment or be unexported (golint)
    • Line 117: warning: exported method Point.MarshalJSON should have comment or be unexported (golint)
    • Line 118: warning: exported method Point.UnmarshalJSON should have comment or be unexported (golint)
    • Line 119: warning: exported method Point.Line should have comment or be unexported (golint)
    • Line 125: warning: exported method Point.Column should have comment or be unexported (golint)
    • Line 131: warning: exported method Point.Offset should have comment or be unexported (golint)
    • Line 220: warning: exported method Span.WithPosition should have comment or be unexported (golint)
    • Line 227: warning: exported method Span.WithOffset should have comment or be unexported (golint)
    • Line 234: warning: exported method Span.WithAll should have comment or be unexported (golint)
    • promql-lsp/internal/vendored/go-tools/telemetry/export/trace.go
    • Line 15: warning: exported type SpanContext should have comment or be unexported (golint)
    • Line 20: warning: exported type Span should have comment or be unexported (golint)
    • Line 37: warning: exported function GetSpan should have comment or be unexported (golint)
    • Line 85: warning: exported method SpanContext.Format should have comment or be unexported (golint)
    • Line 89: warning: exported method Span.Start should have comment or be unexported (golint)
    • Line 94: warning: exported method Span.Finish should have comment or be unexported (golint)
    • Line 100: warning: exported method Span.Events should have comment or be unexported (golint)
    • Line 106: warning: exported method Span.Format should have comment or be unexported (golint)
    • promql-lsp/internal/vendored/go-tools/telemetry/export/metric/data.go
    • Line 145: warning: exported method Int64Data.Handle should have comment or be unexported (golint)
    • Line 146: warning: exported method Int64Data.Groups should have comment or be unexported (golint)
    • Line 183: warning: exported method Float64Data.Handle should have comment or be unexported (golint)
    • Line 184: warning: exported method Float64Data.Groups should have comment or be unexported (golint)
    • Line 215: warning: exported method HistogramInt64Data.Handle should have comment or be unexported (golint)
    • Line 216: warning: exported method HistogramInt64Data.Groups should have comment or be unexported (golint)
    • Line 260: warning: exported method HistogramFloat64Data.Handle should have comment or be unexported (golint)
    • Line 261: warning: exported method HistogramFloat64Data.Groups should have comment or be unexported (golint)
    • promql-lsp/internal/vendored/go-tools/telemetry/event/event.go
    • Line 17: warning: exported const LogType should have comment (or a comment on this block) or be unexported (golint)
    • Line 49: warning: exported method Event.IsLog should have comment or be unexported (golint)
    • Line 50: warning: exported method Event.IsEndSpan should have comment or be unexported (golint)
    • Line 51: warning: exported method Event.IsStartSpan should have comment or be unexported (golint)
    • Line 52: warning: exported method Event.IsLabel should have comment or be unexported (golint)
    • Line 53: warning: exported method Event.IsDetach should have comment or be unexported (golint)
    • Line 54: warning: exported method Event.IsRecord should have comment or be unexported (golint)
    • Line 56: warning: exported method Event.Format should have comment or be unexported (golint)
    • Line 77: warning: exported method Event.Tags should have comment or be unexported (golint)
    • Line 83: warning: exported method Event.Map should have comment or be unexported (golint)
    • promql-lsp/internal/vendored/go-tools/jsonrpc2/wire.go
    • Line 97: warning: exported method VersionTag.MarshalJSON should have comment or be unexported (golint)
    • Line 101: warning: exported method VersionTag.UnmarshalJSON should have comment or be unexported (golint)
    • Line 125: warning: exported method ID.MarshalJSON should have comment or be unexported (golint)
    • Line 132: warning: exported method ID.UnmarshalJSON should have comment or be unexported (golint)
    • promql-lsp/internal/vendored/go-tools/telemetry/event/key.go
    • Line 47: warning: exported method ValueKey.Name should have comment or be unexported (golint)
    • Line 48: warning: exported method ValueKey.Description should have comment or be unexported (golint)
    • Line 75: warning: exported method IntKey.Name should have comment or be unexported (golint)
    • Line 76: warning: exported method IntKey.Description should have comment or be unexported (golint)
    • Line 103: warning: exported method Int8Key.Name should have comment or be unexported (golint)
    • Line 104: warning: exported method Int8Key.Description should have comment or be unexported (golint)
    • Line 131: warning: exported method Int16Key.Name should have comment or be unexported (golint)
    • Line 132: warning: exported method Int16Key.Description should have comment or be unexported (golint)
    • Line 159: warning: exported method Int32Key.Name should have comment or be unexported (golint)
    • Line 160: warning: exported method Int32Key.Description should have comment or be unexported (golint)
    • Line 187: warning: exported method Int64Key.Name should have comment or be unexported (golint)
    • Line 188: warning: exported method Int64Key.Description should have comment or be unexported (golint)
    • Line 215: warning: exported method UIntKey.Name should have comment or be unexported (golint)
    • Line 216: warning: exported method UIntKey.Description should have comment or be unexported (golint)
    • Line 243: warning: exported method UInt8Key.Name should have comment or be unexported (golint)
    • Line 244: warning: exported method UInt8Key.Description should have comment or be unexported (golint)
    • Line 271: warning: exported method UInt16Key.Name should have comment or be unexported (golint)
    • Line 272: warning: exported method UInt16Key.Description should have comment or be unexported (golint)
    • Line 299: warning: exported method UInt32Key.Name should have comment or be unexported (golint)
    • Line 300: warning: exported method UInt32Key.Description should have comment or be unexported (golint)
    • Line 327: warning: exported method UInt64Key.Name should have comment or be unexported (golint)
    • Line 328: warning: exported method UInt64Key.Description should have comment or be unexported (golint)
    • Line 355: warning: exported method Float32Key.Name should have comment or be unexported (golint)
    • Line 356: warning: exported method Float32Key.Description should have comment or be unexported (golint)
    • Line 387: warning: exported method Float64Key.Name should have comment or be unexported (golint)
    • Line 388: warning: exported method Float64Key.Description should have comment or be unexported (golint)
    • Line 419: warning: exported method StringKey.Name should have comment or be unexported (golint)
    • Line 420: warning: exported method StringKey.Description should have comment or be unexported (golint)
    • Line 447: warning: exported method BooleanKey.Name should have comment or be unexported (golint)
    • Line 448: warning: exported method BooleanKey.Description should have comment or be unexported (golint)
    • Line 481: warning: exported method ErrorKey.Name should have comment or be unexported (golint)
    • Line 482: warning: exported method ErrorKey.Description should have comment or be unexported (golint)
    • promql-lsp/internal/vendored/go-tools/telemetry/export/ocagent/wire/common.go
    • Line 9: warning: exported type Node should have comment or be unexported (golint)
    • Line 16: warning: exported type Resource should have comment or be unexported (golint)
    • Line 21: warning: exported type TruncatableString should have comment or be unexported (golint)
    • Line 26: warning: exported type Attributes should have comment or be unexported (golint)
    • Line 31: warning: exported type StringAttribute should have comment or be unexported (golint)
    • Line 35: warning: exported type IntAttribute should have comment or be unexported (golint)
    • Line 39: warning: exported type BoolAttribute should have comment or be unexported (golint)
    • Line 43: warning: exported type DoubleAttribute should have comment or be unexported (golint)
    • Line 47: warning: exported type Attribute should have comment or be unexported (golint)
    • Line 56: warning: exported type StackTrace should have comment or be unexported (golint)
    • Line 61: warning: exported type StackFrames should have comment or be unexported (golint)
    • Line 66: warning: exported type StackFrame should have comment or be unexported (golint)
    • Line 76: warning: exported type Module should have comment or be unexported (golint)
    • Line 81: warning: exported type ProcessIdentifier should have comment or be unexported (golint)
    • Line 87: warning: exported type LibraryInfo should have comment or be unexported (golint)
    • Line 93: warning: exported type Language should have comment or be unexported (golint)
    • Line 96: warning: exported const LanguageGo should have comment (or a comment on this block) or be unexported (golint)
    • Line 99: warning: exported type ServiceInfo should have comment or be unexported (golint)
    • promql-lsp/internal/vendored/go-tools/telemetry/event/tag.go
    • Line 117: warning: exported method TagIterator.Valid should have comment or be unexported (golint)
    • Line 121: warning: exported method TagIterator.Advance should have comment or be unexported (golint)
    • Line 125: warning: exported method TagIterator.Tag should have comment or be unexported (golint)
    • Line 211: warning: exported function NewTagIterator should have comment or be unexported (golint)
    • Line 222: warning: exported function Filter should have comment or be unexported (golint)
    • Line 234: warning: exported function ChainTagIterators should have comment or be unexported (golint)
    • Line 250: warning: exported function NewTagMap should have comment or be unexported (golint)
    • Line 254: warning: exported function MergeTagMaps should have comment or be unexported (golint)
    • promql-lsp/internal/vendored/go-tools/telemetry/export/ocagent/wire/metrics.go
    • Line 12: warning: exported type ExportMetricsServiceRequest should have comment or be unexported (golint)
    • Line 18: warning: exported type Metric should have comment or be unexported (golint)
    • Line 24: warning: exported type MetricDescriptor should have comment or be unexported (golint)
    • Line 32: warning: don't use underscores in Go names; type MetricDescriptor_Type should be MetricDescriptorType (golint)
    • Line 32: warning: exported type MetricDescriptor_Type should have comment or be unexported (golint)
    • Line 35: warning: don't use underscores in Go names; const MetricDescriptor_UNSPECIFIED should be MetricDescriptorUNSPECIFIED (golint)
    • Line 35: warning: exported const MetricDescriptor_UNSPECIFIED should have comment (or a comment on this block) or be unexported (golint)
    • Line 36: warning: don't use underscores in Go names; const MetricDescriptor_GAUGE_INT64 should be MetricDescriptorGAUGEINT64 (golint)
    • Line 37: warning: don't use underscores in Go names; const MetricDescriptor_GAUGE_DOUBLE should be MetricDescriptorGAUGEDOUBLE (golint)
    • Line 38: warning: don't use underscores in Go names; const MetricDescriptor_GAUGE_DISTRIBUTION should be MetricDescriptorGAUGEDISTRIBUTION (golint)
    • Line 39: warning: don't use underscores in Go names; const MetricDescriptor_CUMULATIVE_INT64 should be MetricDescriptorCUMULATIVEINT64 (golint)
    • Line 40: warning: don't use underscores in Go names; const MetricDescriptor_CUMULATIVE_DOUBLE should be MetricDescriptorCUMULATIVEDOUBLE (golint)
    • Line 41: warning: don't use underscores in Go names; const MetricDescriptor_CUMULATIVE_DISTRIBUTION should be MetricDescriptorCUMULATIVEDISTRIBUTION (golint)
    • Line 42: warning: don't use underscores in Go names; const MetricDescriptor_SUMMARY should be MetricDescriptorSUMMARY (golint)
    • Line 45: warning: exported type LabelKey should have comment or be unexported (golint)
    • Line 50: warning: exported type TimeSeries should have comment or be unexported (golint)
    • Line 56: warning: exported type LabelValue should have comment or be unexported (golint)
    • Line 61: warning: exported type Point should have comment or be unexported (golint)
    • Line 66: warning: exported type PointInt64Value should have comment or be unexported (golint)
    • Line 112: warning: exported type PointDoubleValue should have comment or be unexported (golint)
    • Line 116: warning: exported type PointDistributionValue should have comment or be unexported (golint)
    • Line 120: warning: exported type PointSummaryValue should have comment or be unexported (golint)
    • Line 124: warning: exported type PointValue should have comment or be unexported (golint)
    • Line 133: warning: exported type DistributionValue should have comment or be unexported (golint)
    • Line 141: warning: exported type BucketOptionsExplicit should have comment or be unexported (golint)
    • Line 145: warning: exported type BucketOptions should have comment or be unexported (golint)
    • Line 172: warning: exported type Bucket should have comment or be unexported (golint)
    • Line 177: warning: exported type Exemplar should have comment or be unexported (golint)
    • Line 183: warning: exported type SummaryValue should have comment or be unexported (golint)
    • Line 189: warning: exported type Snapshot should have comment or be unexported (golint)
    • Line 195: warning: exported type SnapshotValueAtPercentile should have comment or be unexported (golint)
    • promql-lsp/internal/vendored/go-tools/lsp/protocol/span.go
    • Line 16: warning: exported type ColumnMapper should have comment or be unexported (golint)
    • Line 22: warning: exported function URIFromSpanURI should have comment or be unexported (golint)
    • Line 26: warning: exported function URIFromPath should have comment or be unexported (golint)
    • Line 30: warning: exported method DocumentURI.SpanURI should have comment or be unexported (golint)
    • Line 34: warning: exported method ColumnMapper.Location should have comment or be unexported (golint)
    • Line 42: warning: exported method ColumnMapper.Range should have comment or be unexported (golint)
    • Line 61: warning: exported method ColumnMapper.Position should have comment or be unexported (golint)
    • Line 72: warning: exported method ColumnMapper.Span should have comment or be unexported (golint)
    • Line 76: warning: exported method ColumnMapper.RangeSpan should have comment or be unexported (golint)
    • Line 88: warning: exported method ColumnMapper.PointSpan should have comment or be unexported (golint)
    • Line 96: warning: exported method ColumnMapper.Point should have comment or be unexported (golint)
    • Line 106: warning: exported function IsPoint should have comment or be unexported (golint)
    • Line 110: warning: exported function CompareRange should have comment or be unexported (golint)
    • Line 117: warning: exported function ComparePosition should have comment or be unexported (golint)
    • Line 133: warning: exported method Range.Format should have comment or be unexported (golint)
    • promql-lsp/internal/vendored/go-tools/jsonrpc2/handler.go
    • Line 57: warning: exported type EmptyHandler should have comment or be unexported (golint)
    • Line 59: warning: exported method EmptyHandler.Deliver should have comment or be unexported (golint)
    • Line 63: warning: exported method EmptyHandler.Cancel should have comment or be unexported (golint)
    • Line 67: warning: exported method EmptyHandler.Request should have comment or be unexported (golint)
    • Line 71: warning: exported method EmptyHandler.Response should have comment or be unexported (golint)
    • promql-lsp/internal/vendored/go-tools/lsp/debug/tag/tag.go
    • Line 13: warning: comment on exported var Method should be of the form "Method ..." (golint)
    • Line 15: warning: exported var StatusCode should have comment or be unexported (golint)
    • Line 38: warning: comment on exported var Started should be of the form "Started ..." (golint)
    • Line 40: warning: exported var ReceivedBytes should have comment or be unexported (golint)
    • Line 46: warning: exported const Inbound should have comment (or a comment on this block) or be unexported (golint)
    • promql-lsp/internal/vendored/go-tools/lsp/protocol/enums.go
    • Line 144: warning: exported method TextDocumentSyncKind.Format should have comment or be unexported (golint)
    • Line 148: warning: exported function ParseTextDocumentSyncKind should have comment or be unexported (golint)
    • Line 152: warning: exported method InitializeError.Format should have comment or be unexported (golint)
    • Line 156: warning: exported function ParseInitializeError should have comment or be unexported (golint)
    • Line 160: warning: exported method MessageType.Format should have comment or be unexported (golint)
    • Line 164: warning: exported function ParseMessageType should have comment or be unexported (golint)
    • Line 168: warning: exported method FileChangeType.Format should have comment or be unexported (golint)
    • Line 172: warning: exported function ParseFileChangeType should have comment or be unexported (golint)
    • Line 176: warning: exported method WatchKind.Format should have comment or be unexported (golint)
    • Line 180: warning: exported function ParseWatchKind should have comment or be unexported (golint)
    • Line 184: warning: exported method CompletionTriggerKind.Format should have comment or be unexported (golint)
    • Line 188: warning: exported function ParseCompletionTriggerKind should have comment or be unexported (golint)
    • Line 192: warning: exported method DiagnosticSeverity.Format should have comment or be unexported (golint)
    • Line 196: warning: exported function ParseDiagnosticSeverity should have comment or be unexported (golint)
    • Line 200: warning: exported method DiagnosticTag.Format should have comment or be unexported (golint)
    • Line 204: warning: exported function ParseDiagnosticTag should have comment or be unexported (golint)
    • Line 208: warning: exported method CompletionItemKind.Format should have comment or be unexported (golint)
    • Line 212: warning: exported function ParseCompletionItemKind should have comment or be unexported (golint)
    • Line 216: warning: exported method InsertTextFormat.Format should have comment or be unexported (golint)
    • Line 220: warning: exported function ParseInsertTextFormat should have comment or be unexported (golint)
    • Line 224: warning: exported method DocumentHighlightKind.Format should have comment or be unexported (golint)
    • Line 228: warning: exported function ParseDocumentHighlightKind should have comment or be unexported (golint)
    • Line 232: warning: exported method SymbolKind.Format should have comment or be unexported (golint)
    • Line 236: warning: exported function ParseSymbolKind should have comment or be unexported (golint)
    • Line 240: warning: exported method TextDocumentSaveReason.Format should have comment or be unexported (golint)
    • Line 244: warning: exported function ParseTextDocumentSaveReason should have comment or be unexported (golint)
    • promql-lsp/internal/vendored/go-tools/telemetry/export/ocagent/wire/trace.go
    • Line 7: warning: exported type ExportTraceServiceRequest should have comment or be unexported (golint)
    • Line 13: warning: exported type Span should have comment or be unexported (golint)
    • Line 32: warning: exported type TraceState should have comment or be unexported (golint)
    • Line 36: warning: exported type TraceStateEntry should have comment or be unexported (golint)
    • Line 41: warning: exported type SpanKind should have comment or be unexported (golint)
    • Line 44: warning: exported const UnspecifiedSpanKind should have comment (or a comment on this block) or be unexported (golint)
    • Line 49: warning: exported type TimeEvents should have comment or be unexported (golint)
    • Line 55: warning: exported type TimeEvent should have comment or be unexported (golint)
    • Line 61: warning: exported type Annotation should have comment or be unexported (golint)
    • Line 66: warning: exported type MessageEvent should have comment or be unexported (golint)
    • Line 73: warning: exported type MessageEventType should have comment or be unexported (golint)
    • Line 76: warning: exported const UnspecifiedMessageEvent should have comment (or a comment on this block) or be unexported (golint)
    • Line 81: warning: exported type TimeEventValue should have comment or be unexported (golint)
    • Line 88: warning: exported type Links should have comment or be unexported (golint)
    • Line 93: warning: exported type Link should have comment or be unexported (golint)
    • Line 101: warning: exported type LinkType should have comment or be unexported (golint)
    • Line 104: warning: exported const UnspecifiedLinkType should have comment (or a comment on this block) or be unexported (golint)
    • Line 109: warning: exported type Status should have comment or be unexported (golint)

license100%

Checks whether your project has a LICENSE file.

No problems detected. Good job!


ineffassign96%

IneffAssign detects ineffectual assignments in Go code.

    • promql-lsp/langserver/hover.go
    • Line 33: warning: no required module provides package github.com/prometheus-community/promql-langserver/langserver/documentation/functions_statik; to add it: (ineffassign)
    • Line 33: warning: could not import github.com/prometheus-community/promql-langserver/langserver/documentation/functions_statik (invalid package name: "") (ineffassign)
    • Line 33: warning: could not import github.com/prometheus-community/promql-langserver/langserver/documentation/functions_statik (invalid package name: "") (ineffassign)
    • /home/shawn/mygo/src/github.com/gojp/goreportcard/_repos/src/github.com/slrtbtfs/promql-lsp/langserver/hover.go
    • Line 33: warning: no required module provides package github.com/prometheus-community/promql-langserver/langserver/documentation/functions_statik; to add it: (ineffassign)
    • Line 33: warning: could not import github.com/prometheus-community/promql-langserver/langserver/documentation/functions_statik (invalid package name: "") (ineffassign)
    • Line 33: warning: no required module provides package github.com/prometheus-community/promql-langserver/langserver/documentation/functions_statik; to add it: (ineffassign)
    • Line 33: warning: could not import github.com/prometheus-community/promql-langserver/langserver/documentation/functions_statik (invalid package name: "") (ineffassign)

misspell97%

Misspell Finds commonly misspelled English words