Preparing report...

Report for github.com/pulumi/pulumi-terraform-bridge

A+    Excellent!    Found 74 issues across 182 files

Tweet

gofmt95%

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!


gocyclo85%

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.

    • pulumi-terraform-bridge/pkg/tf2pulumi/convert/tf12.go
    • Line 1184: warning: cyclomatic complexity 35 of function (*resourceRewriter).rewriteBodyItem() is high (> 15) (gocyclo)
    • Line 1420: warning: cyclomatic complexity 32 of function (*tf12binder).rewriteScopeTraversal() is high (> 15) (gocyclo)
    • Line 588: warning: cyclomatic complexity 24 of function (*tf12binder).annotateExpressionsWithSchemas() is high (> 15) (gocyclo)
    • Line 341: warning: cyclomatic complexity 23 of function (*tf12binder).declareFile() is high (> 15) (gocyclo)
    • Line 454: warning: cyclomatic complexity 17 of function (*tf12binder).bindNode() is high (> 15) (gocyclo)
    • pulumi-terraform-bridge/pkg/tfgen/generate.go
    • Line 88: warning: cyclomatic complexity 21 of function (Language).emitSDK() is high (> 15) (gocyclo)
    • Line 406: warning: cyclomatic complexity 21 of function (*propertyType).equals() is high (> 15) (gocyclo)
    • Line 306: warning: cyclomatic complexity 19 of function makePropertyType() is high (> 15) (gocyclo)
    • Line 1170: warning: cyclomatic complexity 16 of function (*Generator).gatherOverlays() is high (> 15) (gocyclo)
    • pulumi-terraform-bridge/pkg/tfgen/docs.go
    • Line 935: warning: cyclomatic complexity 29 of function (*Generator).convertExamples() is high (> 15) (gocyclo)
    • Line 563: warning: cyclomatic complexity 25 of function (*tfMarkdownParser).parseSection() is high (> 15) (gocyclo)
    • Line 1069: warning: cyclomatic complexity 17 of function (*Generator).convertHCL() is high (> 15) (gocyclo)
    • Line 753: warning: cyclomatic complexity 16 of function (*tfMarkdownParser).parseImports() is high (> 15) (gocyclo)
    • Line 475: warning: cyclomatic complexity 16 of function (*tfMarkdownParser).reformatExamples() is high (> 15) (gocyclo)

golint74%

