Preparing report...

Report for github.com/banzaicloud/cloudinfo

A+    Excellent!    Found 47 issues across 116 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.


golint62%

Golint is a linter for Go source code.

    • cloudinfo/internal/cloudinfo/metrics/metrics.go
    • Line 82: warning: comment on exported type Reporter should be of the form "Reporter ..." (with optional leading article) (golint)
    • Line 123: warning: exported method DefaultMetricsReporter.ReportScrapeProviderCompleted should have comment or be unexported (golint)
    • Line 127: warning: exported method DefaultMetricsReporter.ReportScrapeRegionCompleted should have comment or be unexported (golint)
    • Line 131: warning: exported method DefaultMetricsReporter.ReportScrapeFailure should have comment or be unexported (golint)
    • Line 135: warning: exported method DefaultMetricsReporter.ReportScrapeProviderShortLivedCompleted should have comment or be unexported (golint)
    • Line 139: warning: exported method DefaultMetricsReporter.ReportScrapeRegionShortLivedCompleted should have comment or be unexported (golint)
    • Line 143: warning: exported method DefaultMetricsReporter.ReportScrapeShortLivedFailure should have comment or be unexported (golint)
    • Line 147: warning: comment on exported function NewDefaultMetricsReporter should be of the form "NewDefaultMetricsReporter ..." (golint)
    • Line 162: warning: exported function GetPriceGatherers should have comment or be unexported (golint)
    • Line 168: warning: exported function GetSpotPriceGatherers should have comment or be unexported (golint)
    • Line 183: warning: exported function ReportAlibabaSpotPrice should have comment or be unexported (golint)
    • Line 196: warning: exported function ReportAmazonSpotPrice should have comment or be unexported (golint)
    • Line 209: warning: exported function ReportAzureSpotPrice should have comment or be unexported (golint)
    • Line 222: warning: exported function ReportGoogleSpotPrice should have comment or be unexported (golint)
    • Line 244: warning: exported function NewNoOpMetricsReporter should have comment or be unexported (golint)
    • cloudinfo/internal/app/cloudinfo/loader/data.go
    • Line 35: warning: exported type Region should have comment or be unexported (golint)
    • Line 41: warning: exported type RegionData should have comment or be unexported (golint)
    • Line 48: warning: exported type ZoneData should have comment or be unexported (golint)
    • Line 53: warning: exported type ImageData should have comment or be unexported (golint)
    • Line 58: warning: exported type VersionData should have comment or be unexported (golint)
    • Line 63: warning: exported type VmData should have comment or be unexported (golint)
    • Line 68: warning: exported method VmData.ContainsVM should have comment or be unexported (golint)
    • Line 78: warning: exported type Service should have comment or be unexported (golint)
    • cloudinfo/internal/cloudinfo/scrape.go
    • Line 333: warning: exported function NewScrapingManager should have comment or be unexported (golint)
    • Line 347: warning: exported type ScrapingDriver should have comment or be unexported (golint)
    • Line 354: warning: exported method ScrapingDriver.StartScraping should have comment or be unexported (golint)
    • Line 386: warning: exported method ScrapingDriver.RefreshProvider should have comment or be unexported (golint)
    • Line 394: warning: exported function NewScrapingDriver should have comment or be unexported (golint)
    • cloudinfo/internal/app/cloudinfo/problems/problems.go
    • Line 30: warning: exported type ProblemWrapper should have comment or be unexported (golint)
    • Line 39: warning: exported function NewValidationProblem should have comment or be unexported (golint)
    • Line 45: warning: exported function NewProviderProblem should have comment or be unexported (golint)
    • Line 51: warning: exported function NewUnknownProblem should have comment or be unexported (golint)
    • Line 55: warning: exported function IsDefaultProblem should have comment or be unexported (golint)
    • Line 60: warning: exported function NewDetailedProblem should have comment or be unexported (golint)
    • Line 64: warning: exported function ProblemStatus should have comment or be unexported (golint)
    • cloudinfo/internal/cloudinfo/store.go
    • Line 24: warning: comment on exported const VmKeyTemplate should be of the form "VmKeyTemplate ..." (golint)
    • Line 27: warning: comment on exported const PriceKeyTemplate should be of the form "PriceKeyTemplate ..." (golint)
    • Line 30: warning: comment on exported const ZoneKeyTemplate should be of the form "ZoneKeyTemplate ..." (golint)
    • Line 33: warning: comment on exported const RegionKeyTemplate should be of the form "RegionKeyTemplate ..." (golint)
    • Line 36: warning: comment on exported const StatusKeyTemplate should be of the form "StatusKeyTemplate ..." (golint)
    • Line 39: warning: comment on exported const ImageKeyTemplate should be of the form "ImageKeyTemplate ..." (golint)
    • Line 42: warning: comment on exported const VersionKeyTemplate should be of the form "VersionKeyTemplate ..." (golint)
    • Line 45: warning: comment on exported const ServicesKeyTemplate should be of the form "ServicesKeyTemplate ..." (golint)
    • Line 49: warning: comment on exported type CloudInfoStore should be of the form "CloudInfoStore ..." (with optional leading article) (golint)
    • cloudinfo/internal/cloudinfo/types/types.go
    • Line 26: warning: comment on exported const CPU should be of the form "CPU ..." (golint)
    • Line 72: warning: comment on exported const CategoryGeneral should be of the form "CategoryGeneral ..." (golint)
    • Line 74: warning: exported const CategoryCompute should have comment (or a comment on this block) or be unexported (golint)
    • cloudinfo/internal/cloudinfo/providers/digitalocean/cloudinfo.go
    • Line 82: warning: exported method DigitaloceanInfoer.Initialize should have comment or be unexported (golint)
    • Line 133: warning: exported method DigitaloceanInfoer.GetVirtualMachines should have comment or be unexported (golint)
    • Line 165: warning: exported method DigitaloceanInfoer.GetProducts should have comment or be unexported (golint)
    • Line 195: warning: exported method DigitaloceanInfoer.GetZones should have comment or be unexported (golint)
    • Line 199: warning: exported method DigitaloceanInfoer.GetRegions should have comment or be unexported (golint)
    • Line 238: warning: exported method DigitaloceanInfoer.HasShortLivedPriceInfo should have comment or be unexported (golint)
    • Line 242: warning: exported method DigitaloceanInfoer.GetCurrentPrices should have comment or be unexported (golint)
    • Line 246: warning: exported method DigitaloceanInfoer.HasImages should have comment or be unexported (golint)
    • Line 250: warning: exported method DigitaloceanInfoer.GetServiceImages should have comment or be unexported (golint)
    • Line 254: warning: exported method DigitaloceanInfoer.GetVersions should have comment or be unexported (golint)
    • Line 279: warning: exported method DigitaloceanInfoer.GetServiceProducts should have comment or be unexported (golint)
    • cloudinfo/internal/cloudinfo/instance_type.go
    • Line 84: warning: comment on exported type NetworkCategoryFilter should be of the form "NetworkCategoryFilter ..." (with optional leading article) (golint)
    • Line 92: warning: exported type NetworkCategory should have comment or be unexported (golint)
    • Line 95: warning: exported const NetworkCategoryLow should have comment (or a comment on this block) or be unexported (golint)
    • Line 100: warning: exported var AllNetworkCategory should have comment or be unexported (golint)
    • Line 106: warning: exported method NetworkCategory.IsValid should have comment or be unexported (golint)
    • Line 118: warning: exported method NetworkCategory.UnmarshalGQL should have comment or be unexported (golint)
    • Line 131: warning: exported method NetworkCategory.MarshalGQL should have comment or be unexported (golint)
    • Line 151: warning: exported type InstanceTypeCategory should have comment or be unexported (golint)
    • Line 154: warning: exported const InstanceTypeCategoryGeneralPurpose should have comment (or a comment on this block) or be unexported (golint)
    • Line 160: warning: exported var AllInstanceTypeCategory should have comment or be unexported (golint)
    • Line 167: warning: exported method InstanceTypeCategory.IsValid should have comment or be unexported (golint)
    • Line 179: warning: exported method InstanceTypeCategory.UnmarshalGQL should have comment or be unexported (golint)
    • Line 192: warning: exported method InstanceTypeCategory.MarshalGQL should have comment or be unexported (golint)
    • Line 196: warning: comment on exported type InstanceTypeCategoryFilter should be of the form "InstanceTypeCategoryFilter ..." (with optional leading article) (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!