bazelbuild / rules_swift
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
  • 14% duplication:
    • 11,196 cleaned lines of cleaned code (without empty lines, comments, and frequently duplicated constructs such as imports)
    • 1,589 duplicated lines
  • 954 duplicates
system14% (1,589 lines)
Duplication per Extension
bzl15% (1,565 lines)
h7% (12 lines)
cc1% (12 lines)
Duplication per Component (primary)
swift/internal15% (1,526 lines)
swift16% (39 lines)
tools/common3% (12 lines)
tools/worker2% (12 lines)

Duplication Between Components (50+ lines)

G swift swift swift/internal swift/internal swift--swift/internal 443

Download: SVG DOT (open online Graphviz editor)

Open 3D force graph...

Show more details on duplication between components...
Longest Duplicates
The list of 20 longest duplicates.
See data for all 954 duplicates...
Size#FoldersFilesLinesCode
24 x 2 swift/internal
swift/internal
attrs.bzl
attrs.bzl
57:85 (7%)
212:240 (7%)
view
17 x 2 swift/internal
swift/internal
swift_grpc_library.bzl
swift_protoc_gen_aspect.bzl
137:156 (4%)
176:194 (3%)
view
15 x 2 swift/internal
swift/internal
swift_grpc_library.bzl
swift_protoc_gen_aspect.bzl
61:75 (3%)
118:132 (2%)
view
14 x 2 swift/internal
swift/internal
swift_grpc_library.bzl
swift_protoc_gen_aspect.bzl
163:177 (3%)
200:214 (2%)
view
14 x 2 swift/internal
swift/internal
compiling.bzl
compiling.bzl
1955:1969 (<1%)
2008:2022 (<1%)
view
13 x 2 swift
swift/internal
extras.bzl
attrs.bzl
1:13 (40%)
1:13 (3%)
view
13 x 2 swift/internal
swift/internal
actions.bzl
swift_module_alias.bzl
1:13 (5%)
1:13 (8%)
view
13 x 2 swift/internal
swift/internal
attrs.bzl
swift_clang_module_aspect.bzl
1:13 (3%)
1:13 (2%)
view
13 x 2 swift/internal
swift/internal
derived_files.bzl
swift_clang_module_aspect.bzl
1:13 (4%)
1:13 (2%)
view
13 x 2 swift/internal
swift/internal
attrs.bzl
swift_toolchain.bzl
1:13 (3%)
1:13 (4%)
view
13 x 2 swift/internal
swift/internal
linking.bzl
xcode_swift_toolchain.bzl
1:13 (5%)
1:13 (1%)
view
13 x 2 swift/internal
swift
attrs.bzl
swift.bzl
1:13 (3%)
1:13 (13%)
view
13 x 2 swift/internal
swift/internal
providers.bzl
swift_proto_library.bzl
1:13 (3%)
1:13 (9%)
view
13 x 2 swift/internal
swift/internal
features.bzl
linking.bzl
1:13 (4%)
1:13 (5%)
view
13 x 2 swift/internal
swift/internal
debugging.bzl
swift_c_module.bzl
1:13 (7%)
1:13 (11%)
view
13 x 2 swift/internal
swift/internal
swift_clang_module_aspect.bzl
swift_import.bzl
1:13 (2%)
1:13 (9%)
view
13 x 2 swift/internal
swift/internal
derived_files.bzl
swift_common.bzl
1:13 (4%)
1:13 (19%)
view
13 x 2 swift/internal
swift/internal
attrs.bzl
swift_module_alias.bzl
1:13 (3%)
1:13 (8%)
view
13 x 2 swift/internal
swift/internal
attrs.bzl
swift_protoc_gen_aspect.bzl
1:13 (3%)
1:13 (2%)
view
13 x 2 swift/internal
swift/internal
providers.bzl
swift_usage_aspect.bzl
1:13 (3%)
1:13 (18%)
view