Preparing report...

Report for github.com/improbable-eng/thanos

A+    Excellent!    Found 132 issues across 322 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!


gocyclo89%

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.

    • thanos/pkg/block/index.go
    • Line 205: warning: cyclomatic complexity 28 of function GatherIndexHealthStats() is high (> 15) (gocyclo)
    • Line 531: warning: cyclomatic complexity 19 of function rewrite() is high (> 15) (gocyclo)
    • thanos/cmd/thanos/rule.go
    • Line 253: warning: cyclomatic complexity 41 of function runRule() is high (> 15) (gocyclo)
    • Line 97: warning: cyclomatic complexity 18 of function registerRule() is high (> 15) (gocyclo)
    • thanos/pkg/receive/handler.go
    • Line 412: warning: cyclomatic complexity 25 of function (*Handler).fanoutForward() is high (> 15) (gocyclo)
    • Line 280: warning: cyclomatic complexity 16 of function (*Handler).receiveHTTP() is high (> 15) (gocyclo)
    • thanos/pkg/store/bucket.go
    • Line 951: warning: cyclomatic complexity 23 of function (*BucketStore).Series() is high (> 15) (gocyclo)
    • Line 1281: warning: cyclomatic complexity 22 of function (*BucketStore).LabelValues() is high (> 15) (gocyclo)
    • Line 843: warning: cyclomatic complexity 20 of function populateChunk() is high (> 15) (gocyclo)
    • Line 1162: warning: cyclomatic complexity 20 of function (*BucketStore).LabelNames() is high (> 15) (gocyclo)
    • Line 1741: warning: cyclomatic complexity 19 of function (*bucketIndexReader).ExpandedPostings() is high (> 15) (gocyclo)
    • Line 2448: warning: cyclomatic complexity 17 of function (*bucketChunkReader).loadChunks() is high (> 15) (gocyclo)
    • thanos/pkg/block/fetcher.go
    • Line 309: warning: cyclomatic complexity 20 of function (*BaseFetcher).fetchMetadata() is high (> 15) (gocyclo)
    • Line 225: warning: cyclomatic complexity 16 of function (*BaseFetcher).loadMeta() is high (> 15) (gocyclo)
    • thanos/pkg/compact/compact.go
    • Line 688: warning: cyclomatic complexity 29 of function (*Group).compact() is high (> 15) (gocyclo)
    • Line 886: warning: cyclomatic complexity 22 of function (*BucketCompactor).Compact() is high (> 15) (gocyclo)

golint63%

