microsoft / SEAL
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
cmake
in
txt
properties
clang-format
pro
targets
  • 20 extensions are included in analyses: cpp, h, cs, cmake, yml, in, txt, xml, md, c, gitignore, gradle, sh, json, properties, clang-format, pro, targets, bat, yaml
  • 7 criteria are used to exclude files from analysis:
    • exclude files with path like ".*/[.][a-zA-Z0-9_]+.*" (Hidden files and folders) (5 files).
    • exclude files with path like ".*/proguard[-]rules[.]pro" (ProGuard) (1 file).
    • exclude files with path like ".*/gradle/wrapper/.*" (Gradle) (1 file).
    • 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) (9 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.

main34970 LOC (59%) 219 files
test18595 LOC (31%) 63 files
generated0 LOC (0%) 0 files
build and deployment201 LOC (<1%) 6 files
other4682 LOC (8%) 36 files
Main Code
All manually created or maintained source code that defines logic of the product that is run in a production environment.
cmake
in
targets
Explore:   circles  |  sunburst
  • The following criteria are used to filter files:
    • files with paths like ".*".
  • 219 files match defined criteria (34,970 lines of code, 100.0% vs. main code):
    • 66 *.cpp files (14,761 lines of code)
    • 85 *.h files (13,352 lines of code)
    • 29 *.cs files (4,335 lines of code)
    • 3 *.c files (861 lines of code)
    • 13 *.yml files (809 lines of code)
    • 14 *.cmake files (506 lines of code)
    • 8 *.in files (304 lines of code)
    • 1 *.targets files (42 lines of code)
  • " *.cpp" is biggest, containing 42.21% of code.
  • " *.targets" is smallest, containing 0.12% of code.


*.cpp14761 LOC (42%) 66 files
*.h13352 LOC (38%) 85 files
*.cs4335 LOC (12%) 29 files
*.c861 LOC (2%) 3 files
*.yml809 LOC (2%) 13 files
*.cmake506 LOC (1%) 14 files
*.in304 LOC (<1%) 8 files
*.targets42 LOC (<1%) 1 files
Test Code
Used only for testing of the product. Normally not deployed in a production environment.
in
Explore:   circles  |  sunburst
  • The following criteria are used to filter files:
    • files with paths like ".*/[Tt]ests/.*".
    • files with any line of content like ".*/simpletest/.*".
  • 63 files match defined criteria (18,595 lines of code, 53.2% vs. main code):
    • 38 *.cpp files (14,384 lines of code)
    • 24 *.cs files (4,181 lines of code)
    • 1 *.in files (30 lines of code)
  • " *.cpp" is biggest, containing 77.35% of code.
  • " *.in" is smallest, containing 0.16% of code.


*.cpp14384 LOC (77%) 38 files
*.cs4181 LOC (22%) 24 files
*.in30 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 ".*[.]gradle".
    • files with paths like ".*/AndroidManifest[.]xml".
    • files with paths like ".*[.]bat".
    • files with paths like ".*[.]sh".
  • 6 files match defined criteria (201 lines of code, 0.6% vs. main code):
    • 3 *.gradle files (72 lines of code)
    • 2 *.sh files (68 lines of code)
    • 1 *.bat files (61 lines of code)
  • " *.gradle" is biggest, containing 35.82% of code.
  • " *.bat" is smallest, containing 30.35% of code.


*.gradle72 LOC (35%) 3 files
*.sh68 LOC (33%) 2 files
*.bat61 LOC (30%) 1 files
Other Code
in
properties
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 ".*/README[.][a-z0-9]+".
    • files with paths like ".*[.]properties".
    • files with paths like ".*/[Ee]xamples/.*".
    • files with paths like ".*[.](xml|xsd|robot|sql|pgsql|dashboard|profile|ipynb|raml|avsc|al)".
  • 36 files match defined criteria (4,682 lines of code, 13.4% vs. main code):
    • 9 *.cs files (1,676 lines of code)
    • 8 *.cpp files (1,452 lines of code)
    • 7 *.md files (1,096 lines of code)
    • 8 *.xml files (240 lines of code)
    • 1 *.h files (150 lines of code)
    • 1 *.in files (25 lines of code)
    • 1 *.json files (22 lines of code)
    • 1 *.properties files (21 lines of code)
  • " *.cs" is biggest, containing 35.8% of code.
  • " *.properties" is smallest, containing 0.45% of code.


*.cs1676 LOC (35%) 9 files
*.cpp1452 LOC (31%) 8 files
*.md1096 LOC (23%) 7 files
*.xml240 LOC (5%) 8 files
*.h150 LOC (3%) 1 files
*.in25 LOC (<1%) 1 files
*.json22 LOC (<1%) 1 files
*.properties21 LOC (<1%) 1 files
Analyzers
Info about analyzers used for source code examinations.
  • *.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
  • *.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)
  • *.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
  • *.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
  • *.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
  • *.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
  • *.targets files are analyzed with XmlAnalyzer:
    • 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 22:26