Preparing report...

Report for github.com/viant/toolbox

A    Great!    Found 79 issues across 152 files

Tweet

gofmt84%

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!


golint67%

Golint is a linter for Go source code.

    • toolbox/data/udf/conversion.go
    • Line 16: warning: comment on exported function AsString should be of the form "AsString ..." (golint)
    • Line 38: warning: comment on exported function ToLower should be of the form "ToLower ..." (golint)
    • Line 44: warning: comment on exported function ToUpper should be of the form "ToUpper ..." (golint)
    • Line 61: warning: comment on exported function AsFloat32Ptr should be of the form "AsFloat32Ptr ..." (golint)
    • toolbox/data/compacted.go
    • Line 13: warning: exported type Field should have comment or be unexported (golint)
    • Line 34: warning: exported method CompactedSlice.MarshalJSON should have comment or be unexported (golint)
    • Line 66: warning: exported method CompactedSlice.Fields should have comment or be unexported (golint)
    • Line 66: warning: receiver name s should be consistent with previous receiver name d for CompactedSlice (golint)
    • Line 71: warning: receiver name s should be consistent with previous receiver name d for CompactedSlice (golint)
    • Line 75: warning: receiver name s should be consistent with previous receiver name d for CompactedSlice (golint)
    • Line 99: warning: receiver name s should be consistent with previous receiver name d for CompactedSlice (golint)
    • Line 120: warning: receiver name s should be consistent with previous receiver name d for CompactedSlice (golint)
    • Line 141: warning: receiver name s should be consistent with previous receiver name d for CompactedSlice (golint)
    • Line 176: warning: receiver name s should be consistent with previous receiver name d for CompactedSlice (golint)
    • Line 189: warning: receiver name s should be consistent with previous receiver name d for CompactedSlice (golint)
    • Line 237: warning: receiver name s should be consistent with previous receiver name d for CompactedSlice (golint)
    • Line 291: warning: receiver name s should be consistent with previous receiver name d for CompactedSlice (golint)
    • Line 316: warning: receiver name s should be consistent with previous receiver name d for CompactedSlice (golint)
    • Line 334: warning: receiver name s should be consistent with previous receiver name d for CompactedSlice (golint)
    • toolbox/service_router.go
    • Line 25: warning: exported const MethodHead should have comment (or a comment on this block) or be unexported (golint)
    • Line 310: warning: exported type HttpOptions should have comment or be unexported (golint)
    • Line 315: warning: exported function NewHttpClient should have comment or be unexported (golint)
    • Line 322: warning: var RequestTimeoutMs is of type time.Duration; don't use unit-specific suffix "Ms" (golint)
    • Line 323: warning: var KeepAliveTimeMs is of type time.Duration; don't use unit-specific suffix "Ms" (golint)
    • Line 324: warning: var TLSHandshakeTimeoutMs is of type time.Duration; don't use unit-specific suffix "Ms" (golint)
    • Line 331: warning: var ResponseHeaderTimeoutMs is of type time.Duration; don't use unit-specific suffix "Ms" (golint)
    • Line 332: warning: var TimeoutMs is of type time.Duration; don't use unit-specific suffix "Ms" (golint)
    • toolbox/struct_helper.go
    • Line 19: warning: comment on exported function ScanStructMethods should be of the form "ScanStructMethods ..." (golint)
    • Line 94: warning: comment on exported function IgnoreUnexportedFields should be of the form "IgnoreUnexportedFields ..." (golint)
    • Line 99: warning: exported function SetUnexportedFieldHandler should have comment or be unexported (golint)
    • Line 417: warning: exported method StructMeta.Message should have comment or be unexported (golint)
    • Line 433: warning: comment on exported type StructMetaFilter should be of the form "StructMetaFilter ..." (with optional leading article) (golint)
    • Line 436: warning: exported function DefaultStructMetaFilter should have comment or be unexported (golint)
    • toolbox/secret/secret.go
    • Line 23: warning: comment on exported type SecretKey should be of the form "SecretKey ..." (with optional leading article) (golint)
    • Line 55: warning: comment on exported method SecretKey.Secret should be of the form "Secret ..." (golint)
    • toolbox/secret/service.go
    • Line 18: warning: comment on exported type Service should be of the form "Service ..." (with optional leading article) (golint)
    • Line 26: warning: exported method Service.CredentialsLocation should have comment or be unexported (golint)
    • Line 49: warning: comment on exported method Service.CredentialsFromLocation should be of the form "CredentialsFromLocation ..." (golint)
    • Line 93: warning: comment on exported method Service.GetCredentials should be of the form "GetCredentials ..." (golint)
    • Line 198: warning: comment on exported function New should be of the form "New ..." (golint)
    • toolbox/storage/copy.go
    • Line 15: warning: exported type CopyHandler should have comment or be unexported (golint)
    • Line 16: warning: exported type ModificationHandler should have comment or be unexported (golint)
    • Line 223: warning: comment on exported function ArchiveWithFilter should be of the form "ArchiveWithFilter ..." (golint)
    • toolbox/kms/contract.go
    • Line 5: warning: exported type Resource should have comment or be unexported (golint)
    • Line 11: warning: exported type EncryptRequest should have comment or be unexported (golint)
    • Line 17: warning: exported type EncryptResponse should have comment or be unexported (golint)
    • Line 22: warning: exported type DecryptRequest should have comment or be unexported (golint)
    • Line 27: warning: exported type DecryptResponse should have comment or be unexported (golint)
    • Line 32: warning: exported method EncryptRequest.Validate should have comment or be unexported (golint)
    • Line 42: warning: exported method DecryptRequest.Validate should have comment or be unexported (golint)
    • toolbox/data/collection.go
    • Line 60: warning: comment on exported method Collection.RangeString should be of the form "RangeString ..." (golint)
    • Line 76: warning: comment on exported method Collection.RangeInt should be of the form "RangeInt ..." (golint)
    • toolbox/storage/mem_service.go
    • Line 15: warning: exported const MemoryProviderScheme should have comment or be unexported (golint)
    • Line 17: warning: error var noSuchFileOrDirectoryError should have name of the form errFoo (golint)
    • Line 33: warning: exported type MemoryFile should have comment or be unexported (golint)
    • Line 39: warning: exported method MemoryFile.Object should have comment or be unexported (golint)
    • Line 43: warning: exported type MemoryFolder should have comment or be unexported (golint)
    • Line 51: warning: exported method MemoryFolder.Object should have comment or be unexported (golint)
    • Line 55: warning: exported method MemoryFolder.Objects should have comment or be unexported (golint)
    • Line 248: warning: comment on exported function NewPrivateMemoryService should be of the form "NewPrivateMemoryService ..." (golint)
    • Line 255: warning: comment on exported function NewMemoryService should be of the form "NewMemoryService ..." (golint)
    • toolbox/cred/config.go
    • Line 24: warning: exported var DefaultKey should have comment or be unexported (golint)
    • Line 25: warning: exported var PasswordCipher should have comment or be unexported (golint)
    • Line 27: warning: exported type Config should have comment or be unexported (golint)
    • Line 62: warning: exported method Config.Load should have comment or be unexported (golint)
    • Line 72: warning: exported method Config.LoadFromReader should have comment or be unexported (golint)
    • Line 110: warning: exported method Config.Save should have comment or be unexported (golint)
    • toolbox/data/map.go
    • Line 232: warning: comment on exported method Map.SetValue should be of the form "SetValue ..." (golint)
    • Line 394: warning: comment on exported method Map.Clone should be of the form "Clone ..." (golint)
    • Line 407: warning: comment on exported method Map.AsEncodableMap should be of the form "AsEncodableMap ..." (golint)
    • toolbox/test/fileset_info/user.go
    • Line 1: warning: don't use an underscore in package name (golint)
    • Line 8: warning: exported type Addresses should have comment or be unexported (golint)
    • Line 9: warning: exported type Ints should have comment or be unexported (golint)
    • Line 10: warning: exported type Z should have comment or be unexported (golint)
    • Line 12: warning: exported type Country should have comment or be unexported (golint)
    • Line 23: warning: exported type AMap1 should have comment or be unexported (golint)
    • Line 25: warning: exported type AMap2 should have comment or be unexported (golint)
    • Line 27: warning: exported type AMap3 should have comment or be unexported (golint)
    • Line 29: warning: exported type A should have comment or be unexported (golint)
    • toolbox/url/resource.go
    • Line 76: warning: comment on exported method Resource.DirectoryPath should be of the form "DirectoryPath ..." (golint)
    • Line 180: warning: comment on exported method Resource.DecodeWith should be of the form "DecodeWith ..." (golint)
    • Line 224: warning: comment on exported method Resource.YAMLDecode should be of the form "YAMLDecode ..." (golint)
    • Line 305: warning: exported method Resource.HasChanged should have comment or be unexported (golint)
    • Line 366: warning: exported method Resource.Init should have comment or be unexported (golint)
    • toolbox/storage/gs/provider.go
    • Line 14: warning: exported const ProviderScheme should have comment or be unexported (golint)
    • Line 16: warning: exported const DevstorageFullControlScope should have comment or be unexported (golint)
    • toolbox/storage/s3/provider.go
    • Line 14: warning: exported const ProviderScheme should have comment or be unexported (golint)
    • Line 36: warning: comment on exported function SetDefaultProvider should be of the form "SetDefaultProvider ..." (golint)
    • toolbox/storage/object.go
    • Line 9: warning: exported const StorageObjectFolderType should have comment (or a comment on this block) or be unexported (golint)
    • Line 64: warning: exported method AbstractObject.FileInfo should have comment or be unexported (golint)
    • toolbox/bridge/http_bridge.go
    • Line 24: warning: comment on exported type HttpBridgeEndpointConfig should be of the form "HttpBridgeEndpointConfig ..." (with optional leading article) (golint)
    • Line 57: warning: comment on exported type HttpBridgeProxyHandlerFactory should be of the form "HttpBridgeProxyHandlerFactory ..." (with optional leading article) (golint)
    • Line 72: warning: comment on exported method HttpBridge.ListenAndServeTLS should be of the form "ListenAndServeTLS ..." (golint)
    • Line 141: warning: comment on exported type HttpTrip should be of the form "HttpTrip ..." (with optional leading article) (golint)
    • Line 149: warning: exported method HttpTrip.Response should have comment or be unexported (golint)
    • Line 163: warning: exported method HttpTrip.Header should have comment or be unexported (golint)
    • Line 167: warning: exported method HttpTrip.WriteHeader should have comment or be unexported (golint)
    • Line 172: warning: exported method HttpTrip.Flush should have comment or be unexported (golint)
    • Line 178: warning: exported method HttpTrip.CloseNotify should have comment or be unexported (golint)
    • Line 193: warning: exported method ListeningTripHandler.Notify should have comment or be unexported (golint)
    • Line 229: warning: exported function NewListeningHandler should have comment or be unexported (golint)
    • Line 239: warning: exported function NewProxyRecordingHandler should have comment or be unexported (golint)
    • Line 248: warning: exported function AsListeningTripHandler should have comment or be unexported (golint)
    • Line 281: warning: exported function ReaderAsText should have comment or be unexported (golint)
    • toolbox/cred/cipher.go
    • Line 3: warning: exported type Encryptor should have comment or be unexported (golint)
    • Line 7: warning: exported type Decryptor should have comment or be unexported (golint)
    • Line 11: warning: exported type Cipher should have comment or be unexported (golint)
    • toolbox/ssh/service.go
    • Line 101: warning: exported type Errors should have comment or be unexported (golint)
    • Line 103: warning: exported method Errors.GetError should have comment or be unexported (golint)
    • toolbox/storage/file_info.go
    • Line 40: warning: exported function NewFileInfo should have comment or be unexported (golint)
    • Line 50: warning: exported function NewFileMode should have comment or be unexported (golint)
    • toolbox/storage/http_service.go
    • Line 241: warning: exported function NewHttpStorageService should have comment or be unexported (golint)
    • Line 271: warning: exported const HttpProviderScheme should have comment or be unexported (golint)
    • Line 272: warning: exported const HttpsProviderScheme should have comment or be unexported (golint)
    • toolbox/tokenizer.go
    • Line 165: warning: comment on exported type IdMatcher should be of the form "IdMatcher ..." (with optional leading article) (golint)
    • Line 303: warning: comment on exported function NewRemainingSequenceMatcher should be of the form "NewRemainingSequenceMatcher ..." (golint)
    • Line 351: warning: comment on exported type BodyMatcher should be of the form "BodyMatcher ..." (with optional leading article) (golint)
    • Line 400: warning: comment on exported function NewBlockMatcher should be of the form "NewBlockMatcher ..." (golint)
    • Line 411: warning: exported type BlockMatcher should have comment or be unexported (golint)
    • Line 419: warning: exported method BlockMatcher.Match should have comment or be unexported (golint)
    • toolbox/writer_at.go
    • Line 45: warning: comment on exported function NewByteWriterAt should be of the form "NewByteWriterAt ..." (golint)
    • toolbox/collections.go
    • Line 828: warning: comment on exported function ReplaceMapEntries should be of the form "ReplaceMapEntries ..." (golint)
    • Line 852: warning: comment on exported function ReplaceMapKeys should be of the form "ReplaceMapKeys ..." (golint)
    • toolbox/value_provider.go
    • Line 108: warning: comment on exported function NewDateOfBirthrovider should be of the form "NewDateOfBirthrovider ..." (golint)
    • Line 225: warning: exported function NewWeekdayProvider should have comment or be unexported (golint)
    • Line 281: warning: exported method MapDictionary.Get should have comment or be unexported (golint)
    • Line 288: warning: exported method MapDictionary.Exists should have comment or be unexported (golint)
    • toolbox/ssh/replay_command.go
    • Line 21: warning: comment on exported type ReplayCommands should be of the form "ReplayCommands ..." (with optional leading article) (golint)
    • Line 40: warning: comment on exported method ReplayCommands.Next should be of the form "Next ..." (golint)
    • Line 51: warning: exported method ReplayCommands.Enable should have comment or be unexported (golint)
    • Line 65: warning: exported method ReplayCommands.Disable should have comment or be unexported (golint)
    • toolbox/collections_async.go
    • Line 78: warning: comment on exported function IndexSliceAsync should be of the form "IndexSliceAsync ..." (golint)
    • Line 92: warning: comment on exported function SliceToMapAsync should be of the form "SliceToMapAsync ..." (golint)
    • Line 130: warning: exported function ProcessSliceWithIndexAsync should have comment or be unexported (golint)
    • toolbox/text.go
    • Line 98: warning: exported const CaseUpper should have comment (or a comment on this block) or be unexported (golint)

