microsoft / SymCrypt
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
txt
cmake
cmd
plist
mk
in
storyboard
gitmodules
  • 22 extensions are included in analyses: c, cpp, h, txt, inc, asm, cmake, cmd, md, json, py, yml, mm, m, xib, plist, mk, in, gitignore, storyboard, cs, gitmodules
  • 5 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 ".*/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) (18 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.

main89459 LOC (98%) 293 files
test1285 LOC (1%) 2 files
generated0 LOC (0%) 0 files
build and deployment1 LOC (<1%) 1 files
other220 LOC (<1%) 6 files
Main Code
All manually created or maintained source code that defines logic of the product that is run in a production environment.
cmd
cmake
in
Explore:   circles  |  sunburst
  • The following criteria are used to filter files:
    • files with paths like ".*".
  • 293 files match defined criteria (89,459 lines of code, 100.0% vs. main code):
    • 119 *.c files (37,465 lines of code)
    • 87 *.cpp files (34,864 lines of code)
    • 50 *.h files (12,812 lines of code)
    • 7 *.asm files (1,796 lines of code)
    • 1 *.cs files (817 lines of code)
    • 2 *.py files (793 lines of code)
    • 2 *.yml files (374 lines of code)
    • 5 *.cmd files (194 lines of code)
    • 10 *.inc files (173 lines of code)
    • 5 *.cmake files (95 lines of code)
    • 2 *.mm files (40 lines of code)
    • 2 *.m files (29 lines of code)
    • 1 *.in files (7 lines of code)
  • " *.c" is biggest, containing 41.88% of code.
  • " *.in" is smallest, containing 0.01% of code.


*.c37465 LOC (41%) 119 files
*.cpp34864 LOC (38%) 87 files
*.h12812 LOC (14%) 50 files
*.asm1796 LOC (2%) 7 files
*.cs817 LOC (<1%) 1 files
*.py793 LOC (<1%) 2 files
*.yml374 LOC (<1%) 2 files
*.cmd194 LOC (<1%) 5 files
*.inc173 LOC (<1%) 10 files
*.cmake95 LOC (<1%) 5 files
*.mm40 LOC (<1%) 2 files
*.m29 LOC (<1%) 2 files
*.in7 LOC (<1%) 1 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 ".*/[Tt]est/.*".
    • files with paths like ".*/test_.*".
    • files with any line of content like ".*/simpletest/.*".
  • 2 files match defined criteria (1,285 lines of code, 1.4% vs. main code):
    • 1 *.h files (1,170 lines of code)
    • 1 *.cpp files (115 lines of code)
  • " *.h" is biggest, containing 91.05% of code.
  • " *.cpp" is smallest, containing 8.95% of code.


*.h1170 LOC (91%) 1 files
*.cpp115 LOC (8%) 1 files
Build and Deployment Code
Source code used to configure or support build and deployment process.
mk
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 ".*/[.]gitmodules".
    • files with paths like ".*[.]mk".
  • 1 file matches defined criteria (1 lines of code, 0.0% vs. main code). All matches are in *.mk files.


*.mk1 LOC (100%) 1 files
Other Code
plist
storyboard
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 ".*[.]txt".
    • files with paths like ".*/README[.][a-z0-9]+".
    • files with paths like ".*[.]xib".
    • files with paths like ".*[.]storyboard".
    • files with paths like ".*[.]plist".
  • 6 files match defined criteria (220 lines of code, 0.2% vs. main code):
    • 2 *.json files (63 lines of code)
    • 1 *.md files (52 lines of code)
    • 1 *.xib files (41 lines of code)
    • 1 *.plist files (40 lines of code)
    • 1 *.storyboard files (24 lines of code)
  • " *.json" is biggest, containing 28.64% of code.
  • " *.storyboard" is smallest, containing 10.91% of code.


*.json63 LOC (28%) 2 files
*.md52 LOC (23%) 1 files
*.xib41 LOC (18%) 1 files
*.plist40 LOC (18%) 1 files
*.storyboard24 LOC (10%) 1 files
Analyzers
Info about analyzers used for source code examinations.
  • *.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
  • *.cpp 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
  • *.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
  • *.asm 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
  • *.cs files are analyzed with CSharpAnalyzer:
    • 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 (based on namespace heuristics)
  • *.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
  • *.yml 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
  • *.cmd 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
  • *.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
  • *.cmake 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
  • *.mm 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
  • *.m 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
  • *.in files are analyzed with RustAnalyzer:
    • 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-31 01:02