apple / swift-distributed-actors
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
proto
plist
txt
tla
project
  • 14 extensions are included in analyses: swift, sh, md, proto, plist, yaml, svg, h, txt, c, gitignore, json, tla, project
  • 6 criteria are used to exclude files from analysis:
    • exclude files with path like ".*/[.][a-zA-Z0-9_]+.*" (Hidden files and folders) (4 files).
    • exclude files with path like ".*/docs/.*" (Documentation) (2 files).
    • exclude files with path like ".*/git[-]history[.]txt" (Git history) (1 file).
    • exclude files with path like ".*/git[-][a-zA-Z0-9_]+[.]txt" (Git data exports for sokrates analyses) (0 files).
    • exclude files with path like ".*/sokrates_conventions[.]json" (Sokrates scoping conventions) (1 file).
    • exclude files with path like ".*[.]txt" (Text files) (2 files).
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.

main33044 LOC (61%) 221 files
test14382 LOC (26%) 115 files
generated0 LOC (0%) 0 files
build and deployment273 LOC (<1%) 10 files
other6241 LOC (11%) 34 files
Main Code
All manually created or maintained source code that defines logic of the product that is run in a production environment.
proto
tla
Explore:   circles  |  sunburst
  • The following criteria are used to filter files:
    • files with paths like ".*".
  • 221 files match defined criteria (33,044 lines of code, 100.0% vs. main code):
    • 200 *.swift files (32,160 lines of code)
    • 10 *.proto files (481 lines of code)
    • 1 *.tla files (183 lines of code)
    • 4 *.yaml files (109 lines of code)
    • 4 *.h files (59 lines of code)
    • 2 *.c files (52 lines of code)
  • " *.swift" is biggest, containing 97.32% of code.
  • " *.c" is smallest, containing 0.16% of code.


*.swift32160 LOC (97%) 200 files
*.proto481 LOC (1%) 10 files
*.tla183 LOC (<1%) 1 files
*.yaml109 LOC (<1%) 4 files
*.h59 LOC (<1%) 4 files
*.c52 LOC (<1%) 2 files
Test Code
Used only for testing of the product. Normally not deployed in a production environment.
proto
Explore:   circles  |  sunburst
  • The following criteria are used to filter files:
    • files with paths like ".*/IntegrationTests?/.*".
    • files with paths like ".*/test_.*".
    • files with paths like ".*/tests_.*".
    • files with paths like ".*/[Tt]ests/.*".
    • files with paths like ".*_tests[.].*".
    • files with any line of content like ".*/simpletest/.*".
  • 115 files match defined criteria (14,382 lines of code, 43.5% vs. main code):
    • 105 *.swift files (13,971 lines of code)
    • 9 *.sh files (386 lines of code)
    • 1 *.proto files (25 lines of code)
  • " *.swift" is biggest, containing 97.14% of code.
  • " *.proto" is smallest, containing 0.17% of code.


*.swift13971 LOC (97%) 105 files
*.sh386 LOC (2%) 9 files
*.proto25 LOC (<1%) 1 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 ".*[.]git[a-z]+".
    • files with paths like ".*/[.]gitignore".
    • files with paths like ".*[.]sh".
    • files with paths like ".*/docker[-]compose[.]yaml".
  • 10 files match defined criteria (273 lines of code, 0.8% vs. main code):
    • 9 *.sh files (225 lines of code)
    • 1 *.yaml files (48 lines of code)
  • " *.sh" is biggest, containing 82.42% of code.
  • " *.yaml" is smallest, containing 17.58% of code.


*.sh225 LOC (82%) 9 files
*.yaml48 LOC (17%) 1 files
Other Code
plist
Explore:   circles  |  sunburst
  • The following criteria are used to filter files:
    • files with paths like ".*[.]json".
    • files with paths like ".*[.]md".
    • files with paths like ".*/[.]gitignore".
    • files with paths like ".*/README[.][a-z0-9]+".
    • files with paths like ".*[.]plist".
    • files with paths like ".*[.]svg".
    • files with paths like ".*[.]txt".
    • files with paths like ".*/LICENSE[.][a-z0-9]+".
    • files with paths like ".*/[Ss]amples/.*".
  • 34 files match defined criteria (6,241 lines of code, 18.9% vs. main code):
    • 8 *.plist files (3,788 lines of code)
    • 4 *.svg files (955 lines of code)
    • 1 *.json files (573 lines of code)
    • 13 *.md files (497 lines of code)
    • 8 *.swift files (428 lines of code)
  • " *.plist" is biggest, containing 60.7% of code.
  • " *.swift" is smallest, containing 6.86% of code.


*.plist3788 LOC (60%) 8 files
*.svg955 LOC (15%) 4 files
*.json573 LOC (9%) 1 files
*.md497 LOC (7%) 13 files
*.swift428 LOC (6%) 8 files
Analyzers
Info about analyzers used for source code examinations.
  • *.swift files are analyzed with SwiftAnalyzer:
    • All basic standard analyses supported (source code overview, duplication, file size, concerns, findings, metrics, controls)
    • Advanced code cleaning (empty lines and comments removed for LOC calculations, additional cleaning for duplication calculations)
    • Unit size analysis
    • Conditional complexity analysis
    • No dependency analysis
  • *.proto files are analyzed with DefaultLanguageAnalyzer:
    • All basic standard analyses supported (source code overview, duplication, file size, concerns, findings, metrics, controls)
    • Basic code cleaning (empty lines removed for LOC calculations and duplication calculations)
    • No unit size analysis
    • No conditional complexity analysis
    • No dependency analysis
  • *.tla files are analyzed with DefaultLanguageAnalyzer:
    • All basic standard analyses supported (source code overview, duplication, file size, concerns, findings, metrics, controls)
    • Basic code cleaning (empty lines removed for LOC calculations and duplication calculations)
    • No unit size analysis
    • No conditional complexity analysis
    • No dependency analysis
  • *.yaml files are analyzed with YamlAnalyzer:
    • All basic standard analyses supported (source code overview, duplication, file size, concerns, findings, metrics, controls)
    • Advanced code cleaning (empty lines and comments removed for LOC calculations, additional cleaning for duplication calculations)
    • No unit size analysis
    • No conditional complexity analysis
    • No dependency analysis
  • *.h files are analyzed with CppAnalyzer:
    • All basic standard analyses supported (source code overview, duplication, file size, concerns, findings, metrics, controls)
    • Advanced code cleaning (empty lines and comments removed for LOC calculations, additional cleaning for duplication calculations)
    • Unit size analysis
    • Conditional complexity analysis
    • Advanced heuristic dependency analysis
  • *.c files are analyzed with CStyleAnalyzer:
    • All basic standard analyses supported (source code overview, duplication, file size, concerns, findings, metrics, controls)
    • Advanced code cleaning (empty lines and comments removed for LOC calculations, additional cleaning for duplication calculations)
    • Unit size analysis
    • Conditional complexity analysis
    • No dependency analysis


2022-01-30 21:59