Golint is a linter for Go source code.

    • pulumi-terraform-bridge/internal/testprovider/schema.go
    • Line 13: warning: exported type Settable should have comment or be unexported (golint)
    • Line 17: warning: exported type ResourceData should have comment or be unexported (golint)
    • Line 23: warning: exported function MustSet should have comment or be unexported (golint)
    • Line 30: warning: exported function MustSetIfUnset should have comment or be unexported (golint)
    • Line 36: warning: exported function Timeout should have comment or be unexported (golint)
    • Line 40: warning: exported function ProviderV1 should have comment or be unexported (golint)
    • Line 355: warning: exported function ProviderV2 should have comment or be unexported (golint)
    • pulumi-terraform-bridge/pkg/tfbridge/info.go
    • Line 30: warning: exported const MPL20LicenseType should have comment (or a comment on this block) or be unexported (golint)
    • Line 84: warning: exported method ProviderInfo.GetGitHubOrg should have comment or be unexported (golint)
    • Line 92: warning: exported method ProviderInfo.GetGitHubHost should have comment or be unexported (golint)
    • Line 100: warning: exported method ProviderInfo.GetTFProviderLicense should have comment or be unexported (golint)
    • Line 108: warning: exported method ProviderInfo.GetProviderModuleVersion should have comment or be unexported (golint)
    • Line 149: warning: exported method ResourceInfo.GetTok should have comment or be unexported (golint)
    • Line 150: warning: exported method ResourceInfo.GetFields should have comment or be unexported (golint)
    • Line 151: warning: exported method ResourceInfo.GetDocs should have comment or be unexported (golint)
    • Line 161: warning: exported method DataSourceInfo.GetTok should have comment or be unexported (golint)
    • Line 162: warning: exported method DataSourceInfo.GetFields should have comment or be unexported (golint)
    • Line 163: warning: exported method DataSourceInfo.GetDocs should have comment or be unexported (golint)
    • Line 722: warning: comment on exported function GetModuleMajorVersion should be of the form "GetModuleMajorVersion ..." (golint)
    • pulumi-terraform-bridge/pkg/tf2pulumi/internal/config/config.go
    • Line 1: warning: package comment should be of the form "Package config ..." (golint)
    • Line 72: warning: comment on exported type Resource should be of the form "Resource ..." (with optional leading article) (golint)
    • Line 181: warning: exported const VariableTypeUnknown should have comment (or a comment on this block) or be unexported (golint)
    • Line 187: warning: exported method VariableType.Printable should have comment or be unexported (golint)
    • Line 215: warning: comment on exported method Module.Id should be of the form "Id ..." (golint)
    • Line 240: warning: comment on exported method Resource.Id should be of the form "Id ..." (golint)
    • Line 371: warning: receiver name m should be consistent with previous receiver name r for Module (golint)
    • Line 375: warning: receiver name m should be consistent with previous receiver name r for Module (golint)
    • Line 406: warning: exported method ProviderConfig.GoString should have comment or be unexported (golint)
    • Line 410: warning: exported method ProviderConfig.FullName should have comment or be unexported (golint)
    • Line 494: warning: exported method ResourceMode.Taintable should have comment or be unexported (golint)
    • pulumi-terraform-bridge/pkg/tf2pulumi/internal/config/interpolate.go
    • Line 30: warning: exported const CountValueInvalid should have comment (or a comment on this block) or be unexported (golint)
    • Line 49: warning: exported type PathValueType should have comment or be unexported (golint)
    • Line 52: warning: exported const PathValueInvalid should have comment (or a comment on this block) or be unexported (golint)
    • Line 110: warning: exported function NewInterpolatedVariable should have comment or be unexported (golint)
    • Line 132: warning: exported function NewCountVariable should have comment or be unexported (golint)
    • Line 146: warning: exported method CountVariable.FullKey should have comment or be unexported (golint)
    • Line 150: warning: exported function NewModuleVariable should have comment or be unexported (golint)
    • Line 165: warning: exported method ModuleVariable.FullKey should have comment or be unexported (golint)
    • Line 169: warning: exported method ModuleVariable.GoString should have comment or be unexported (golint)
    • Line 173: warning: exported function NewPathVariable should have comment or be unexported (golint)
    • Line 191: warning: exported method PathVariable.FullKey should have comment or be unexported (golint)
    • Line 195: warning: exported function NewResourceVariable should have comment or be unexported (golint)
    • Line 253: warning: exported method ResourceVariable.ResourceId should have comment or be unexported (golint)
    • Line 264: warning: exported method ResourceVariable.FullKey should have comment or be unexported (golint)
    • Line 268: warning: exported function NewSelfVariable should have comment or be unexported (golint)
    • Line 278: warning: exported method SelfVariable.FullKey should have comment or be unexported (golint)
    • Line 282: warning: exported method SelfVariable.GoString should have comment or be unexported (golint)
    • Line 286: warning: exported function NewSimpleVariable should have comment or be unexported (golint)
    • Line 290: warning: exported method SimpleVariable.FullKey should have comment or be unexported (golint)
    • Line 294: warning: exported method SimpleVariable.GoString should have comment or be unexported (golint)
    • Line 298: warning: exported function NewTerraformVariable should have comment or be unexported (golint)
    • Line 306: warning: exported method TerraformVariable.FullKey should have comment or be unexported (golint)
    • Line 310: warning: exported method TerraformVariable.GoString should have comment or be unexported (golint)
    • Line 314: warning: exported function NewUserVariable should have comment or be unexported (golint)
    • Line 334: warning: exported method UserVariable.FullKey should have comment or be unexported (golint)
    • Line 338: warning: exported method UserVariable.GoString should have comment or be unexported (golint)
    • Line 342: warning: exported function NewLocalVariable should have comment or be unexported (golint)
    • Line 353: warning: exported method LocalVariable.FullKey should have comment or be unexported (golint)
    • Line 357: warning: exported method LocalVariable.GoString should have comment or be unexported (golint)
    • pulumi-terraform-bridge/pkg/tf2pulumi/internal/addrs/resource.go
    • Line 31: warning: exported method Resource.Equal should have comment or be unexported (golint)
    • Line 73: warning: exported method ResourceInstance.ContainingResource should have comment or be unexported (golint)
    • Line 84: warning: exported method ResourceInstance.Equal should have comment or be unexported (golint)
    • Line 164: warning: exported method AbsResource.Equal should have comment or be unexported (golint)
    • Line 229: warning: exported method AbsResourceInstance.Equal should have comment or be unexported (golint)
    • Line 313: warning: exported method ConfigResource.Equal should have comment or be unexported (golint)
    • pulumi-terraform-bridge/pkg/tf2pulumi/convert/convert.go
    • Line 38: warning: exported const LanguageTypescript should have comment (or a comment on this block) or be unexported (golint)
    • Line 46: warning: exported var ValidLanguages should have comment or be unexported (golint)
    • Line 49: warning: exported type Diagnostics should have comment or be unexported (golint)
    • Line 54: warning: exported method Diagnostics.NewDiagnosticWriter should have comment or be unexported (golint)
    • Line 144: warning: exported type Options should have comment or be unexported (golint)
    • pulumi-terraform-bridge/pkg/tf2pulumi/il/graph.go
    • Line 219: warning: comment on exported method ModuleNode.Dependencies should be of the form "Dependencies ..." (golint)
    • Line 224: warning: exported method ModuleNode.ID should have comment or be unexported (golint)
    • Line 232: warning: exported method ModuleNode.GetLocation should have comment or be unexported (golint)
    • Line 252: warning: comment on exported method ProviderNode.Dependencies should be of the form "Dependencies ..." (golint)
    • Line 257: warning: exported method ProviderNode.ID should have comment or be unexported (golint)
    • Line 265: warning: exported method ProviderNode.GetLocation should have comment or be unexported (golint)
    • Line 277: warning: comment on exported method ResourceNode.Dependencies should be of the form "Dependencies ..." (golint)
    • Line 354: warning: exported method ResourceNode.ID should have comment or be unexported (golint)
    • Line 362: warning: exported method ResourceNode.GetLocation should have comment or be unexported (golint)
    • Line 374: warning: comment on exported method OutputNode.Dependencies should be of the form "Dependencies ..." (golint)
    • Line 379: warning: exported method OutputNode.ID should have comment or be unexported (golint)
    • Line 387: warning: exported method OutputNode.GetLocation should have comment or be unexported (golint)
    • Line 399: warning: comment on exported method LocalNode.Dependencies should be of the form "Dependencies ..." (golint)
    • Line 404: warning: exported method LocalNode.ID should have comment or be unexported (golint)
    • Line 412: warning: exported method LocalNode.GetLocation should have comment or be unexported (golint)
    • Line 424: warning: comment on exported method VariableNode.Dependencies should be of the form "Dependencies ..." (golint)
    • Line 429: warning: exported method VariableNode.ID should have comment or be unexported (golint)
    • Line 437: warning: exported method VariableNode.GetLocation should have comment or be unexported (golint)
    • pulumi-terraform-bridge/pkg/tfgen/generate.go
    • Line 56: warning: exported type Generator should have comment or be unexported (golint)
    • Line 70: warning: exported type Language should have comment or be unexported (golint)
    • Line 73: warning: exported const Golang should have comment (or a comment on this block) or be unexported (golint)
    • Line 147: warning: exported var AllLanguages should have comment or be unexported (golint)
    • Line 580: warning: exported function GenerateSchema should have comment or be unexported (golint)
    • Line 601: warning: exported type GeneratorOptions should have comment or be unexported (golint)
    • Line 701: warning: exported type GenerateOptions should have comment or be unexported (golint)
    • pulumi-terraform-bridge/pkg/tfshim/schema/schema.go
    • Line 15: warning: exported type Schema should have comment or be unexported (golint)
    • Line 34: warning: exported method Schema.Shim should have comment or be unexported (golint)
    • Line 38: warning: comment on exported type SchemaShim should be of the form "SchemaShim ..." (with optional leading article) (golint)
    • Line 43: warning: exported method SchemaShim.Type should have comment or be unexported (golint)
    • Line 47: warning: exported method SchemaShim.Optional should have comment or be unexported (golint)
    • Line 51: warning: exported method SchemaShim.Required should have comment or be unexported (golint)
    • Line 55: warning: exported method SchemaShim.Default should have comment or be unexported (golint)
    • Line 59: warning: exported method SchemaShim.DefaultFunc should have comment or be unexported (golint)
    • Line 63: warning: exported method SchemaShim.DefaultValue should have comment or be unexported (golint)
    • Line 79: warning: exported method SchemaShim.Description should have comment or be unexported (golint)
    • Line 83: warning: exported method SchemaShim.Computed should have comment or be unexported (golint)
    • Line 87: warning: exported method SchemaShim.ForceNew should have comment or be unexported (golint)
    • Line 91: warning: exported method SchemaShim.StateFunc should have comment or be unexported (golint)
    • Line 95: warning: exported method SchemaShim.Elem should have comment or be unexported (golint)
    • Line 99: warning: exported method SchemaShim.MaxItems should have comment or be unexported (golint)
    • Line 103: warning: exported method SchemaShim.MinItems should have comment or be unexported (golint)
    • Line 107: warning: exported method SchemaShim.ConflictsWith should have comment or be unexported (golint)
    • Line 111: warning: exported method SchemaShim.Removed should have comment or be unexported (golint)
    • Line 115: warning: exported method SchemaShim.Deprecated should have comment or be unexported (golint)
    • Line 119: warning: exported method SchemaShim.Sensitive should have comment or be unexported (golint)
    • Line 123: warning: exported method SchemaShim.UnknownValue should have comment or be unexported (golint)
    • Line 127: warning: exported method SchemaShim.SetElement should have comment or be unexported (golint)
    • Line 131: warning: exported method SchemaShim.SetHash should have comment or be unexported (golint)
    • Line 135: warning: comment on exported type SchemaMap should be of the form "SchemaMap ..." (with optional leading article) (golint)
    • Line 138: warning: exported method SchemaMap.Len should have comment or be unexported (golint)
    • Line 142: warning: exported method SchemaMap.Get should have comment or be unexported (golint)
    • Line 146: warning: exported method SchemaMap.GetOk should have comment or be unexported (golint)
    • Line 151: warning: exported method SchemaMap.Range should have comment or be unexported (golint)
    • Line 159: warning: exported method SchemaMap.Set should have comment or be unexported (golint)
    • Line 163: warning: exported method SchemaMap.Delete should have comment or be unexported (golint)
    • pulumi-terraform-bridge/pkg/tfshim/shim.go
    • Line 7: warning: exported type ResourceConfig should have comment or be unexported (golint)
    • Line 11: warning: exported type InstanceState should have comment or be unexported (golint)
    • Line 18: warning: exported type DiffAttrType should have comment or be unexported (golint)
    • Line 21: warning: exported const DiffAttrUnknown should have comment (or a comment on this block) or be unexported (golint)
    • Line 26: warning: exported type ResourceAttrDiff should have comment or be unexported (golint)
    • Line 37: warning: exported type InstanceDiff should have comment or be unexported (golint)
    • Line 50: warning: exported type ValueType should have comment or be unexported (golint)
    • Line 53: warning: exported const TypeInvalid should have comment (or a comment on this block) or be unexported (golint)
    • Line 63: warning: exported type SchemaDefaultFunc should have comment or be unexported (golint)
    • Line 65: warning: exported type SchemaStateFunc should have comment or be unexported (golint)
    • Line 67: warning: exported type Schema should have comment or be unexported (golint)
    • Line 92: warning: exported type SchemaMap should have comment or be unexported (golint)
    • Line 102: warning: exported type ImportFunc should have comment or be unexported (golint)
    • Line 105: warning: exported const TimeoutCreate should have comment (or a comment on this block) or be unexported (golint)
    • Line 112: warning: exported type ResourceTimeout should have comment or be unexported (golint)
    • Line 116: warning: exported type Resource should have comment or be unexported (golint)
    • Line 127: warning: exported type ResourceMap should have comment or be unexported (golint)
    • Line 136: warning: exported type Provider should have comment or be unexported (golint)
    • pulumi-terraform-bridge/pkg/tfshim/schema/provider.go
    • Line 7: warning: exported type Provider should have comment or be unexported (golint)
    • Line 13: warning: exported method Provider.Shim should have comment or be unexported (golint)
    • Line 17: warning: exported type ProviderShim should have comment or be unexported (golint)
    • Line 21: warning: exported method ProviderShim.Schema should have comment or be unexported (golint)
    • Line 25: warning: exported method ProviderShim.ResourcesMap should have comment or be unexported (golint)
    • Line 29: warning: exported method ProviderShim.DataSourcesMap should have comment or be unexported (golint)
    • Line 33: warning: exported method ProviderShim.Validate should have comment or be unexported (golint)
    • Line 37: warning: exported method ProviderShim.ValidateResource should have comment or be unexported (golint)
    • Line 41: warning: exported method ProviderShim.ValidateDataSource should have comment or be unexported (golint)
    • Line 45: warning: exported method ProviderShim.Configure should have comment or be unexported (golint)
    • Line 49: warning: exported method ProviderShim.Diff should have comment or be unexported (golint)
    • Line 53: warning: exported method ProviderShim.Apply should have comment or be unexported (golint)
    • Line 57: warning: exported method ProviderShim.Refresh should have comment or be unexported (golint)
    • Line 61: warning: exported method ProviderShim.ReadDataDiff should have comment or be unexported (golint)
    • Line 65: warning: exported method ProviderShim.ReadDataApply should have comment or be unexported (golint)
    • Line 69: warning: exported method ProviderShim.Meta should have comment or be unexported (golint)
    • Line 73: warning: exported method ProviderShim.Stop should have comment or be unexported (golint)
    • Line 77: warning: exported method ProviderShim.InitLogging should have comment or be unexported (golint)
    • Line 81: warning: exported method ProviderShim.NewDestroyDiff should have comment or be unexported (golint)
    • Line 85: warning: exported method ProviderShim.NewResourceConfig should have comment or be unexported (golint)
    • Line 89: warning: exported method ProviderShim.IsSet should have comment or be unexported (golint)
    • pulumi-terraform-bridge/pkg/tfshim/schema/resource.go
    • Line 11: warning: exported type Resource should have comment or be unexported (golint)
    • Line 19: warning: exported method Resource.Shim should have comment or be unexported (golint)
    • Line 23: warning: exported type ResourceShim should have comment or be unexported (golint)
    • Line 27: warning: exported method ResourceShim.Schema should have comment or be unexported (golint)
    • Line 31: warning: exported method ResourceShim.SchemaVersion should have comment or be unexported (golint)
    • Line 35: warning: exported method ResourceShim.Importer should have comment or be unexported (golint)
    • Line 39: warning: exported method ResourceShim.DeprecationMessage should have comment or be unexported (golint)
    • Line 43: warning: exported method ResourceShim.Timeouts should have comment or be unexported (golint)
    • Line 47: warning: exported method ResourceShim.InstanceState should have comment or be unexported (golint)
    • Line 51: warning: exported method ResourceShim.DecodeTimeouts should have comment or be unexported (golint)
    • Line 55: warning: exported type ResourceMap should have comment or be unexported (golint)
    • Line 57: warning: exported method ResourceMap.Len should have comment or be unexported (golint)
    • Line 61: warning: exported method ResourceMap.Get should have comment or be unexported (golint)
    • Line 65: warning: exported method ResourceMap.GetOk should have comment or be unexported (golint)
    • Line 70: warning: exported method ResourceMap.Range should have comment or be unexported (golint)
    • Line 78: warning: exported method ResourceMap.Set 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.


misspell95%

Misspell Finds commonly misspelled English words