bazelbuild / rules_swift
File Size

The distribution of size of files (measured in lines of code).

Intro
  • File size measurements show the distribution of size of files.
  • Files are classified in four categories based on their size (lines of code): 1-100 (very small files), 101-200 (small files), 201-500 (medium size files), 501-1000 (long files), 1001+(very long files).
  • It is a good practice to keep files small. Long files may become "bloaters", code that have increased to such gargantuan proportions that they are hard to work with.
Learn more...
File Size Overall
  • There are 56 files with 11,519 lines of code.
    • 1 very long files (2,625 lines of code)
    • 3 long files (1,954 lines of code)
    • 14 medium size files (4,136 lines of codeclsfd_ftr_w_mp_ins)
    • 12 small files (1,683 lines of code)
    • 26 very small files (1,121 lines of code)
22% | 16% | 35% | 14% | 9%
Legend:
1001+
501-1000
201-500
101-200
1-100


explore: zoomable circles | sunburst | 3D view
File Size per Extension
1001+
501-1000
201-500
101-200
1-100
bzl25% | 18% | 37% | 12% | 6%
cc0% | 0% | 31% | 40% | 27%
h0% | 0% | 0% | 0% | 100%
File Size per Logical Decomposition
primary
1001+
501-1000
201-500
101-200
1-100
swift/internal25% | 19% | 37% | 11% | 4%
tools/worker0% | 0% | 42% | 35% | 22%
tools/common0% | 0% | 0% | 27% | 72%
swift0% | 0% | 0% | 45% | 54%
Longest Files (Top 50)
File# lines# units
compiling.bzl
in swift/internal
2625 -
xcode_swift_toolchain.bzl
in swift/internal
815 -
swift_clang_module_aspect.bzl
in swift/internal
610 -
swift_protoc_gen_aspect.bzl
in swift/internal
529 -
swift_grpc_library.bzl
in swift/internal
420 -
providers.bzl
in swift/internal
383 -
attrs.bzl
in swift/internal
328 -
toolchain_config.bzl
in swift/internal
310 -
swift_toolchain.bzl
in swift/internal
295 -
derived_files.bzl
in swift/internal
290 -
swift_runner.cc
in tools/worker
287 12
utils.bzl
in swift/internal
285 -
features.bzl
in swift/internal
276 -
swift_library.bzl
in swift/internal
272 -
swift_autoconfiguration.bzl
in swift/internal
262 -
linking.bzl
in swift/internal
249 -
feature_names.bzl
in swift/internal
243 -
actions.bzl
in swift/internal
236 -
proto_gen_utils.bzl
in swift/internal
180 -
debugging.bzl
in swift/internal
177 -
swift_module_alias.bzl
in swift/internal
156 -
package_specs.bzl
in swift/internal
150 -
module_maps.bzl
in swift/internal
144 -
swift_import.bzl
in swift/internal
140 -
swift_proto_library.bzl
in swift/internal
136 -
work_processor.cc
in tools/worker
132 2
process.cc
in tools/common
129 7
swift_c_module.bzl
in swift/internal
118 -
repositories.bzl
in swift
111 -
output_file_map.cc
in tools/worker
110 4
swift.bzl
in swift
100 -
file_system.cc
in tools/common
92 5
temp_file.h
in tools/common
86 6
swift_package_configuration.bzl
in swift/internal
78 -
autolinking.bzl
in swift/internal
77 -
build_settings.bzl
in swift/internal
77 -
swift_usage_aspect.bzl
in swift/internal
72 -
swift_feature_allowlist.bzl
in swift/internal
72 -
swift_common.bzl
in swift/internal
67 -
bazel_substitutions.cc
in tools/common
59 3
vfsoverlay.bzl
in swift/internal
58 -
swift_runner.h
in tools/worker
40 -
path_utils.cc
in tools/common
36 2
bazel_substitutions.h
in tools/common
35 2
compile_with_worker.cc
in tools/worker
33 1
extras.bzl
in swift
32 -
output_file_map.h
in tools/worker
24 3
worker_main.cc
in tools/worker
16 1
work_processor.h
in tools/worker
15 -
file_system.h
in tools/common
9 -
Files With Most Units (Top 14)
File# lines# units
swift_runner.cc
in tools/worker
287 12
process.cc
in tools/common
129 7
temp_file.h
in tools/common
86 6
file_system.cc
in tools/common
92 5
output_file_map.cc
in tools/worker
110 4
output_file_map.h
in tools/worker
24 3
bazel_substitutions.cc
in tools/common
59 3
work_processor.cc
in tools/worker
132 2
bazel_substitutions.h
in tools/common
35 2
path_utils.cc
in tools/common
36 2
compile_without_worker.cc
in tools/worker
8 1
no_worker_main.cc
in tools/worker
6 1
compile_with_worker.cc
in tools/worker
33 1
worker_main.cc
in tools/worker
16 1
Files With Long Lines (Top 2)

There are 2 files with lines longer than 120 characters. In total, there are 2 long lines.

File# lines# units# long lines
attrs.bzl
in swift/internal
328 - 1
features.bzl
in swift/internal
276 - 1