bazelbuild / bazel-skylib
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
  • 17% duplication:
    • 2,695 cleaned lines of cleaned code (without empty lines, comments, and frequently duplicated constructs such as imports)
    • 460 duplicated lines
  • 358 duplicates
system17% (460 lines)
Duplication per Extension
bzl18% (460 lines)
Duplication per Component (primary)
lib13% (221 lines)
rules26% (99 lines)
rules/private21% (75 lines)
ROOT39% (65 lines)
gazelle/bzl0% (0 lines)

Duplication Between Components (50+ lines)

G ROOT ROOT lib lib ROOT--lib 232 rules rules lib--rules 228 rules/private rules/private lib--rules/private 192 rules--ROOT 139 rules--rules/private 116 rules/private--ROOT 101

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 358 duplicates...
Size#FoldersFilesLinesCode
13 x 2 ROOT
lib
bzl_library.bzl
shell.bzl
1:13 (13%)
1:13 (30%)
view
13 x 2 lib
lib
collections.bzl
selects.bzl
1:13 (22%)
1:13 (6%)
view
13 x 2 rules
ROOT
common_settings.bzl
workspace.bzl
1:13 (15%)
1:13 (72%)
view
13 x 2 lib
lib
shell.bzl
unittest.bzl
1:13 (30%)
1:13 (2%)
view
13 x 2 rules
rules
common_settings.bzl
run_binary.bzl
1:13 (15%)
1:13 (13%)
view
13 x 2 lib
lib
old_sets.bzl
selects.bzl
1:13 (86%)
1:13 (6%)
view
13 x 2 rules
ROOT
copy_file.bzl
workspace.bzl
1:13 (54%)
1:13 (72%)
view
13 x 2 ROOT
ROOT
bzl_library.bzl
lib.bzl
1:13 (13%)
1:13 (72%)
view
13 x 2 lib
lib
selects.bzl
structs.bzl
1:13 (6%)
1:13 (39%)
view
13 x 2 lib
lib
old_sets.bzl
structs.bzl
1:13 (86%)
1:13 (39%)
view
13 x 2 rules
ROOT
common_settings.bzl
version.bzl
1:13 (15%)
1:13 (86%)
view
13 x 2 lib
lib
structs.bzl
unittest.bzl
1:13 (39%)
1:13 (2%)
view
13 x 2 lib
lib
dicts.bzl
paths.bzl
1:13 (36%)
1:13 (6%)
view
13 x 2 lib
lib
collections.bzl
dicts.bzl
1:13 (22%)
1:13 (36%)
view
13 x 2 ROOT
ROOT
version.bzl
workspace.bzl
1:13 (86%)
1:13 (72%)
view
13 x 2 rules
rules
common_settings.bzl
write_file.bzl
1:13 (15%)
1:13 (52%)
view
13 x 2 lib
ROOT
new_sets.bzl
skylark_library.bzl
1:13 (6%)
1:13 (65%)
view
13 x 2 lib
lib
collections.bzl
shell.bzl
1:13 (22%)
1:13 (30%)
view
13 x 2 lib
lib
old_sets.bzl
shell.bzl
1:13 (86%)
1:13 (30%)
view
13 x 2 rules
rules/private
native_binary.bzl
copy_file_private.bzl
1:13 (12%)
1:13 (10%)
view