spotify / XCMetrics
Source Code Overview

Analysis scope, overview of main, test, generated, deployment, build, and other code.

Source Code Analysis Scope
Files includes and excluded from analyses
storyboard
plist
txt
proto
Overview of Analyzed Files
Basic stats on analyzed files
Intro
For analysis purposes we separate files in scope into several categories: main, test, generated, deployment and build, and other.

  • The main category contains all manually created source code files that are being used in the production.
  • Files in the main category are used as input for other analyses: logical decomposition, concerns, duplication, file size, unit size, and conditional complexity.
  • Test source code files are used only for testing of the product. These files are normally not deployed to production.
  • Build and deployment source code files are used to configure or support build and deployment process.
  • Generated source code files are automatically generated files that have not been manually changed after generation.
  • While a source code folder may contain a number of files, we are primarily interested in the source code files that are being written and maintained by developers.
  • Files containing binaries, documentation, or third-party libraries, for instance, are excluded from analysis. The exception are third-party libraries that have been changed by developers.

main7825 LOC (67%) 144 files
test1862 LOC (16%) 31 files
generated1568 LOC (13%) 2 files
build and deployment18 LOC (<1%) 2 files
other335 LOC (2%) 13 files
Main Code
All manually created or maintained source code that defines logic of the product that is run in a production environment.
proto
Explore:   circles  |  sunburst
  • The following criteria are used to filter files:
    • files with paths like ".*".
  • 144 files match defined criteria (7,825 LOC, 100.0% vs. main code):
    • 126 *.swift files (6,453 LOC)
    • 14 *.yaml files (566 LOC)
    • 1 *.css files (397 LOC)
    • 1 *.html files (213 LOC)
    • 1 *.proto files (176 LOC)
    • 1 *.rb files (20 LOC)
  • " *.swift" is biggest, containing 82.47% of LOC.
  • " *.rb" is smallest, containing 0.26% of LOC.


*.swift6453 LOC (82%) 126 files
*.yaml566 LOC (7%) 14 files
*.css397 LOC (5%) 1 file
*.html213 LOC (2%) 1 file
*.proto176 LOC (2%) 1 file
*.rb20 LOC (<1%) 1 file
Test Code
Used only for testing of the product. Normally not deployed in a production environment.
Explore:   circles  |  sunburst
  • The following criteria are used to filter files:
    • files with paths like ".*/[Tt]ests/.*".
  • 31 files match defined criteria (1,862 LOC, 23.8% vs. main code). All matches are in *.swift files.


*.swift1862 LOC (100%) 31 files
Generated Code
Automatically generated files, not manually changed after generation.
Explore:   circles  |  sunburst
  • The following criteria are used to filter files:
    • files with any line of content like "//[ ]*Generated by .*".
  • 2 files match defined criteria (1,568 LOC, 20.0% vs. main code). All matches are in *.swift files.


*.swift1568 LOC (100%) 2 files
Build and Deployment Code
Source code used to configure or support build and deployment process.
Explore:   circles  |  sunburst
  • The following criteria are used to filter files:
    • files with paths like ".*[.]sh".
    • files with paths like ".*[.]git[a-z]+".
    • files with paths like ".*/[.]gitignore".
  • 2 files match defined criteria (18 LOC, 0.2% vs. main code). All matches are in *.sh files.


*.sh18 LOC (100%) 2 files
Other Code
plist
storyboard
Explore:   circles  |  sunburst
  • The following criteria are used to filter files:
    • files with paths like ".*[.]md".
    • files with paths like ".*/LICENSE[.][a-z0-9]+".
    • files with paths like ".*[.]json".
    • files with paths like ".*/README[.][a-z0-9]+".
    • files with paths like ".*/[.]gitignore".
    • files with paths like ".*[.]plist".
    • files with paths like ".*/[Ee]xamples/.*".
    • files with paths like ".*[.]storyboard".
    • files with paths like ".*[.]txt".
  • 13 files match defined criteria (335 LOC, 4.3% vs. main code):
    • 2 *.json files (104 LOC)
    • 4 *.md files (77 LOC)
    • 2 *.plist files (72 LOC)
    • 2 *.storyboard files (47 LOC)
    • 3 *.swift files (35 LOC)
  • " *.json" is biggest, containing 31.04% of LOC.
  • " *.swift" is smallest, containing 10.45% of LOC.


*.json104 LOC (31%) 2 files
*.md77 LOC (22%) 4 files
*.plist72 LOC (21%) 2 files
*.storyboard47 LOC (14%) 2 files
*.swift35 LOC (10%) 3 files
Analyzers
Info about analyzers used for source code examinations.


2025-01-17 11:39