aws / aws-cloud-map-mcs-controller-for-k8s
Duplication

Places in code with 6 or more lines that are exactly the same.

Intro
  • For duplication, we look at places in code where there are 6 or more lines of code that are exactly the same.
  • Before duplication is calculated, the code is cleaned to remove empty lines, comments, and frequently duplicated constructs such as imports.
  • You should aim at having as little as possible (<5%) of duplicated code as high-level of duplication can lead to maintenance difficulties, poor factoring, and logical contradictions.
Learn more...
Duplication Overall
  • 8% duplication:
    • 2,637 cleaned lines of cleaned code (without empty lines, comments, and frequently duplicated constructs such as imports)
    • 231 duplicated lines
  • 20 duplicates
system8% (231 lines)
Duplication per Extension
yaml24% (213 lines)
go1% (18 lines)
Duplication per Component (primary)
config/rbac45% (126 lines)
config/crd20% (58 lines)
config/default32% (29 lines)
pkg/cloudmap3% (18 lines)
pkg/api0% (0 lines)
pkg/controllers0% (0 lines)
pkg/common0% (0 lines)
pkg/model0% (0 lines)
pkg/version0% (0 lines)
config/manager0% (0 lines)
config/controller_install_latest0% (0 lines)
config/certmanager0% (0 lines)
config/prometheus0% (0 lines)
config/controller_install_release0% (0 lines)
config/webhook0% (0 lines)
integration/configs0% (0 lines)
integration/scenarios0% (0 lines)
integration/janitor0% (0 lines)
ROOT0% (0 lines)
Longest Duplicates
The list of 20 longest duplicates.
See data for all 20 duplicates...
Size#FoldersFilesLinesCode
13 x 2 config/crd/bases
config/crd/bases
multicluster.x-k8s.io_serviceexports....
multicluster.x-k8s.io_serviceimports....
24:36 (16%)
24:36 (9%)
view
12 x 2 config/rbac
config/rbac
role.yaml
serviceimport_editor_role.yaml
55:66 (18%)
7:18 (52%)
view
11 x 2 config/rbac
config/rbac
serviceexport_editor_role.yaml
serviceimport_editor_role.yaml
11:21 (47%)
11:21 (47%)
view
10 x 2 config/default
config/default
manager_config_patch.yaml
manager_webhook_patch.yaml
1:10 (50%)
1:10 (43%)
view
9 x 2 config/rbac
config/rbac
leader_election_role.yaml
leader_election_role.yaml
11:19 (25%)
23:31 (25%)
view
9 x 2 config/default
config/default
manager_auth_proxy_patch.yaml
manager_webhook_patch.yaml
3:11 (37%)
1:9 (39%)
view
9 x 2 config/default
config/default
manager_auth_proxy_patch.yaml
manager_config_patch.yaml
3:11 (37%)
1:9 (45%)
view
9 x 2 config/crd/patches
config/crd/patches
webhook_in_serviceexports.yaml
webhook_in_serviceimports.yaml
6:14 (69%)
6:14 (69%)
view
9 x 2 pkg/cloudmap
pkg/cloudmap
client.go
client.go
147:159 (5%)
191:203 (5%)
view
8 x 2 config/rbac
config/rbac
role.yaml
serviceexport_editor_role.yaml
59:66 (12%)
11:18 (34%)
view
8 x 2 config/rbac
config/rbac
role.yaml
serviceexport_editor_role.yaml
43:50 (12%)
14:21 (34%)
view
8 x 2 config/rbac
config/rbac
role.yaml
serviceimport_editor_role.yaml
43:50 (12%)
14:21 (34%)
view
8 x 2 config/rbac
config/rbac
role.yaml
role.yaml
20:27 (12%)
31:38 (12%)
view
7 x 2 config/crd/bases
config/crd/bases
multicluster.x-k8s.io_serviceexports....
multicluster.x-k8s.io_serviceimports....
2:8 (8%)
2:8 (4%)
view
7 x 2 config/rbac
config/rbac
serviceimport_editor_role.yaml
serviceimport_viewer_role.yaml
18:24 (30%)
14:20 (36%)
view
7 x 2 config/rbac
config/rbac
serviceexport_viewer_role.yaml
serviceimport_viewer_role.yaml
11:17 (36%)
11:17 (36%)
view
7 x 2 config/rbac
config/rbac
serviceexport_editor_role.yaml
serviceexport_viewer_role.yaml
18:24 (30%)
14:20 (36%)
view
7 x 2 config/rbac
config/rbac
role.yaml
serviceexport_viewer_role.yaml
38:44 (10%)
7:13 (36%)
view
6 x 2 config/rbac
config/rbac
serviceexport_editor_role.yaml
serviceexport_viewer_role.yaml
6:11 (26%)
6:11 (31%)
view
6 x 2 config/rbac
config/rbac
serviceimport_editor_role.yaml
serviceimport_viewer_role.yaml
6:11 (26%)
6:11 (31%)
view