Golint is a linter for Go source code.

    • thanos/pkg/compactv2/modifiers.go
    • Line 17: warning: exported type Modifier should have comment or be unexported (golint)
    • Line 21: warning: exported type DeletionModifier should have comment or be unexported (golint)
    • Line 25: warning: exported function WithDeletionModifier should have comment or be unexported (golint)
    • Line 29: warning: exported method DeletionModifier.Modify should have comment or be unexported (golint)
    • Line 159: warning: exported function NewDelGenericSeriesIterator should have comment or be unexported (golint)
    • thanos/pkg/rules/manager.go
    • Line 36: warning: exported type Group should have comment or be unexported (golint)
    • Line 96: warning: exported function ActiveAlertsToProto should have comment or be unexported (golint)
    • Line 160: warning: exported method Manager.Stop should have comment or be unexported (golint)
    • Line 175: warning: exported method Manager.RuleGroups should have comment or be unexported (golint)
    • Line 191: warning: exported method Manager.Active should have comment or be unexported (golint)
    • thanos/pkg/targets/targets.go
    • Line 32: warning: exported function NewGRPCClient should have comment or be unexported (golint)
    • Line 36: warning: exported function NewGRPCClientWithDedup should have comment or be unexported (golint)
    • Line 48: warning: exported method GRPCClient.Targets should have comment or be unexported (golint)
    • thanos/pkg/objstore/client/factory.go
    • Line 26: warning: exported type ObjProvider should have comment or be unexported (golint)
    • Line 29: warning: exported const FILESYSTEM should have comment (or a comment on this block) or be unexported (golint)
    • Line 38: warning: exported type BucketConfig should have comment or be unexported (golint)
    • thanos/pkg/metadata/metadata.go
    • Line 29: warning: exported function NewGRPCClient should have comment or be unexported (golint)
    • Line 35: warning: exported method GRPCClient.MetricMetadata should have comment or be unexported (golint)
    • thanos/pkg/logging/yaml_parser.go
    • Line 6: warning: exported type RequestConfig should have comment or be unexported (golint)
    • Line 12: warning: exported type HTTPProtocolConfigs should have comment or be unexported (golint)
    • Line 17: warning: exported type GRPCProtocolConfigs should have comment or be unexported (golint)
    • Line 22: warning: exported type OptionsConfig should have comment or be unexported (golint)
    • Line 27: warning: exported type DecisionConfig should have comment or be unexported (golint)
    • Line 32: warning: exported type HTTPProtocolConfig should have comment or be unexported (golint)
    • Line 37: warning: exported type GRPCProtocolConfig should have comment or be unexported (golint)
    • thanos/pkg/block/writer.go
    • Line 49: warning: exported type DiskWriter should have comment or be unexported (golint)
    • Line 102: warning: exported method DiskWriter.Flush should have comment or be unexported (golint)
    • thanos/pkg/api/api.go
    • Line 46: warning: exported const StatusSuccess should have comment (or a comment on this block) or be unexported (golint)
    • Line 50: warning: exported type ErrorType should have comment or be unexported (golint)
    • Line 53: warning: exported const ErrorNone should have comment (or a comment on this block) or be unexported (golint)
    • Line 78: warning: exported var BuildInfo should have comment or be unexported (golint)
    • Line 87: warning: exported type ApiError should have comment or be unexported (golint)
    • Line 124: warning: exported type ApiFunc should have comment or be unexported (golint)
    • Line 126: warning: exported type BaseAPI should have comment or be unexported (golint)
    • Line 175: warning: exported function GetRuntimeInfoFunc should have comment or be unexported (golint)
    • Line 196: warning: exported type InstrFunc should have comment or be unexported (golint)
    • Line 198: warning: comment on exported function GetInstr should be of the form "GetInstr ..." (golint)
    • Line 233: warning: exported function Respond should have comment or be unexported (golint)
    • Line 250: warning: exported function RespondError should have comment or be unexported (golint)
    • thanos/pkg/dedup/iter.go
    • Line 25: warning: exported function NewSeriesSet should have comment or be unexported (golint)
    • Line 345: warning: exported function NewBoundedSeriesIterator should have comment or be unexported (golint)
    • thanos/pkg/store/cache/inmemory.go
    • Line 25: warning: exported var DefaultInMemoryIndexCacheConfig should have comment or be unexported (golint)
    • Line 33: warning: exported type InMemoryIndexCache should have comment or be unexported (golint)
    • thanos/pkg/extkingpin/app.go
    • Line 20: warning: exported const UsageTemplate should have comment or be unexported (golint)
    • Line 66: warning: exported type FlagClause should have comment or be unexported (golint)
    • Line 70: warning: comment on exported type SetupFunc should be of the form "SetupFunc ..." (with optional leading article) (golint)
    • Line 73: warning: exported type AppClause should have comment or be unexported (golint)
    • Line 104: warning: exported method App.Parse should have comment or be unexported (golint)
    • Line 114: warning: exported method App.Command should have comment or be unexported (golint)
    • thanos/pkg/block/index.go
    • Line 41: warning: exported type HealthStats should have comment or be unexported (golint)
    • Line 443: warning: exported function IgnoreCompleteOutsideChunk should have comment or be unexported (golint)
    • Line 451: warning: exported function IgnoreIssue347OutsideChunk should have comment or be unexported (golint)
    • Line 459: warning: exported function IgnoreDuplicateOutsideChunk should have comment or be unexported (golint)
    • thanos/pkg/rules/proxy.go
    • Line 28: warning: exported function RegisterRulesServer should have comment or be unexported (golint)
    • Line 42: warning: exported method Proxy.Rules should have comment or be unexported (golint)
    • thanos/pkg/store/storepb/custom.go
    • Line 19: warning: exported var PartialResponseStrategyValues should have comment or be unexported (golint)
    • Line 28: warning: exported function NewWarnSeriesResponse should have comment or be unexported (golint)
    • Line 36: warning: exported function NewSeriesResponse should have comment or be unexported (golint)
    • Line 44: warning: exported function NewHintsSeriesResponse should have comment or be unexported (golint)
    • Line 316: warning: exported method PartialResponseStrategy.UnmarshalJSON should have comment or be unexported (golint)
    • Line 336: warning: exported method PartialResponseStrategy.MarshalJSON should have comment or be unexported (golint)
    • Line 418: warning: exported method LabelMatcher.PromString should have comment or be unexported (golint)
    • Line 422: warning: exported method LabelMatcher_Type.PromString should have comment or be unexported (golint)
    • Line 440: warning: comment on exported type Label should be of the form "Label ..." (with optional leading article) (golint)
    • Line 444: warning: comment on exported type LabelSet should be of the form "LabelSet ..." (with optional leading article) (golint)
    • Line 448: warning: comment on exported function CompareLabels should be of the form "CompareLabels ..." (golint)
    • Line 454: warning: comment on exported function LabelsToPromLabelsUnsafe should be of the form "LabelsToPromLabelsUnsafe ..." (golint)
    • thanos/pkg/objstore/testing.go
    • Line 20: warning: exported function CreateTemporaryTestBucketName should have comment or be unexported (golint)
    • Line 34: warning: context.Context should be the first parameter of a function (golint)
    • Line 66: warning: exported function WithNoopInstr should have comment or be unexported (golint)
    • Line 82: warning: exported function AcceptanceTest should have comment or be unexported (golint)
    • thanos/pkg/block/indexheader/binary_reader.go
    • Line 289: warning: exported type FileWriter should have comment or be unexported (golint)
    • Line 296: warning: comment on exported function NewFileWriter should be of the form "NewFileWriter ..." (golint)
    • Line 310: warning: exported method FileWriter.Pos should have comment or be unexported (golint)
    • Line 332: warning: exported method FileWriter.Flush should have comment or be unexported (golint)
    • Line 336: warning: exported method FileWriter.WriteAt should have comment or be unexported (golint)
    • Line 358: warning: exported method FileWriter.Close should have comment or be unexported (golint)
    • Line 368: warning: exported method FileWriter.Remove should have comment or be unexported (golint)
    • Line 424: warning: exported type BinaryReader should have comment or be unexported (golint)
    • Line 651: warning: exported method BinaryReader.IndexVersion should have comment or be unexported (golint)
    • Line 655: warning: comment on exported method BinaryReader.PostingsOffset should be of the form "PostingsOffset ..." (golint)
    • Line 815: warning: exported method BinaryReader.LookupSymbol should have comment or be unexported (golint)
    • Line 848: warning: exported method BinaryReader.LabelValues should have comment or be unexported (golint)
    • Line 904: warning: exported method BinaryReader.LabelNames should have comment or be unexported (golint)
    • Line 918: warning: exported method BinaryReader.Close should have comment or be unexported (golint)
    • thanos/pkg/logging/http.go
    • Line 19: warning: exported type HTTPServerMiddleware should have comment or be unexported (golint)
    • Line 38: warning: exported method HTTPServerMiddleware.HTTPMiddleware should have comment or be unexported (golint)
    • thanos/pkg/logging/options.go
    • Line 74: warning: comment on exported type Option should be of the form "Option ..." (with optional leading article) (golint)
    • Line 163: warning: comment on exported function ParseHTTPOptions should be of the form "ParseHTTPOptions ..." (golint)
    • Line 190: warning: comment on exported function ParsegRPCOptions should be of the form "ParsegRPCOptions ..." (golint)
    • thanos/pkg/queryfrontend/config.go
    • Line 24: warning: exported type ResponseCacheProvider should have comment or be unexported (golint)
    • Line 27: warning: exported const INMEMORY should have comment (or a comment on this block) or be unexported (golint)
    • thanos/pkg/exemplars/exemplarspb/custom.go
    • Line 53: warning: exported function NewExemplarsResponse should have comment or be unexported (golint)
    • Line 61: warning: exported function NewWarningExemplarsResponse should have comment or be unexported (golint)
    • Line 74: warning: exported method ExemplarData.SetSeriesLabels should have comment or be unexported (golint)
    • Line 74: warning: receiver name s should be consistent with previous receiver name s1 for ExemplarData (golint)
    • Line 85: warning: receiver name e1 should be consistent with previous receiver name m for Exemplar (golint)
    • thanos/test/e2e/e2ethanos/services.go
    • Line 39: warning: comment on exported function DefaultPrometheusImage should be of the form "DefaultPrometheusImage ..." (golint)
    • Line 44: warning: exported function DefaultAlertmanagerImage should have comment or be unexported (golint)
    • Line 58: warning: exported function NewPrometheus should have comment or be unexported (golint)
    • Line 89: warning: exported function NewPrometheusWithSidecar should have comment or be unexported (golint)
    • Line 118: warning: exported function NewQuerier should have comment or be unexported (golint)
    • Line 198: warning: exported function RemoteWriteEndpoint should have comment or be unexported (golint)
    • Line 200: warning: exported function NewReceiver should have comment or be unexported (golint)
    • Line 245: warning: exported function NewReceiverWithConfigWatcher should have comment or be unexported (golint)
    • Line 295: warning: exported function NewRuler should have comment or be unexported (golint)
    • Line 343: warning: exported function NewAlertmanager should have comment or be unexported (golint)
    • Line 382: warning: exported function NewStoreGW should have comment or be unexported (golint)
    • Line 427: warning: exported function NewCompactor should have comment or be unexported (golint)
    • Line 467: warning: exported function NewQueryFrontend should have comment or be unexported (golint)
    • Line 494: warning: exported function NewMemcached should have comment or be unexported (golint)
    • Line 508: warning: exported function NewToolsBucketWeb should have comment or be unexported (golint)
    • thanos/pkg/store/labelpb/label.go
    • Line 83: warning: exported method ZLabel.MarshalTo should have comment or be unexported (golint)
    • Line 88: warning: exported method ZLabel.MarshalToSizedBuffer should have comment or be unexported (golint)
    • Line 215: warning: exported method ZLabel.UnmarshalJSON should have comment or be unexported (golint)
    • Line 224: warning: exported method ZLabel.Marshal should have comment or be unexported (golint)
    • Line 229: warning: exported method ZLabel.MarshalJSON should have comment or be unexported (golint)
    • Line 283: warning: exported function PromLabelSetsToString should have comment or be unexported (golint)
    • Line 292: warning: exported method ZLabelSet.UnmarshalJSON should have comment or be unexported (golint)
    • Line 302: warning: exported method ZLabelSet.MarshalJSON should have comment or be unexported (golint)
    • thanos/pkg/model/units.go
    • Line 14: warning: exported method Bytes.UnmarshalYAML should have comment or be unexported (golint)
    • Line 30: warning: exported method Bytes.MarshalYAML should have comment or be unexported (golint)
    • thanos/pkg/compactv2/compactor.go
    • Line 23: warning: exported type ProgressLogger should have comment or be unexported (golint)
    • Line 34: warning: exported function NewProgressLogger should have comment or be unexported (golint)
    • Line 45: warning: exported type Compactor should have comment or be unexported (golint)
    • Line 60: warning: exported function New should have comment or be unexported (golint)
    • Line 69: warning: exported function NewDryRun should have comment or be unexported (golint)
    • Line 75: warning: comment on exported method Compactor.WriteSeries should be of the form "WriteSeries ..." (golint)
    • thanos/pkg/ui/query.go
    • Line 23: warning: exported type Query should have comment or be unexported (golint)
    • Line 35: warning: exported function NewQueryUI should have comment or be unexported (golint)
    • thanos/pkg/verifier/verify.go
    • Line 22: warning: exported type Verifier should have comment or be unexported (golint)
    • Line 27: warning: exported type VerifierRepairer should have comment or be unexported (golint)
    • Line 65: warning: exported type Registry should have comment or be unexported (golint)
    • Line 70: warning: exported method Registry.VerifiersIDs should have comment or be unexported (golint)
    • Line 78: warning: exported method Registry.VerifierRepairersIDs should have comment or be unexported (golint)
    • Line 86: warning: exported method Registry.SubstractByIDs should have comment or be unexported (golint)
    • Line 113: warning: comment on exported function NewManager should be of the form "NewManager ..." (golint)
    • thanos/pkg/promclient/promclient.go
    • Line 5: warning: package comment is detached; there should be no blank lines between it and the package statement (golint)
    • Line 45: warning: exported var ErrFlagEndpointNotFound should have comment or be unexported (golint)
    • Line 57: warning: exported const SUCCESS should have comment (or a comment on this block) or be unexported (golint)
    • Line 192: warning: exported type Flags should have comment or be unexported (golint)
    • Line 357: warning: exported type QueryOptions should have comment or be unexported (golint)
    • Line 363: warning: exported method QueryOptions.AddTo should have comment or be unexported (golint)
    • Line 708: warning: comment on exported method Client.LabelNamesInGRPC should be of the form "LabelNamesInGRPC ..." (golint)
    • Line 820: warning: exported method Client.TargetsInGRPC should have comment or be unexported (golint)
    • thanos/pkg/objstore/swift/swift.go
    • Line 30: warning: comment on exported const SegmentsDir should be of the form "SegmentsDir ..." (golint)
    • Line 34: warning: exported var DefaultConfig should have comment or be unexported (golint)
    • Line 42: warning: exported type Config should have comment or be unexported (golint)
    • Line 133: warning: exported type Container should have comment or be unexported (golint)
    • Line 142: warning: exported function NewContainer should have comment or be unexported (golint)
    • Line 166: warning: exported function NewContainerFromConfig should have comment or be unexported (golint)
    • Line 244: warning: exported method Container.GetRange should have comment or be unexported (golint)
    • Line 327: warning: exported method Container.Close should have comment or be unexported (golint)
    • thanos/pkg/store/cache/caching_bucket.go
    • Line 106: warning: exported method CachingBucket.Name should have comment or be unexported (golint)
    • Line 110: warning: exported method CachingBucket.WithExpectedErrs should have comment or be unexported (golint)
    • Line 122: warning: exported method CachingBucket.ReaderWithExpectedErrs should have comment or be unexported (golint)
    • Line 126: warning: exported method CachingBucket.Iter should have comment or be unexported (golint)
    • Line 171: warning: exported method CachingBucket.Exists should have comment or be unexported (golint)
    • Line 213: warning: exported method CachingBucket.Get should have comment or be unexported (golint)
    • Line 262: warning: exported method CachingBucket.IsObjNotFoundErr should have comment or be unexported (golint)
    • Line 266: warning: exported method CachingBucket.GetRange should have comment or be unexported (golint)
    • Line 279: warning: exported method CachingBucket.Attributes should have comment or be unexported (golint)
    • Line 614: warning: exported method JSONIterCodec.Encode should have comment or be unexported (golint)
    • Line 618: warning: exported method JSONIterCodec.Decode should have comment or be unexported (golint)
    • thanos/pkg/ui/rule.go
    • Line 24: warning: exported type Rule should have comment or be unexported (golint)
    • Line 34: warning: exported function NewRuleUI should have comment or be unexported (golint)
    • Line 159: warning: exported method Rule.Register should have comment or be unexported (golint)
    • Line 184: warning: exported type AlertByStateCount should have comment or be unexported (golint)
    • thanos/pkg/discovery/dns/miekgdns/resolver.go
    • Line 22: warning: exported method Resolver.LookupSRV should have comment or be unexported (golint)
    • Line 52: warning: exported method Resolver.LookupIPAddr should have comment or be unexported (golint)
    • Line 76: warning: exported method Resolver.IsNotFound should have comment or be unexported (golint)
    • thanos/pkg/metadata/metadatapb/custom.go
    • Line 10: warning: exported function NewMetricMetadataResponse should have comment or be unexported (golint)
    • Line 18: warning: exported function NewWarningMetadataResponse should have comment or be unexported (golint)
    • Line 26: warning: exported function FromMetadataMap should have comment or be unexported (golint)
    • thanos/pkg/compact/downsample/aggr.go
    • Line 44: warning: exported method AggrChunk.Bytes should have comment or be unexported (golint)
    • Line 48: warning: exported method AggrChunk.Appender should have comment or be unexported (golint)
    • Line 52: warning: exported method AggrChunk.Iterator should have comment or be unexported (golint)
    • Line 56: warning: exported method AggrChunk.NumSamples should have comment or be unexported (golint)
    • Line 67: warning: exported method AggrChunk.Encoding should have comment or be unexported (golint)
    • Line 71: warning: exported method AggrChunk.Compact should have comment or be unexported (golint)
    • thanos/pkg/objstore/objstore.go
    • Line 25: warning: exported const OpIter should have comment (or a comment on this block) or be unexported (golint)
    • Line 89: warning: comment on exported type InstrumentedBucketReader should be of the form "InstrumentedBucketReader ..." (with optional leading article) (golint)
    • Line 112: warning: exported function ApplyIterOptions should have comment or be unexported (golint)
    • Line 120: warning: exported type ObjectAttributes should have comment or be unexported (golint)
    • thanos/pkg/ui/ui.go
    • Line 42: warning: exported type BaseUI should have comment or be unexported (golint)
    • Line 51: warning: exported function NewBaseUI should have comment or be unexported (golint)
    • thanos/pkg/discovery/dns/provider.go
    • Line 36: warning: exported type ResolverType should have comment or be unexported (golint)
    • Line 39: warning: exported const GolangResolverType should have comment (or a comment on this block) or be unexported (golint)
    • Line 43: warning: exported method ResolverType.ToResolver should have comment or be unexported (golint)
    • thanos/pkg/query/storeset.go
    • Line 37: warning: exported type StoreSpec should have comment or be unexported (golint)
    • Line 51: warning: exported type RuleSpec should have comment or be unexported (golint)
    • Line 56: warning: exported type TargetSpec should have comment or be unexported (golint)
    • Line 61: warning: exported type MetadataSpec should have comment or be unexported (golint)
    • Line 66: warning: exported type ExemplarSpec should have comment or be unexported (golint)
    • Line 87: warning: exported type StoreStatus should have comment or be unexported (golint)
    • Line 632: warning: exported method StoreSet.GetStoreStatus should have comment or be unexported (golint)
    • Line 718: warning: exported method StoreSet.Close should have comment or be unexported (golint)
    • thanos/pkg/store/cache/factory.go
    • Line 18: warning: exported type IndexCacheProvider should have comment or be unexported (golint)
    • Line 21: warning: exported const INMEMORY should have comment (or a comment on this block) or be unexported (golint)
    • thanos/cmd/thanos/downsample.go
    • Line 36: warning: exported type DownsampleMetrics should have comment or be unexported (golint)
    • Line 56: warning: exported function RunDownsample should have comment or be unexported (golint)
    • thanos/pkg/testutil/e2eutil/prometheus.go
    • Line 50: warning: comment on exported const PromAddrPlaceHolder should be of the form "PromAddrPlaceHolder ..." (golint)
    • Line 54: warning: exported function PrometheusBinary should have comment or be unexported (golint)
    • Line 58: warning: exported function AlertmanagerBinary should have comment or be unexported (golint)
    • Line 66: warning: exported function MinioBinary should have comment or be unexported (golint)
    • Line 90: warning: exported function NewTSDB should have comment or be unexported (golint)
    • Line 100: warning: exported function ForeachPrometheus should have comment or be unexported (golint)
    • Line 212: warning: exported method Prometheus.WaitPrometheusUp should have comment or be unexported (golint)
    • Line 230: warning: exported method Prometheus.Restart should have comment or be unexported (golint)
    • Line 248: warning: exported method Prometheus.DisableCompaction should have comment or be unexported (golint)
    • thanos/pkg/objstore/oss/oss.go
    • Line 29: warning: comment on exported const PartSize should be of the form "PartSize ..." (golint)
    • Line 49: warning: exported function NewTestBucket should have comment or be unexported (golint)
    • Line 233: warning: exported method Bucket.Name should have comment or be unexported (golint)
    • Line 237: warning: exported function NewTestBucketFromConfig should have comment or be unexported (golint)
    • Line 285: warning: exported method Bucket.Close should have comment or be unexported (golint)
    • Line 338: warning: exported method Bucket.GetRange should have comment or be unexported (golint)
    • thanos/pkg/ui/bucket.go
    • Line 35: warning: exported function NewBucketUI should have comment or be unexported (golint)
    • Line 80: warning: exported method Bucket.Set should have comment or be unexported (golint)
    • thanos/pkg/store/hintspb/custom.go
    • Line 8: warning: exported method SeriesResponseHints.AddQueriedBlock should have comment or be unexported (golint)
    • Line 14: warning: exported method LabelNamesResponseHints.AddQueriedBlock should have comment or be unexported (golint)
    • Line 20: warning: exported method LabelValuesResponseHints.AddQueriedBlock should have comment or be unexported (golint)
    • thanos/pkg/block/metadata/meta.go
    • Line 30: warning: exported type SourceType should have comment or be unexported (golint)
    • Line 33: warning: comment on exported const UnknownSource should be of the form "UnknownSource ..." (golint)
    • Line 35: warning: exported const SidecarSource should have comment (or a comment on this block) or be unexported (golint)
    • Line 93: warning: exported type Rewrite should have comment or be unexported (golint)
    • Line 100: warning: exported type Matchers should have comment or be unexported (golint)
    • Line 102: warning: exported method Matchers.UnmarshalYAML should have comment or be unexported (golint)
    • Line 110: warning: exported type DeletionRequest should have comment or be unexported (golint)
    • Line 115: warning: exported type File should have comment or be unexported (golint)
    • Line 124: warning: exported type ThanosDownsample should have comment or be unexported (golint)
    • thanos/pkg/cache/inmemory.go
    • Line 22: warning: exported var DefaultInMemoryCacheConfig should have comment or be unexported (golint)
    • Line 40: warning: exported type InMemoryCache should have comment or be unexported (golint)
    • Line 289: warning: exported method InMemoryCache.Store should have comment or be unexported (golint)
    • thanos/pkg/objstore/gcs/gcs.go
    • Line 54: warning: exported function NewBucketWithConfig should have comment or be unexported (golint)
    • Line 189: warning: exported method Bucket.Close should have comment or be unexported (golint)
    • thanos/pkg/targets/targetspb/custom.go
    • Line 15: warning: exported function NewTargetsResponse should have comment or be unexported (golint)
    • Line 23: warning: exported function NewWarningTargetsResponse should have comment or be unexported (golint)
    • Line 31: warning: exported method TargetHealth.UnmarshalJSON should have comment or be unexported (golint)
    • Line 49: warning: exported method TargetHealth.MarshalJSON should have comment or be unexported (golint)
    • Line 53: warning: exported method TargetHealth.Compare should have comment or be unexported (golint)
    • Line 57: warning: exported method ActiveTarget.Compare should have comment or be unexported (golint)
    • Line 77: warning: exported method ActiveTarget.CompareState should have comment or be unexported (golint)
    • Line 93: warning: exported method DroppedTarget.Compare should have comment or be unexported (golint)
    • Line 101: warning: exported method ActiveTarget.SetLabels should have comment or be unexported (golint)
    • Line 101: warning: receiver name t should be consistent with previous receiver name t1 for ActiveTarget (golint)
    • Line 111: warning: exported method ActiveTarget.SetDiscoveredLabels should have comment or be unexported (golint)
    • Line 111: warning: receiver name t should be consistent with previous receiver name t1 for ActiveTarget (golint)
    • Line 121: warning: exported method DroppedTarget.SetDiscoveredLabels should have comment or be unexported (golint)
    • Line 121: warning: receiver name t should be consistent with previous receiver name t1 for DroppedTarget (golint)
    • thanos/pkg/testutil/testpromcompatibility/api_compatibility.go
    • Line 14: warning: exported type RuleDiscovery should have comment or be unexported (golint)
    • Line 18: warning: comment on exported type RuleGroup should be of the form "RuleGroup ..." (with optional leading article) (golint)
    • Line 31: warning: comment on exported method RuleGroup.MarshalJSON should be of the form "MarshalJSON ..." (golint)
    • Line 41: warning: exported type Rule should have comment or be unexported (golint)
    • Line 43: warning: exported type AlertAPI should have comment or be unexported (golint)
    • Line 47: warning: exported type Alert should have comment or be unexported (golint)
    • Line 57: warning: exported type AlertingRule should have comment or be unexported (golint)
    • Line 74: warning: exported type RecordingRule should have comment or be unexported (golint)
    • thanos/pkg/block/fetcher.go
    • Line 38: warning: exported const FetcherConcurrency should have comment or be unexported (golint)
    • Line 67: warning: exported const CorruptedMeta should have comment (or a comment on this block) or be unexported (golint)
    • Line 77: warning: comment on exported const MarkedForDeletionMeta should be of the form "MarkedForDeletionMeta ..." (golint)
    • Line 88: warning: exported function NewFetcherMetrics should have comment or be unexported (golint)
    • Line 143: warning: exported type MetadataFetcher should have comment or be unexported (golint)
    • Line 148: warning: exported type MetadataFilter should have comment or be unexported (golint)
    • Line 152: warning: exported type MetadataModifier should have comment or be unexported (golint)
    • Line 219: warning: exported var ErrorSyncMetaNotFound should have comment or be unexported (golint)
    • Line 480: warning: exported type MetaFetcher should have comment or be unexported (golint)
    • Line 551: warning: comment on exported const BlockIDLabel should be of the form "BlockIDLabel ..." (golint)
    • Line 878: warning: exported var SelectorSupportedRelabelActions should have comment or be unexported (golint)
    • thanos/pkg/alert/config.go
    • Line 22: warning: exported type AlertingConfig should have comment or be unexported (golint)
    • Line 38: warning: exported const APIv1 should have comment (or a comment on this block) or be unexported (golint)
    • Line 62: warning: exported function DefaultAlertmanagerConfig should have comment or be unexported (golint)
    • thanos/pkg/compact/compact.go
    • Line 36: warning: exported type ResolutionLevel should have comment or be unexported (golint)
    • Line 39: warning: exported const ResolutionLevelRaw should have comment (or a comment on this block) or be unexported (golint)
    • thanos/pkg/objstore/tracing.go
    • Line 20: warning: exported function NewTracingBucket should have comment or be unexported (golint)
    • Line 24: warning: exported method TracingBucket.Iter should have comment or be unexported (golint)
    • Line 32: warning: exported method TracingBucket.Get should have comment or be unexported (golint)
    • Line 46: warning: exported method TracingBucket.GetRange should have comment or be unexported (golint)
    • Line 60: warning: exported method TracingBucket.Exists should have comment or be unexported (golint)
    • Line 68: warning: exported method TracingBucket.Attributes should have comment or be unexported (golint)
    • Line 76: warning: exported method TracingBucket.Upload should have comment or be unexported (golint)
    • Line 84: warning: exported method TracingBucket.Delete should have comment or be unexported (golint)
    • Line 92: warning: exported method TracingBucket.Name should have comment or be unexported (golint)
    • Line 96: warning: exported method TracingBucket.Close should have comment or be unexported (golint)
    • Line 100: warning: exported method TracingBucket.IsObjNotFoundErr should have comment or be unexported (golint)
    • Line 104: warning: exported method TracingBucket.WithExpectedErrs should have comment or be unexported (golint)
    • Line 111: warning: exported method TracingBucket.ReaderWithExpectedErrs should have comment or be unexported (golint)
    • thanos/pkg/query/config.go
    • Line 17: warning: exported type Config should have comment or be unexported (golint)
    • Line 22: warning: exported function DefaultConfig should have comment or be unexported (golint)
    • thanos/pkg/cache/tracing_cache.go
    • Line 20: warning: exported function NewTracingCache should have comment or be unexported (golint)
    • Line 24: warning: exported method TracingCache.Store should have comment or be unexported (golint)
    • Line 28: warning: exported method TracingCache.Fetch should have comment or be unexported (golint)
    • thanos/test/e2e/e2ethanos/service.go
    • Line 10: warning: exported type Service should have comment or be unexported (golint)
    • Line 16: warning: exported function NewService should have comment or be unexported (golint)
    • Line 30: warning: exported method Service.GRPCEndpoint should have comment or be unexported (golint)
    • Line 32: warning: exported method Service.GRPCNetworkEndpoint should have comment or be unexported (golint)
    • Line 36: warning: exported method Service.GRPCNetworkEndpointFor should have comment or be unexported (golint)
    • thanos/pkg/metadata/proxy.go
    • Line 29: warning: exported function RegisterMetadataServer should have comment or be unexported (golint)
    • Line 43: warning: exported method Proxy.MetricMetadata should have comment or be unexported (golint)
    • thanos/pkg/targets/proxy.go
    • Line 28: warning: exported function RegisterTargetsServer should have comment or be unexported (golint)
    • Line 42: warning: exported method Proxy.Targets should have comment or be unexported (golint)
    • thanos/pkg/store/bucket.go
    • Line 90: warning: exported const PartitionerMaxGapSize should have comment (or a comment on this block) or be unexported (golint)
    • Line 2212: warning: exported type Part should have comment or be unexported (golint)
    • Line 2219: warning: exported type Partitioner should have comment or be unexported (golint)
    • Line 2231: warning: exported function NewGapBasedPartitioner should have comment or be unexported (golint)
    • thanos/pkg/api/blocks/v1.go
    • Line 28: warning: exported type BlocksInfo should have comment or be unexported (golint)
    • Line 52: warning: exported method BlocksAPI.Register should have comment or be unexported (golint)
    • thanos/pkg/rules/rules.go
    • Line 33: warning: exported function NewGRPCClient should have comment or be unexported (golint)
    • Line 37: warning: exported function NewGRPCClientWithDedup should have comment or be unexported (golint)
    • Line 49: warning: exported method GRPCClient.Rules should have comment or be unexported (golint)
    • thanos/pkg/queryfrontend/request.go
    • Line 16: warning: comment on exported type ThanosRequest should be of the form "ThanosRequest ..." (with optional leading article) (golint)
    • Line 22: warning: exported type ThanosQueryRangeRequest should have comment or be unexported (golint)
    • Line 50: warning: exported method ThanosQueryRangeRequest.GetCachingOptions should have comment or be unexported (golint)
    • Line 99: warning: exported method ThanosQueryRangeRequest.GetStoreMatchers should have comment or be unexported (golint)
    • Line 101: warning: exported type ThanosLabelsRequest should have comment or be unexported (golint)
    • Line 124: warning: exported method ThanosLabelsRequest.GetCachingOptions should have comment or be unexported (golint)
    • Line 167: warning: exported method ThanosLabelsRequest.GetStoreMatchers should have comment or be unexported (golint)
    • Line 169: warning: exported type ThanosSeriesRequest should have comment or be unexported (golint)
    • Line 194: warning: exported method ThanosSeriesRequest.GetCachingOptions should have comment or be unexported (golint)
    • Line 237: warning: exported method ThanosSeriesRequest.GetStoreMatchers should have comment or be unexported (golint)
    • thanos/pkg/store/storepb/testutil/series.go
    • Line 42: warning: exported type HeadGenOptions should have comment or be unexported (golint)
    • Line 164: warning: exported function NewSeriesServer should have comment or be unexported (golint)
    • Line 168: warning: exported method SeriesServer.Send should have comment or be unexported (golint)
    • Line 189: warning: exported method SeriesServer.Context should have comment or be unexported (golint)
    • Line 193: warning: exported function RunSeriesInterestingCases should have comment or be unexported (golint)
    • thanos/pkg/exemplars/exemplars.go
    • Line 59: warning: exported function NewGRPCClient should have comment or be unexported (golint)
    • Line 63: warning: exported function NewGRPCClientWithDedup should have comment or be unexported (golint)
    • Line 75: warning: exported method GRPCClient.Exemplars should have comment or be unexported (golint)
    • thanos/pkg/http/http.go
    • Line 106: warning: exported var ThanosUserAgent should have comment or be unexported (golint)
    • Line 162: warning: exported type AddressProvider should have comment or be unexported (golint)
    • thanos/pkg/receive/writer.go
    • Line 25: warning: exported type TenantStorage should have comment or be unexported (golint)
    • Line 29: warning: exported type Writer should have comment or be unexported (golint)
    • Line 34: warning: exported function NewWriter should have comment or be unexported (golint)
    • thanos/pkg/verifier/index_issue.go
    • Line 29: warning: exported method IndexKnownIssues.IssueID should have comment or be unexported (golint)
    • Line 31: warning: exported method IndexKnownIssues.VerifyRepair should have comment or be unexported (golint)
    • thanos/pkg/extkingpin/flags.go
    • Line 15: warning: exported function ModelDuration should have comment or be unexported (golint)
    • Line 45: warning: comment on exported function RegisterHTTPFlags should be of the form "RegisterHTTPFlags ..." (golint)
    • thanos/pkg/compact/downsample/downsample.go
    • Line 595: warning: exported function NewApplyCounterResetsIterator should have comment or be unexported (golint)
    • Line 599: warning: exported method ApplyCounterResetsSeriesIterator.Next should have comment or be unexported (golint)
    • Line 643: warning: exported method ApplyCounterResetsSeriesIterator.At should have comment or be unexported (golint)
    • Line 647: warning: exported method ApplyCounterResetsSeriesIterator.Seek should have comment or be unexported (golint)
    • Line 661: warning: exported method ApplyCounterResetsSeriesIterator.Err should have comment or be unexported (golint)
    • Line 678: warning: exported function NewAverageChunkIterator should have comment or be unexported (golint)
    • Line 682: warning: exported method AverageChunkIterator.Next should have comment or be unexported (golint)
    • Line 702: warning: exported method AverageChunkIterator.Seek should have comment or be unexported (golint)
    • Line 707: warning: exported method AverageChunkIterator.At should have comment or be unexported (golint)
    • Line 711: warning: exported method AverageChunkIterator.Err should have comment or be unexported (golint)
    • thanos/pkg/rules/rulespb/custom.go
    • Line 19: warning: exported const RuleRecordingType should have comment (or a comment on this block) or be unexported (golint)
    • Line 23: warning: exported function NewRuleGroupRulesResponse should have comment or be unexported (golint)
    • Line 31: warning: exported function NewWarningRulesResponse should have comment or be unexported (golint)
    • Line 39: warning: exported function NewRecordingRule should have comment or be unexported (golint)
    • Line 68: warning: exported function NewAlertingRule should have comment or be unexported (golint)
    • Line 74: warning: exported method Rule.GetLabels should have comment or be unexported (golint)
    • Line 85: warning: exported method Rule.SetLabels should have comment or be unexported (golint)
    • Line 100: warning: exported method Rule.GetName should have comment or be unexported (golint)
    • Line 111: warning: exported method Rule.GetQuery should have comment or be unexported (golint)
    • Line 122: warning: exported method Rule.GetLastEvaluation should have comment or be unexported (golint)
    • Line 149: warning: receiver name r1 should be consistent with previous receiver name r for Rule (golint)
    • Line 179: warning: exported method RuleGroups.MarshalJSON should have comment or be unexported (golint)
    • Line 199: warning: receiver name r should be consistent with previous receiver name r1 for RuleGroup (golint)
    • Line 207: warning: exported method Rule.UnmarshalJSON should have comment or be unexported (golint)
    • Line 207: warning: receiver name m should be consistent with previous receiver name r for Rule (golint)
    • Line 238: warning: exported method Rule.MarshalJSON should have comment or be unexported (golint)
    • Line 238: warning: receiver name m should be consistent with previous receiver name r for Rule (golint)
    • Line 262: warning: exported method RuleGroup.MarshalJSON should have comment or be unexported (golint)
    • Line 262: warning: receiver name r should be consistent with previous receiver name r1 for RuleGroup (golint)
    • Line 271: warning: exported method AlertState.UnmarshalJSON should have comment or be unexported (golint)
    • Line 289: warning: exported method AlertState.MarshalJSON should have comment or be unexported (golint)
    • thanos/pkg/receive/multitsdb.go
    • Line 33: warning: exported type MultiTSDB should have comment or be unexported (golint)
    • Line 119: warning: exported method MultiTSDB.Open should have comment or be unexported (golint)
    • Line 145: warning: exported method MultiTSDB.Flush should have comment or be unexported (golint)
    • Line 175: warning: exported method MultiTSDB.Close should have comment or be unexported (golint)
    • Line 192: warning: exported method MultiTSDB.Sync should have comment or be unexported (golint)
    • Line 229: warning: exported method MultiTSDB.RemoveLockFilesIfAny should have comment or be unexported (golint)
    • Line 255: warning: exported method MultiTSDB.TSDBStores should have comment or be unexported (golint)
    • Line 346: warning: exported method MultiTSDB.TenantAppendable should have comment or be unexported (golint)
    • Line 454: warning: exported method UnRegisterer.MustRegister should have comment or be unexported (golint)
    • thanos/pkg/store/tsdb.go
    • Line 25: warning: exported const RemoteReadFrameLimit should have comment or be unexported (golint)
    • Line 27: warning: exported type TSDBReader should have comment or be unexported (golint)
    • Line 43: warning: exported function RegisterWritableStoreServer should have comment or be unexported (golint)
    • thanos/pkg/pool/pool.go
    • Line 23: warning: exported method NoopBytes.Get should have comment or be unexported (golint)
    • Line 28: warning: exported method NoopBytes.Put should have comment or be unexported (golint)
    • thanos/pkg/objstore/s3/s3.go
    • Line 58: warning: exported var DefaultConfig should have comment or be unexported (golint)
    • Line 100: warning: exported type TraceConfig should have comment or be unexported (golint)
    • Line 496: warning: exported method Bucket.Close should have comment or be unexported (golint)
    • Line 543: warning: exported function NewTestBucketFromConfig should have comment or be unexported (golint)
    • thanos/pkg/tracing/client/factory.go
    • Line 23: warning: exported type TracingProvider should have comment or be unexported (golint)
    • Line 26: warning: exported const STACKDRIVER should have comment (or a comment on this block) or be unexported (golint)
    • Line 32: warning: exported type TracingConfig should have comment or be unexported (golint)
    • Line 37: warning: exported function NewTracer should have comment or be unexported (golint)
    • Line 68: warning: exported function NoopTracer should have comment or be unexported (golint)
    • thanos/pkg/store/limiter.go
    • Line 14: warning: exported type ChunksLimiter should have comment or be unexported (golint)
    • Line 21: warning: exported type SeriesLimiter should have comment or be unexported (golint)
    • thanos/pkg/store/local.go
    • Line 46: warning: comment on exported function NewLocalStoreFromJSONMmappableFile should be of the form "NewLocalStoreFromJSONMmappableFile ..." (golint)
    • Line 249: warning: exported method LocalStore.Close should have comment or be unexported (golint)

license100%

Checks whether your project has a LICENSE file.

No problems detected. Good job!


ineffassign99%

IneffAssign detects ineffectual assignments in Go code.


misspell100%

Misspell Finds commonly misspelled English words

No problems detected. Good job!