apple / swift-nio-ssl
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
S
txt
patch
gitattributes
  • 16 extensions are included in analyses: c, h, S, swift, cc, sh, yaml, md, txt, rb, patch, gitignore, py, gitattributes, json, inc
  • 6 criteria are used to exclude files from analysis:
    • exclude files with path like ".*/[.][a-zA-Z0-9_]+.*" (Hidden files and folders) (2 files).
    • exclude files with path like ".*/(3rd|[Tt]hird)[-_]?[Pp]arty/.*" (Dependencies) (4 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) (4 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.

main318335 LOC (97%) 600 files
test7435 LOC (2%) 44 files
generated0 LOC (0%) 0 files
build and deployment692 LOC (<1%) 7 files
other163 LOC (<1%) 8 files
Main Code
All manually created or maintained source code that defines logic of the product that is run in a production environment.
s
Explore:   circles  |  sunburst
  • The following criteria are used to filter files:
    • files with paths like ".*".
  • 600 files match defined criteria (318,335 lines of code, 100.0% vs. main code):
    • 89 *.s files (155,862 lines of code)
    • 305 *.c files (72,934 lines of code)
    • 132 *.h files (54,698 lines of code)
    • 37 *.cc files (23,408 lines of code)
    • 1 *.inc files (6,863 lines of code)
    • 28 *.swift files (4,153 lines of code)
    • 1 *.rb files (150 lines of code)
    • 1 *.py files (139 lines of code)
    • 6 *.yaml files (128 lines of code)
  • " *.s" is biggest, containing 48.96% of code.
  • " *.yaml" is smallest, containing 0.04% of code.


*.s155862 LOC (48%) 89 files
*.c72934 LOC (22%) 305 files
*.h54698 LOC (17%) 132 files
*.cc23408 LOC (7%) 37 files
*.inc6863 LOC (2%) 1 files
*.swift4153 LOC (1%) 28 files
*.rb150 LOC (<1%) 1 files
*.py139 LOC (<1%) 1 files
*.yaml128 LOC (<1%) 6 files
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 ".*/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/.*".
  • 44 files match defined criteria (7,435 lines of code, 2.3% vs. main code):
    • 31 *.swift files (6,817 lines of code)
    • 12 *.sh files (453 lines of code)
    • 1 *.rb files (165 lines of code)
  • " *.swift" is biggest, containing 91.69% of code.
  • " *.rb" is smallest, containing 2.22% of code.


*.swift6817 LOC (91%) 31 files
*.sh453 LOC (6%) 12 files
*.rb165 LOC (2%) 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 ".*/[.]gitattributes".
    • files with paths like ".*/[.]gitignore".
    • files with paths like ".*[.]sh".
    • files with paths like ".*/docker[-]compose[.]yaml".
  • 7 files match defined criteria (692 lines of code, 0.2% vs. main code):
    • 6 *.sh files (657 lines of code)
    • 1 *.yaml files (35 lines of code)
  • " *.sh" is biggest, containing 94.94% of code.
  • " *.yaml" is smallest, containing 5.06% of code.


*.sh657 LOC (94%) 6 files
*.yaml35 LOC (5%) 1 files
Other Code
patch
Explore:   circles  |  sunburst
  • The following criteria are used to filter files:
    • files with paths like ".*[.]json".
    • files with paths like ".*/[.]gitignore".
    • files with paths like ".*[.]md".
    • files with paths like ".*[.]txt".
    • files with paths like ".*/LICENSE[.][a-z0-9]+".
    • files with paths like ".*/README[.][a-z0-9]+".
    • files with paths like ".*[.]patch".
  • 8 files match defined criteria (163 lines of code, 0.1% vs. main code):
    • 6 *.md files (128 lines of code)
    • 2 *.patch files (35 lines of code)
  • " *.md" is biggest, containing 78.53% of code.
  • " *.patch" is smallest, containing 21.47% of code.


*.md128 LOC (78%) 6 files
*.patch35 LOC (21%) 2 files
Analyzers
Info about analyzers used for source code examinations.
  • *.s 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
  • *.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
  • *.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
  • *.cc 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
  • *.inc files are analyzed with PhpAnalyzer:
    • 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
    • Basic heuristic dependency analysis
  • *.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
  • *.rb files are analyzed with RubyAnalyzer:
    • 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
    • Basic heuristic dependency analysis
  • *.py files are analyzed with PythonAnalyzer:
    • 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
    • Basic heuristic 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


2022-01-30 21:55