Preparing report...

Report for github.com/slingdata-io/sling-cli

(v1.1.12)

A+    Excellent!    Found 42 issues across 88 files

Tweet

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!


gofmt95%

Gofmt formats Go programs. We run gofmt -s on your code, where -s is for the "simplify" command


gocyclo55%

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.

    • cmd/sling/sling_logic.go
    • Line 40: warning: cyclomatic complexity 50 of function processRun() is high (> 15) (gocyclo)
    • Line 442: warning: cyclomatic complexity 21 of function processConns() is high (> 15) (gocyclo)
    • core/dbio/filesys/fs.go
    • Line 623: warning: cyclomatic complexity 39 of function (*BaseFileSysClient).WriteDataflowReady() is high (> 15) (gocyclo)
    • Line 889: warning: cyclomatic complexity 24 of function GetDataflow() is high (> 15) (gocyclo)
    • Line 393: warning: cyclomatic complexity 19 of function (*BaseFileSysClient).GetDatastream() is high (> 15) (gocyclo)
    • Line 833: warning: cyclomatic complexity 16 of function Delete() is high (> 15) (gocyclo)
    • core/dbio/database/database_bigtable.go
    • Line 417: warning: cyclomatic complexity 26 of function (*BigTableConn).StreamRowsContext() is high (> 15) (gocyclo)
    • Line 606: warning: cyclomatic complexity 19 of function (*BigTableConn).InsertBatchStream() is high (> 15) (gocyclo)
    • Line 217: warning: cyclomatic complexity 16 of function (*BigTableConn).ExecContext() is high (> 15) (gocyclo)
    • core/dbio/iop/csv.go
    • Line 496: warning: cyclomatic complexity 24 of function detectDelimiter() is high (> 15) (gocyclo)
    • Line 185: warning: cyclomatic complexity 20 of function (*CSV).getReader() is high (> 15) (gocyclo)
    • core/sling/task_run.go
    • Line 46: warning: cyclomatic complexity 18 of function (*TaskExecution).Execute() is high (> 15) (gocyclo)
    • Line 319: warning: cyclomatic complexity 18 of function (*TaskExecution).runFileToDB() is high (> 15) (gocyclo)
    • core/dbio/iop/datastream.go
    • Line 439: warning: cyclomatic complexity 50 of function (*Datastream).Start() is high (> 15) (gocyclo)
    • Line 1519: warning: cyclomatic complexity 19 of function (*Datastream).NewParquetArrowReaderChnl() is high (> 15) (gocyclo)
    • Line 1612: warning: cyclomatic complexity 19 of function (*Datastream).NewParquetReaderChnl() is high (> 15) (gocyclo)
    • Line 1281: warning: cyclomatic complexity 17 of function (*Datastream).NewCsvReaderChnl() is high (> 15) (gocyclo)
    • core/dbio/database/database.go
    • Line 2763: warning: cyclomatic complexity 41 of function GetOptimizeTableStatements() is high (> 15) (gocyclo)
    • Line 3335: warning: cyclomatic complexity 30 of function ParseSQLMultiStatements() is high (> 15) (gocyclo)
    • Line 2949: warning: cyclomatic complexity 27 of function (*BaseConn).CompareChecksums() is high (> 15) (gocyclo)
    • Line 229: warning: cyclomatic complexity 27 of function NewConnContext() is high (> 15) (gocyclo)
    • Line 895: warning: cyclomatic complexity 25 of function (*BaseConn).StreamRowsContext() is high (> 15) (gocyclo)
    • Line 528: warning: cyclomatic complexity 24 of function (*BaseConn).Connect() is high (> 15) (gocyclo)
    • Line 1897: warning: cyclomatic complexity 21 of function (*BaseConn).ProcessTemplate() is high (> 15) (gocyclo)
    • Line 2359: warning: cyclomatic complexity 20 of function (*BaseConn).GenerateDDL() is high (> 15) (gocyclo)
    • Line 1775: warning: cyclomatic complexity 18 of function (*BaseConn).GetSchemata() is high (> 15) (gocyclo)
    • Line 769: warning: cyclomatic complexity 17 of function (*BaseConn).LoadTemplates() is high (> 15) (gocyclo)
    • core/dbio/iop/json.go
    • Line 51: warning: cyclomatic complexity 26 of function (*jsonStream).nextFunc() is high (> 15) (gocyclo)
    • Line 213: warning: cyclomatic complexity 20 of function (*jsonStream).extractNestedArray() is high (> 15) (gocyclo)
    • core/dbio/database/database_sqlite.go
    • Line 373: warning: cyclomatic complexity 21 of function EnsureBinSQLite() is high (> 15) (gocyclo)
    • Line 475: warning: cyclomatic complexity 20 of function (*SQLiteConn).GetSchemata() is high (> 15) (gocyclo)
    • Line 77: warning: cyclomatic complexity 18 of function (*SQLiteConn).BulkImportStream() is high (> 15) (gocyclo)
    • core/dbio/filesys/fs_azure.go
    • Line 276: warning: cyclomatic complexity 28 of function (*AzureFileSysClient).delete() is high (> 15) (gocyclo)
    • Line 139: warning: cyclomatic complexity 22 of function (*AzureFileSysClient).List() is high (> 15) (gocyclo)
    • core/dbio/iop/datatype.go
    • Line 621: warning: cyclomatic complexity 18 of function InferFromStats() is high (> 15) (gocyclo)
    • Line 506: warning: cyclomatic complexity 16 of function (Columns).Add() is high (> 15) (gocyclo)
    • core/sling/config.go
    • Line 337: warning: cyclomatic complexity 61 of function (*Config).Prepare() is high (> 15) (gocyclo)
    • Line 235: warning: cyclomatic complexity 45 of function (*Config).DetermineType() is high (> 15) (gocyclo)
    • Line 568: warning: cyclomatic complexity 41 of function (*Config).GetFormatMap() is high (> 15) (gocyclo)
    • Line 74: warning: cyclomatic complexity 22 of function (*Config).SetDefault() is high (> 15) (gocyclo)
    • Line 1054: warning: cyclomatic complexity 18 of function (*TargetOptions).SetDefaults() is high (> 15) (gocyclo)
    • Line 1004: warning: cyclomatic complexity 17 of function (*SourceOptions).SetDefaults() is high (> 15) (gocyclo)
    • core/dbio/database/database_duckdb.go
    • Line 611: warning: cyclomatic complexity 21 of function (*DuckDbConn).BulkImportStream() is high (> 15) (gocyclo)
    • Line 404: warning: cyclomatic complexity 21 of function (*DuckDbConn).ExecContext() is high (> 15) (gocyclo)
    • Line 125: warning: cyclomatic complexity 20 of function EnsureBinDuckDB() is high (> 15) (gocyclo)
    • core/dbio/database/analyzer.go
    • Line 117: warning: cyclomatic complexity 18 of function getOrderCol() is high (> 15) (gocyclo)
    • Line 151: warning: cyclomatic complexity 18 of function (*DataAnalyzer).AnalyzeColumns() is high (> 15) (gocyclo)
    • Line 273: warning: cyclomatic complexity 17 of function (*DataAnalyzer).ProcessRelationsString() is high (> 15) (gocyclo)
    • core/dbio/iop/stream_processor.go
    • Line 364: warning: cyclomatic complexity 60 of function (*StreamProcessor).CastVal() is high (> 15) (gocyclo)
    • Line 159: warning: cyclomatic complexity 21 of function (*StreamProcessor).SetConfig() is high (> 15) (gocyclo)
    • Line 259: warning: cyclomatic complexity 19 of function (*StreamProcessor).toFloat64E() is high (> 15) (gocyclo)
    • core/dbio/connection/local.go
    • Line 34: warning: cyclomatic complexity 33 of function GetLocalConns() is high (> 15) (gocyclo)
    • Line 294: warning: cyclomatic complexity 23 of function (*EnvConns).testDiscover() is high (> 15) (gocyclo)
    • cmd/sling/sling_test.go
    • Line 314: warning: cyclomatic complexity 21 of function runOneTask() is high (> 15) (gocyclo)
    • Line 200: warning: cyclomatic complexity 17 of function testSuite() is high (> 15) (gocyclo)

ineffassign96%

IneffAssign detects ineffectual assignments in Go code.


license100%

Checks whether your project has a LICENSE file.

No problems detected. Good job!


misspell93%

Misspell Finds commonly misspelled English words