gocyclo87%

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.

    • toolbox/converter.go
    • Line 636: warning: cyclomatic complexity 131 of function (*Converter).AssignConverted() is high (> 15) (gocyclo)
    • Line 185: warning: cyclomatic complexity 26 of function toInt() is high (> 15) (gocyclo)
    • Line 514: warning: cyclomatic complexity 22 of function (*Converter).assignConvertedStruct() is high (> 15) (gocyclo)
    • Line 1199: warning: cyclomatic complexity 17 of function (*Converter).assignConvertedMapFromStruct() is high (> 15) (gocyclo)
    • Line 33: warning: cyclomatic complexity 16 of function AsString() is high (> 15) (gocyclo)
    • toolbox/fileset_info.go
    • Line 362: warning: cyclomatic complexity 37 of function (*FileInfo).Visit() is high (> 15) (gocyclo)
    • Line 89: warning: cyclomatic complexity 18 of function NewFieldInfoByIndex() is high (> 15) (gocyclo)
    • toolbox/uri.go
    • Line 12: warning: cyclomatic complexity 23 of function ExtractURIParameters() is high (> 15) (gocyclo)
    • toolbox/data/map.go
    • Line 96: warning: cyclomatic complexity 37 of function (*Map).GetValue() is high (> 15) (gocyclo)
    • Line 457: warning: cyclomatic complexity 31 of function (*Map).Expand() is high (> 15) (gocyclo)
    • Line 682: warning: cyclomatic complexity 27 of function (*Map).expandArgumentsExpressions() is high (> 15) (gocyclo)
    • Line 240: warning: cyclomatic complexity 16 of function (*Map).SetValue() is high (> 15) (gocyclo)
    • Line 637: warning: cyclomatic complexity 16 of function (*Map).expandExpressions() is high (> 15) (gocyclo)
    • Line 601: warning: cyclomatic complexity 16 of function (*Map).hasCycle() is high (> 15) (gocyclo)
    • toolbox/storage/scp/fileinfo_parser.go
    • Line 162: warning: cyclomatic complexity 18 of function (*Parser).extractObjectFromIsoBasedTimeCommand() is high (> 15) (gocyclo)
    • Line 105: warning: cyclomatic complexity 18 of function (*Parser).extractObjectFromNonIsoBaseTimeCommand() is high (> 15) (gocyclo)
    • toolbox/struct_helper.go
    • Line 460: warning: cyclomatic complexity 32 of function getStructMeta() is high (> 15) (gocyclo)
    • Line 332: warning: cyclomatic complexity 19 of function initStruct() is high (> 15) (gocyclo)
    • Line 108: warning: cyclomatic complexity 18 of function ProcessStruct() is high (> 15) (gocyclo)
    • toolbox/macro.go
    • Line 62: warning: cyclomatic complexity 19 of function (*MacroEvaluator).extractMacro() is high (> 15) (gocyclo)
    • toolbox/yaml.go
    • Line 20: warning: cyclomatic complexity 19 of function NormalizeKVPairs() is high (> 15) (gocyclo)
    • toolbox/data/parser.go
    • Line 51: warning: cyclomatic complexity 24 of function Parse() is high (> 15) (gocyclo)
    • Line 186: warning: cyclomatic complexity 19 of function expandEnclosed() is high (> 15) (gocyclo)
    • toolbox/collections.go
    • Line 395: warning: cyclomatic complexity 26 of function ProcessMap() is high (> 15) (gocyclo)
    • Line 670: warning: cyclomatic complexity 18 of function isNilOrEmpty() is high (> 15) (gocyclo)
    • Line 24: warning: cyclomatic complexity 17 of function ReverseSlice() is high (> 15) (gocyclo)
    • Line 716: warning: cyclomatic complexity 16 of function CopyMap() is high (> 15) (gocyclo)

ineffassign91%

IneffAssign detects ineffectual assignments in Go code.


license100%

Checks whether your project has a LICENSE file.

No problems detected. Good job!


misspell96%

Misspell Finds commonly misspelled English words