8000 Improve code quality · Issue #67 · amitsaha/gitbackup · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content
Improve code quality #67
Open
Open
@amitsaha

Description

@amitsaha

Any PRs to improve code quality is welcome.

Some metrics/analysis to guide starting points:

# https://github.com/fzipp/gocyclo

$ ~/go/bin/gocyclo .
21 main getGithubRepositories github.go:11:1
17 main getGitlabRepositories gitlab.go:10:1
17 main newClient client.go:74:1
13 main getBitbucketRepositories bitbucket.go:10:1
11 main handleGithubCreateUserMigration github_create_user_migration.go:9:1
11 main backUp backup.go:22:1
10 main downloadGithubUserMigrationData user_data.go:93:1
9 main downloadGithubOrgMigrationData user_data.go:144:1
9 main TestCliUsage cli_test.go:15:1
8 main getUsername helpers.go:12:1
8 main handleGitRepositoryClone git_repository_clone.go:9:1
7 main getGithubOrgRepositories user_data.go:271:1
6 main createGithubUserMigration user_data.go:40:1
6 main TestGetStarredGitLabRepositories repositories_test.go:191:1
6 main main main.go:26:1
6 main setupBackupDir backup.go:75:1
5 main TestGetGithubOrganizationRepositories user_org_migration_test.go:87:1
5 main handleGithubListUserMigrations github_list_user_migrations.go:11:1
5 main TestHelperRemoteUpdateProcess backup_test.go:128:1
4 main TestGetUserOwnedOrganizations user_org_migration_test.go:39:1
4 main TestCreateGitHubUserMigrationFailOnceThenSucceed user_migration_test.go:62:1
4 main getGithubUserOwnedOrgs user_data.go:254:1
4 main TestGetBitbucketRepositories repositories_test.go:221:1
4 main TestGetGitLabPrivateRepositories repositories_test.go:165:1
4 main TestGetGitLabRepositories repositories_test.go:144:1
4 main getRepositories repositories.go:33:1
4 main initConfig options.go:9:1
4 main TestNewClient client_test.go:12:1
4 main TestSetupBackupDir backup_test.go:140:1
4 main TestHelperCloneProcess backup_test.go:116:1
4 main TestHelperPullProcess backup_test.go:104:1
3 main TestDownloadGithubUserOrgMigrationDataArchiveDownload user_org_migration_test.go:226:1
3 main TestDownloadGithubUserOrgMigrationDataArchiveDownloadFail user_org_migration_test.go:190:1
3 main TestGetUserOwnedOrganizationsNone user_org_migration_test.go:19:1
3 main TestDownloadGithubUserMigrationDataArchiveDownload user_migration_test.go:167:1
3 main TestDownloadGithubUserMigrationDataArchiveDownloadFail user_migration_test.go:132:1
3 main DeleteGithubUserMigration user_data.go:235:1
3 main getGithubUserMigrations user_data.go:198:1
3 main createGithubOrgMigration user_data.go:74:1
3 main TestGetWhitelistGitHubRepositories repositories_test.go:119:1
3 main TestGetStarredGitHubRepositories repositories_test.go:100:1
3 main TestGetPrivateGitHubRepositories repositories_test.go:81:1
3 main TestGetPublicGitHubRepositories repositories_test.go:62:1
3 main validateConfig options.go:80:1
3 main contains helpers.go:56:1
3 main validGitlabProjectMembership helpers.go:46:1
3 main getToken client.go:60:1
3 main startOAuthFlow client.go:24:1
3 main TestBareBackup backup_test.go:71:1
3 main TestBackup backup_test.go:38:1
2 main TestDownloadGithubUserOrgMigrationDataFailed user_org_migration_test.go:163:1
2 main TestCreateGithubUserOrgMigration user_org_migration_test.go:133:1
2 main TestDownloadGithubUserMigrationDataFailed user_migration_test.go:106:1
2 main TestCreateGitHubUserMigrationRetryMax user_migration_test.go:33:1
2 main setupRepositoryTests repositories_test.go:26:1
2 main saveToken client.go:45:1
1 main (*requestCounter).RoundTrip user_migration_test.go:25:1
1 main GetGithubUserMigration user_data.go:222:1
1 main getLocalOrgMigrationFilepath user_data.go:36:1
1 main getLocalMigrationFilepath user_data.go:32:1
1 main teardownRepositoryTests repositories_test.go:54:1
1 main writeExpectedGoldenFile cli_test.go:71:1
1 main fakeRemoteUpdateCommand backup_test.go:30:1
1 main fakeCloneCommand backup_test.go:22:1
1 main fakePullCommand backup_test.go:14:1
1 main createBackupRootDirIfRequired backup.go:107:1

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      0