Preparing report...

Report for github.com/bytebase/bytebase

(v0.0.0-20230914024334-3f7976dbb264)

A+    Excellent!    Found 130 issues across 724 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!


gofmt100%

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

No problems detected. Good job!


ineffassign100%

IneffAssign detects ineffectual assignments in Go code.

No problems detected. Good job!


gocyclo82%

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.

    • backend/api/v1/logging_service.go
    • Line 133: warning: cyclomatic complexity 41 of function setActivityFindFilterAndOrder() is high (> 15) (gocyclo)
    • Line 435: warning: cyclomatic complexity 23 of function convertToActivityType() is high (> 15) (gocyclo)
    • Line 490: warning: cyclomatic complexity 23 of function convertToActionType() is high (> 15) (gocyclo)
    • backend/plugin/parser/sql/tokenizer.go
    • Line 206: warning: cyclomatic complexity 35 of function (*tokenizer).setLineForPGCreateTableStmt() is high (> 15) (gocyclo)
    • Line 63: warning: cyclomatic complexity 33 of function (*tokenizer).setLineForMySQLCreateTableStmt() is high (> 15) (gocyclo)
    • Line 367: warning: cyclomatic complexity 26 of function (*tokenizer).splitTiDBMultiSQL() is high (> 15) (gocyclo)
    • Line 585: warning: cyclomatic complexity 24 of function (*tokenizer).splitPostgreSQLMultiSQL() is high (> 15) (gocyclo)
    • Line 488: warning: cyclomatic complexity 20 of function (*tokenizer).splitStandardMultiSQL() is high (> 15) (gocyclo)
    • backend/plugin/db/util/mask_sensitive_data_psql.go
    • Line 562: warning: cyclomatic complexity 61 of function pgExtractFieldName() is high (> 15) (gocyclo)
    • Line 398: warning: cyclomatic complexity 37 of function (*sensitiveFieldExtractor).pgExtractSelect() is high (> 15) (gocyclo)
    • Line 753: warning: cyclomatic complexity 35 of function (*sensitiveFieldExtractor).pgExtractColumnRefFromExpressionNode() is high (> 15) (gocyclo)
    • Line 101: warning: cyclomatic complexity 20 of function pgMergeJoinField() is high (> 15) (gocyclo)
    • backend/plugin/parser/sql/engine/pg/deparse.go
    • Line 471: warning: cyclomatic complexity 59 of function deparseConstraintDef() is high (> 15) (gocyclo)
    • Line 1058: warning: cyclomatic complexity 57 of function deparseAlterSequence() is high (> 15) (gocyclo)
    • Line 950: warning: cyclomatic complexity 42 of function deparseDataType() is high (> 15) (gocyclo)
    • Line 1464: warning: cyclomatic complexity 41 of function depraseSequenceDef() is high (> 15) (gocyclo)
    • Line 15: warning: cyclomatic complexity 37 of function deparse() is high (> 15) (gocyclo)
    • Line 314: warning: cyclomatic complexity 31 of function deparseAlterTable() is high (> 15) (gocyclo)
    • Line 794: warning: cyclomatic complexity 22 of function deparseCreateTable() is high (> 15) (gocyclo)
    • Line 153: warning: cyclomatic complexity 21 of function deparseCreateIndex() is high (> 15) (gocyclo)
    • backend/runner/schemasync/syncer.go
    • Line 566: warning: cyclomatic complexity 31 of function (*Syncer).checkBackupAnomaly() is high (> 15) (gocyclo)
    • Line 336: warning: cyclomatic complexity 25 of function (*Syncer).SyncDatabaseSchema() is high (> 15) (gocyclo)
    • Line 76: warning: cyclomatic complexity 22 of function (*Syncer).trySyncAll() is high (> 15) (gocyclo)
    • Line 239: warning: cyclomatic complexity 20 of function (*Syncer).SyncInstance() is high (> 15) (gocyclo)
    • backend/api/v1/schema_design_transformer.go
    • Line 1075: warning: cyclomatic complexity 44 of function (*mysqlDesignSchemaGenerator).EnterColumnDefinition() is high (> 15) (gocyclo)
    • Line 1258: warning: cyclomatic complexity 38 of function checkDatabaseMetadata() is high (> 15) (gocyclo)
    • Line 972: warning: cyclomatic complexity 27 of function (*mysqlDesignSchemaGenerator).EnterTableConstraintDef() is high (> 15) (gocyclo)
    • Line 316: warning: cyclomatic complexity 20 of function (*foreignKeyState).toString() is high (> 15) (gocyclo)
    • Line 795: warning: cyclomatic complexity 20 of function (*mysqlDesignSchemaGenerator).ExitCreateTable() is high (> 15) (gocyclo)
    • Line 154: warning: cyclomatic complexity 18 of function (*tableState).toString() is high (> 15) (gocyclo)
    • backend/api/v1/schema_design_service.go
    • Line 465: warning: cyclomatic complexity 22 of function (*SchemaDesignService).convertSheetToSchemaDesign() is high (> 15) (gocyclo)
    • Line 104: warning: cyclomatic complexity 21 of function (*SchemaDesignService).CreateSchemaDesign() is high (> 15) (gocyclo)
    • Line 306: warning: cyclomatic complexity 18 of function (*SchemaDesignService).MergeSchemaDesign() is high (> 15) (gocyclo)
    • Line 235: warning: cyclomatic complexity 16 of function (*SchemaDesignService).UpdateSchemaDesign() is high (> 15) (gocyclo)
    • backend/plugin/db/snowflake/sync.go
    • Line 339: warning: cyclomatic complexity 19 of function (*Driver).getTableSchema() is high (> 15) (gocyclo)
    • Line 63: warning: cyclomatic complexity 19 of function (*Driver).SyncDBSchema() is high (> 15) (gocyclo)
    • backend/runner/approval/runner.go
    • Line 346: warning: cyclomatic complexity 50 of function getDatabaseGeneralIssueRisk() is high (> 15) (gocyclo)
    • Line 540: warning: cyclomatic complexity 39 of function getGrantRequestIssueRisk() is high (> 15) (gocyclo)
    • Line 140: warning: cyclomatic complexity 32 of function (*Runner).findApprovalTemplateForIssue() is high (> 15) (gocyclo)
    • backend/plugin/parser/sql/utils.go
    • Line 919: warning: cyclomatic complexity 39 of function extractTableList() is high (> 15) (gocyclo)
    • Line 501: warning: cyclomatic complexity 25 of function applyMultiStatements() is high (> 15) (gocyclo)
    • Line 754: warning: cyclomatic complexity 25 of function TypeString() is high (> 15) (gocyclo)
    • backend/store/task.go
    • Line 424: warning: cyclomatic complexity 24 of function (*Store).UpdateTaskV2() is high (> 15) (gocyclo)
    • Line 295: warning: cyclomatic complexity 21 of function (*Store).ListTasks() is high (> 15) (gocyclo)
    • backend/api/v1/rollout_service_plan_check.go
    • Line 230: warning: cyclomatic complexity 19 of function getPlanCheckRunsFromChangeDatabaseConfigDeploymentConfigTarget() is high (> 15) (gocyclo)
    • Line 30: warning: cyclomatic complexity 17 of function getPlanCheckRunsFromSpec() is high (> 15) (gocyclo)
    • backend/plugin/parser/sql/transform/mysql/transform.go
    • Line 77: warning: cyclomatic complexity 44 of function (*SchemaTransformer).Normalize() is high (> 15) (gocyclo)
    • Line 343: warning: cyclomatic complexity 26 of function (*SchemaTransformer).Check() is high (> 15) (gocyclo)
    • Line 434: warning: cyclomatic complexity 20 of function (*SchemaTransformer).Transform() is high (> 15) (gocyclo)
    • backend/plugin/db/util/driverutil.go
    • Line 306: warning: cyclomatic complexity 38 of function readRows() is high (> 15) (gocyclo)
    • Line 40: warning: cyclomatic complexity 25 of function ApplyMultiStatements() is high (> 15) (gocyclo)
    • Line 123: warning: cyclomatic complexity 19 of function Query() is high (> 15) (gocyclo)
    • backend/plugin/db/pg/pg.go
    • Line 271: warning: cyclomatic complexity 23 of function (*Driver).Execute() is high (> 15) (gocyclo)
    • Line 79: warning: cyclomatic complexity 19 of function (*Driver).Open() is high (> 15) (gocyclo)
    • backend/api/v1/common.go
    • Line 308: warning: cyclomatic complexity 17 of function convertToEngine() is high (> 15) (gocyclo)
    • Line 346: warning: cyclomatic complexity 17 of function convertEngine() is high (> 15) (gocyclo)
    • backend/api/v1/instance_service.go
    • Line 565: warning: cyclomatic complexity 40 of function (*InstanceService).UpdateDataSource() is high (> 15) (gocyclo)
    • Line 165: warning: cyclomatic complexity 21 of function (*InstanceService).UpdateInstance() is high (> 15) (gocyclo)
    • Line 83: warning: cyclomatic complexity 16 of function (*InstanceService).CreateInstance() is high (> 15) (gocyclo)
    • backend/plugin/db/util/mask_sensitive_data_mysql.go
    • Line 264: warning: cyclomatic complexity 53 of function (*recursiveCTEListener).EnterQueryExpressionBody() is high (> 15) (gocyclo)
    • Line 947: warning: cyclomatic complexity 36 of function (*sensitiveFieldExtractor).mysqlMergeJoin() is high (> 15) (gocyclo)
    • Line 1360: warning: cyclomatic complexity 31 of function (*sensitiveFieldExtractor).mysqlCheckFieldMaskingLevel() is high (> 15) (gocyclo)
    • Line 858: warning: cyclomatic complexity 21 of function (*sensitiveFieldExtractor).mysqlExtractTableWild() is high (> 15) (gocyclo)
    • Line 655: warning: cyclomatic complexity 20 of function (*sensitiveFieldExtractor).mysqlFindTableSchema() is high (> 15) (gocyclo)
    • Line 712: warning: cyclomatic complexity 16 of function (*sensitiveFieldExtractor).mysqlFindViewSchema() is high (> 15) (gocyclo)
    • backend/api/v1/idp_service.go
    • Line 199: warning: cyclomatic complexity 26 of function (*IdentityProviderService).TestIdentityProvider() is high (> 15) (gocyclo)
    • Line 98: warning: cyclomatic complexity 19 of function (*IdentityProviderService).UpdateIdentityProvider() is high (> 15) (gocyclo)
    • backend/store/principal.go
    • Line 353: warning: cyclomatic complexity 20 of function (*Store).UpdateUser() is high (> 15) (gocyclo)
    • Line 180: warning: cyclomatic complexity 16 of function (*Store).listUserImpl() is high (> 15) (gocyclo)
    • backend/api/v1/auth_service.go
    • Line 239: warning: cyclomatic complexity 46 of function (*AuthService).UpdateUser() is high (> 15) (gocyclo)
    • Line 93: warning: cyclomatic complexity 32 of function (*AuthService).CreateUser() is high (> 15) (gocyclo)
    • Line 663: warning: cyclomatic complexity 28 of function (*AuthService).getOrCreateUserWithIDP() is high (> 15) (gocyclo)
    • Line 532: warning: cyclomatic complexity 26 of function (*AuthService).Login() is high (> 15) (gocyclo)
    • backend/api/v1/rollout_service_task.go
    • Line 677: warning: cyclomatic complexity 35 of function getTaskCreatesFromRestoreDatabaseConfig() is high (> 15) (gocyclo)
    • Line 492: warning: cyclomatic complexity 29 of function getTaskCreatesFromChangeDatabaseConfigDatabaseGroupTarget() is high (> 15) (gocyclo)
    • Line 276: warning: cyclomatic complexity 29 of function getTaskCreatesFromChangeDatabaseConfigDatabaseTarget() is high (> 15) (gocyclo)
    • Line 112: warning: cyclomatic complexity 29 of function getTaskCreatesFromCreateDatabaseConfig() is high (> 15) (gocyclo)
    • Line 892: warning: cyclomatic complexity 20 of function checkCharacterSetCollationOwner() is high (> 15) (gocyclo)
    • Line 948: warning: cyclomatic complexity 19 of function getCreateDatabaseStatement() is high (> 15) (gocyclo)
    • Line 25: warning: cyclomatic complexity 16 of function transformDeploymentConfigTargetToSteps() is high (> 15) (gocyclo)
    • backend/runner/mail/slow_query_weekly_mail.go
    • Line 225: warning: cyclomatic complexity 32 of function (*SlowQueryWeeklyMailSender).generateWeeklyEmailForProject() is high (> 15) (gocyclo)
    • Line 83: warning: cyclomatic complexity 32 of function (*SlowQueryWeeklyMailSender).sendEmail() is high (> 15) (gocyclo)
    • Line 526: warning: cyclomatic complexity 23 of function (*SlowQueryWeeklyMailSender).generateEnvironmentContent() is high (> 15) (gocyclo)
    • Line 411: warning: cyclomatic complexity 21 of function (*SlowQueryWeeklyMailSender).generateWeeklyEmailForDBA() is high (> 15) (gocyclo)
    • backend/api/v1/org_policy_service.go
    • Line 535: warning: cyclomatic complexity 43 of function (*OrgPolicyService).convertPolicyPayloadToString() is high (> 15) (gocyclo)
    • Line 656: warning: cyclomatic complexity 28 of function convertToPolicy() is high (> 15) (gocyclo)
    • Line 234: warning: cyclomatic complexity 23 of function (*OrgPolicyService).getPolicyResourceTypeAndID() is high (> 15) (gocyclo)
    • Line 474: warning: cyclomatic complexity 22 of function validatePolicyPayload() is high (> 15) (gocyclo)
    • backend/plugin/parser/sql/differ/mysql/differ.go
    • Line 1452: warning: cyclomatic complexity 32 of function isTableOptionValEqual() is high (> 15) (gocyclo)
    • Line 1320: warning: cyclomatic complexity 28 of function dropTableOption() is high (> 15) (gocyclo)
    • Line 472: warning: cyclomatic complexity 28 of function (*diffNode).deparse() is high (> 15) (gocyclo)
    • Line 620: warning: cyclomatic complexity 16 of function getID() is high (> 15) (gocyclo)
    • backend/runner/taskrun/executor.go
    • Line 392: warning: cyclomatic complexity 26 of function postMigration() is high (> 15) (gocyclo)
    • Line 67: warning: cyclomatic complexity 26 of function getMigrationInfo() is high (> 15) (gocyclo)
    • Line 185: warning: cyclomatic complexity 23 of function executeMigration() is high (> 15) (gocyclo)
    • Line 546: warning: cyclomatic complexity 19 of function isWriteBack() is high (> 15) (gocyclo)
    • backend/runner/plancheck/statement_type_executor.go
    • Line 161: warning: cyclomatic complexity 35 of function (*StatementTypeExecutor).runForDatabaseGroupTarget() is high (> 15) (gocyclo)
    • Line 53: warning: cyclomatic complexity 21 of function (*StatementTypeExecutor).runForDatabaseTarget() is high (> 15) (gocyclo)
    • Line 340: warning: cyclomatic complexity 16 of function (*StatementTypeExecutor).mysqlSDLTypeCheck() is high (> 15) (gocyclo)
    • backend/plugin/parser/sql/engine/pg/convert.go
    • Line 17: warning: cyclomatic complexity 164 of function convert() is high (> 15) (gocyclo)
    • Line 883: warning: cyclomatic complexity 28 of function convertAlterSequence() is high (> 15) (gocyclo)
    • Line 1050: warning: cyclomatic complexity 27 of function convertExpressionNode() is high (> 15) (gocyclo)
    • Line 1380: warning: cyclomatic complexity 24 of function convertConstraint() is high (> 15) (gocyclo)
    • Line 1612: warning: cyclomatic complexity 18 of function convertDataType() is high (> 15) (gocyclo)
    • Line 1180: warning: cyclomatic complexity 16 of function convertSelectStmt() is high (> 15) (gocyclo)
    • backend/api/v1/setting_service.go
    • Line 136: warning: cyclomatic complexity 92 of function (*SettingService).SetSetting() is high (> 15) (gocyclo)
    • Line 555: warning: cyclomatic complexity 23 of function (*SettingService).convertToSettingMessage() is high (> 15) (gocyclo)
    • backend/runner/taskrun/schedulerv2.go
    • Line 114: warning: cyclomatic complexity 29 of function (*SchedulerV2).scheduleAutoRolloutTask() is high (> 15) (gocyclo)
    • Line 503: warning: cyclomatic complexity 27 of function (*SchedulerV2).ListenTaskSkippedOrDone() is high (> 15) (gocyclo)
    • Line 287: warning: cyclomatic complexity 16 of function (*SchedulerV2).scheduleRunningTaskRuns() is high (> 15) (gocyclo)
    • Line 358: warning: cyclomatic complexity 16 of function (*SchedulerV2).runTaskRunOnce() is high (> 15) (gocyclo)
    • backend/plugin/db/util/mask_sensitive_data_plsql.go
    • Line 414: warning: cyclomatic complexity 171 of function (*sensitiveFieldExtractor).plsqlEvalMaskingLevelInExpression() is high (> 15) (gocyclo)
    • Line 1021: warning: cyclomatic complexity 21 of function (*sensitiveFieldExtractor).plsqlMergeJoin() is high (> 15) (gocyclo)
    • Line 311: warning: cyclomatic complexity 16 of function (*sensitiveFieldExtractor).plsqlExtractQueryBlock() is high (> 15) (gocyclo)
    • backend/runner/backuprun/runner.go
    • Line 310: warning: cyclomatic complexity 22 of function (*Runner).startAutoBackups() is high (> 15) (gocyclo)
    • Line 403: warning: cyclomatic complexity 17 of function (*Runner).ScheduleBackupTask() is high (> 15) (gocyclo)
    • backend/server/webhook.go
    • Line 62: warning: cyclomatic complexity 99 of function (*Server).registerWebhookRoutes() is high (> 15) (gocyclo)
    • Line 911: warning: cyclomatic complexity 20 of function (*Server).sqlAdviceForFile() is high (> 15) (gocyclo)
    • Line 769: warning: cyclomatic complexity 20 of function (*Server).sqlAdviceForMybatisMapperFile() is high (> 15) (gocyclo)
    • Line 2049: warning: cyclomatic complexity 19 of function (*Server).tryUpdateTasksFromModifiedFile() is high (> 15) (gocyclo)
    • backend/api/v1/sheet_service.go
    • Line 438: warning: cyclomatic complexity 39 of function (*SheetService).SyncSheets() is high (> 15) (gocyclo)
    • Line 181: warning: cyclomatic complexity 27 of function (*SheetService).SearchSheets() is high (> 15) (gocyclo)
    • Line 300: warning: cyclomatic complexity 21 of function (*SheetService).UpdateSheet() is high (> 15) (gocyclo)
    • Line 821: warning: cyclomatic complexity 18 of function (*SheetService).convertToAPISheetMessage() is high (> 15) (gocyclo)
    • Line 46: warning: cyclomatic complexity 16 of function (*SheetService).CreateSheet() is high (> 15) (gocyclo)
    • backend/plugin/db/util/mask_sensitive_data_snowsql.go
    • Line 273: warning: cyclomatic complexity 175 of function (*sensitiveFieldExtractor).evalSnowSQLExprMaskingLevel() is high (> 15) (gocyclo)
    • Line 919: warning: cyclomatic complexity 29 of function (*sensitiveFieldExtractor).extractSnowsqlSensitiveFieldsObjectRef() is high (> 15) (gocyclo)
    • Line 176: warning: cyclomatic complexity 26 of function (*sensitiveFieldExtractor).extractSnowsqlSensitiveFieldsSelectStatement() is high (> 15) (gocyclo)
    • Line 61: warning: cyclomatic complexity 24 of function (*sensitiveFieldExtractor).extractSnowsqlSensitiveFieldsQueryStatement() is high (> 15) (gocyclo)
    • Line 1137: warning: cyclomatic complexity 18 of function (*sensitiveFieldExtractor).snowflakeGetField() is high (> 15) (gocyclo)
    • backend/runner/plancheck/statement_report_executor.go
    • Line 816: warning: cyclomatic complexity 53 of function getStatementTypeAndResourcesFromAstNode() is high (> 15) (gocyclo)
    • Line 160: warning: cyclomatic complexity 36 of function (*StatementReportExecutor).runForDatabaseGroupTarget() is high (> 15) (gocyclo)
    • Line 709: warning: cyclomatic complexity 28 of function getStatementTypeFromTidbAstNode() is high (> 15) (gocyclo)
    • Line 50: warning: cyclomatic complexity 22 of function (*StatementReportExecutor).runForDatabaseTarget() is high (> 15) (gocyclo)
    • Line 577: warning: cyclomatic complexity 17 of function postgresExtractResourcesFromCommentStatement() is high (> 15) (gocyclo)
    • backend/tests/tenant_test.go
    • Line 626: warning: cyclomatic complexity 16 of function TestTenantVCSDatabaseNameTemplate() is high (> 15) (gocyclo)
    • Line 197: warning: cyclomatic complexity 16 of function TestTenantVCS() is high (> 15) (gocyclo)
    • backend/api/v1/database_service.go
    • Line 1370: warning: cyclomatic complexity 42 of function (*DatabaseService).ListSlowQueries() is high (> 15) (gocyclo)
    • Line 1553: warning: cyclomatic complexity 28 of function sortSlowQueryLogResponse() is high (> 15) (gocyclo)
    • Line 2138: warning: cyclomatic complexity 27 of function (*DatabaseService).mysqlAdviseIndex() is high (> 15) (gocyclo)
    • Line 187: warning: cyclomatic complexity 23 of function (*DatabaseService).UpdateDatabase() is high (> 15) (gocyclo)
    • Line 1196: warning: cyclomatic complexity 22 of function (*DatabaseService).UpdateSecret() is high (> 15) (gocyclo)
    • Line 394: warning: cyclomatic complexity 20 of function (*DatabaseService).GetDatabaseMetadata() is high (> 15) (gocyclo)
    • Line 321: warning: cyclomatic complexity 18 of function (*DatabaseService).BatchUpdateDatabases() is high (> 15) (gocyclo)
    • Line 699: warning: cyclomatic complexity 18 of function (*DatabaseService).ListChangeHistories() is high (> 15) (gocyclo)
    • backend/api/v1/project_service.go
    • Line 399: warning: cyclomatic complexity 37 of function (*ProjectService).UpdateProjectGitOpsInfo() is high (> 15) (gocyclo)
    • Line 986: warning: cyclomatic complexity 27 of function (*ProjectService).createProjectGitOpsInfo() is high (> 15) (gocyclo)
    • Line 2226: warning: cyclomatic complexity 24 of function convertToActivityTypeStrings() is high (> 15) (gocyclo)
    • Line 2281: warning: cyclomatic complexity 23 of function convertNotificationTypeStrings() is high (> 15) (gocyclo)
    • Line 113: warning: cyclomatic complexity 19 of function (*ProjectService).UpdateProject() is high (> 15) (gocyclo)
    • Line 1884: warning: cyclomatic complexity 18 of function (*ProjectService).UpdateSchemaGroup() is high (> 15) (gocyclo)
    • Line 790: warning: cyclomatic complexity 17 of function (*ProjectService).UpdateWebhook() is high (> 15) (gocyclo)
    • Line 1632: warning: cyclomatic complexity 16 of function (*ProjectService).UpdateDatabaseGroup() is high (> 15) (gocyclo)
    • backend/plugin/db/oracle/dump.go
    • Line 549: warning: cyclomatic complexity 49 of function (*mergedConstraintMeta).assembleStatement() is high (> 15) (gocyclo)
    • Line 105: warning: cyclomatic complexity 44 of function (*tableSchema).assembleStatement() is high (> 15) (gocyclo)
    • Line 786: warning: cyclomatic complexity 35 of function assembleIndexStatement() is high (> 15) (gocyclo)
    • Line 1018: warning: cyclomatic complexity 29 of function (*mergedIndexMeta).assembleStorage() is high (> 15) (gocyclo)
    • Line 288: warning: cyclomatic complexity 27 of function (*tableSchema).assembleCompression() is high (> 15) (gocyclo)
    • Line 470: warning: cyclomatic complexity 25 of function (*fieldMeta).assembleType() is high (> 15) (gocyclo)
    • Line 229: warning: cyclomatic complexity 22 of function (*tableSchema).assembleStorage() is high (> 15) (gocyclo)
    • Line 687: warning: cyclomatic complexity 21 of function (*mergedConstraintMeta).assembleConstraintState() is high (> 15) (gocyclo)
    • Line 1638: warning: cyclomatic complexity 20 of function dumpTableTxn() is high (> 15) (gocyclo)
    • Line 900: warning: cyclomatic complexity 16 of function assembleIndexProperties() is high (> 15) (gocyclo)
    • backend/plugin/db/util/mask_sensitive_data_tidb.go
    • Line 406: warning: cyclomatic complexity 30 of function (*sensitiveFieldExtractor).extractColumnFromExprNode() is high (> 15) (gocyclo)
    • Line 150: warning: cyclomatic complexity 20 of function (*sensitiveFieldExtractor).extractRecursiveCTE() is high (> 15) (gocyclo)
    • Line 541: warning: cyclomatic complexity 20 of function (*sensitiveFieldExtractor).findTableSchema() is high (> 15) (gocyclo)
    • Line 696: warning: cyclomatic complexity 18 of function mergeJoinField() is high (> 15) (gocyclo)
    • Line 293: warning: cyclomatic complexity 16 of function (*sensitiveFieldExtractor).extractSelect() is high (> 15) (gocyclo)
    • Line 622: warning: cyclomatic complexity 16 of function (*sensitiveFieldExtractor).findViewSchema() is high (> 15) (gocyclo)
    • backend/api/v1/issue_service.go
    • Line 241: warning: cyclomatic complexity 41 of function (*IssueService).SearchIssues() is high (> 15) (gocyclo)
    • Line 685: warning: cyclomatic complexity 34 of function (*IssueService).ApproveIssue() is high (> 15) (gocyclo)
    • Line 109: warning: cyclomatic complexity 32 of function (*IssueService).ListIssues() is high (> 15) (gocyclo)
    • Line 1077: warning: cyclomatic complexity 29 of function (*IssueService).UpdateIssue() is high (> 15) (gocyclo)
    • Line 550: warning: cyclomatic complexity 23 of function (*IssueService).createIssueGrantRequest() is high (> 15) (gocyclo)
    • Line 431: warning: cyclomatic complexity 20 of function (*IssueService).createIssueDatabaseChange() is high (> 15) (gocyclo)
    • Line 971: warning: cyclomatic complexity 20 of function (*IssueService).RequestIssue() is high (> 15) (gocyclo)
    • Line 870: warning: cyclomatic complexity 18 of function (*IssueService).RejectIssue() is high (> 15) (gocyclo)
    • Line 1391: warning: cyclomatic complexity 16 of function isUserReviewer() is high (> 15) (gocyclo)
    • backend/server/server.go
    • Line 193: warning: cyclomatic complexity 55 of function NewServer() is high (> 15) (gocyclo)
    • Line 657: warning: cyclomatic complexity 24 of function (*Server).getInitSetting() is high (> 15) (gocyclo)
    • backend/api/v1/sql_service.go
    • Line 2013: warning: cyclomatic complexity 84 of function (*SQLService).extractResourceList() is high (> 15) (gocyclo)
    • Line 1335: warning: cyclomatic complexity 42 of function (*SQLService).getSensitiveSchemaInfo() is high (> 15) (gocyclo)
    • Line 1132: warning: cyclomatic complexity 36 of function (*SQLService).preQuery() is high (> 15) (gocyclo)
    • Line 771: warning: cyclomatic complexity 32 of function (*SQLService).preExport() is high (> 15) (gocyclo)
    • Line 2389: warning: cyclomatic complexity 24 of function (*SQLService).checkQueryRights() is high (> 15) (gocyclo)
    • Line 1947: warning: cyclomatic complexity 23 of function validateQueryRequest() is high (> 15) (gocyclo)
    • Line 334: warning: cyclomatic complexity 17 of function (*SQLService).doExport() is high (> 15) (gocyclo)
    • Line 1753: warning: cyclomatic complexity 17 of function (*SQLService).sqlReviewCheck() is high (> 15) (gocyclo)
    • Line 116: warning: cyclomatic complexity 16 of function (*SQLService).AdminExecute() is high (> 15) (gocyclo)
    • backend/store/issue.go
    • Line 674: warning: cyclomatic complexity 37 of function (*Store).ListIssueV2() is high (> 15) (gocyclo)
    • Line 211: warning: cyclomatic complexity 20 of function (*Store).composePipeline() is high (> 15) (gocyclo)
    • Line 524: warning: cyclomatic complexity 18 of function (*Store).UpdateIssueV2() is high (> 15) (gocyclo)
    • Line 602: warning: cyclomatic complexity 16 of function setSubscribers() is high (> 15) (gocyclo)
    • backend/store/instance_change_history.go
    • Line 518: warning: cyclomatic complexity 32 of function (*Store).ListInstanceChangeHistory() is high (> 15) (gocyclo)
    • Line 835: warning: cyclomatic complexity 21 of function (*Store).ListInstanceChangeHistoryForMigrator() is high (> 15) (gocyclo)
    • Line 339: warning: cyclomatic complexity 18 of function generateResourceFilter() is high (> 15) (gocyclo)
    • Line 454: warning: cyclomatic complexity 16 of function (*expressionRewriter).rewriteExpression() is high (> 15) (gocyclo)
    • backend/tests/rollout.go
    • Line 72: warning: cyclomatic complexity 24 of function (*controller).waitRollout() is high (> 15) (gocyclo)
    • Line 166: warning: cyclomatic complexity 22 of function (*controller).rolloutAndWaitTask() is high (> 15) (gocyclo)
    • backend/plugin/db/util/mask_sensitive_data_tsql.go
    • Line 773: warning: cyclomatic complexity 783 of function (*sensitiveFieldExtractor).evalExpressionElemMaskingLevel() is high (> 15) (gocyclo)
    • Line 64: warning: cyclomatic complexity 34 of function (*sensitiveFieldExtractor).extractTSqlSensitiveFieldsFromSelectStatementStandalone() is high (> 15) (gocyclo)
    • Line 686: warning: cyclomatic complexity 18 of function (*sensitiveFieldExtractor).tsqlIsFieldSensitive() is high (> 15) (gocyclo)
    • Line 213: warning: cyclomatic complexity 17 of function (*sensitiveFieldExtractor).extractTSqlSensitiveFieldsFromQueryExpression() is high (> 15) (gocyclo)
    • backend/api/v1/rollout_service.go
    • Line 737: warning: cyclomatic complexity 59 of function (*RolloutService).UpdatePlan() is high (> 15) (gocyclo)
    • Line 613: warning: cyclomatic complexity 30 of function (*RolloutService).BatchCancelTaskRuns() is high (> 15) (gocyclo)
    • Line 404: warning: cyclomatic complexity 30 of function (*RolloutService).BatchRunTasks() is high (> 15) (gocyclo)
    • Line 1118: warning: cyclomatic complexity 18 of function (*RolloutService).createPipeline() is high (> 15) (gocyclo)
    • Line 243: warning: cyclomatic complexity 16 of function (*RolloutService).CreateRollout() is high (> 15) (gocyclo)
    • Line 540: warning: cyclomatic complexity 16 of function (*RolloutService).BatchSkipTasks() is high (> 15) (gocyclo)

license100%

Checks whether your project has a LICENSE file.

No problems detected. Good job!


misspell100%

Misspell Finds commonly misspelled English words

No problems detected. Good job!