microsoft / arcticseals
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
resx
csproj
gitattributes
pyx
p
meta
gitmodules
  • 25 extensions are included in analyses: py, yaml, js, md, ipynb, json, cs, txt, sh, html, h, bat, cpp, gitignore, cu, MD, resx, csproj, css, gitattributes, pyx, c, p, meta, gitmodules
  • 8 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 ".*[.]resx" (The resx resource files) (2 files).
    • exclude files with path like "(?i).*/jquery.*[.]js" (jQuery files) (2 files).
    • exclude files with path like ".*jquery[.].*[.]js" (jQuery library) (0 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) (7 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.

main12626 LOC (5%) 221 files
test343 LOC (<1%) 7 files
generated5305 LOC (2%) 4 files
build and deployment178 LOC (<1%) 11 files
other216154 LOC (92%) 38 files
Main Code
All manually created or maintained source code that defines logic of the product that is run in a production environment.
pyx
Explore:   circles  |  sunburst
  • The following criteria are used to filter files:
    • files with paths like ".*".
  • 221 files match defined criteria (12,626 lines of code, 100.0% vs. main code):
    • 147 *.py files (8,793 lines of code)
    • 6 *.cs files (1,021 lines of code)
    • 29 *.yaml files (902 lines of code)
    • 19 *.js files (728 lines of code)
    • 3 *.cu files (570 lines of code)
    • 3 *.cpp files (280 lines of code)
    • 5 *.h files (148 lines of code)
    • 5 *.html files (73 lines of code)
    • 2 *.md files (65 lines of code)
    • 1 *.pyx files (27 lines of code)
    • 1 *.css files (19 lines of code)
  • " *.py" is biggest, containing 69.64% of code.
  • " *.css" is smallest, containing 0.15% of code.


*.py8793 LOC (69%) 147 files
*.cs1021 LOC (8%) 6 files
*.yaml902 LOC (7%) 29 files
*.js728 LOC (5%) 19 files
*.cu570 LOC (4%) 3 files
*.cpp280 LOC (2%) 3 files
*.h148 LOC (1%) 5 files
*.html73 LOC (<1%) 5 files
*.md65 LOC (<1%) 2 files
*.pyx27 LOC (<1%) 1 files
*.css19 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]ests/.*".
    • files with paths like ".*/test_.*".
    • files with paths like ".*_test[.].*".
    • files with any line of content like ".*/simpletest/.*".
  • 7 files match defined criteria (343 lines of code, 2.7% vs. main code):
    • 4 *.py files (307 lines of code)
    • 3 *.js files (36 lines of code)
  • " *.py" is biggest, containing 89.5% of code.
  • " *.js" is smallest, containing 10.5% of code.


*.py307 LOC (89%) 4 files
*.js36 LOC (10%) 3 files
Generated Code
Automatically generated files, not manually changed after generation.
Explore:   circles  |  sunburst
  • The following criteria are used to filter files:
    • files with paths like ".*[.]cs" AND any line of content like "[/][/][ ]*".
    • files with paths like ".*[.](c|cpp)" AND any line of content like ".*Generated by Cython.*".
    • files with paths like ".*/package[-]lock[.]json".
  • 4 files match defined criteria (5,305 lines of code, 42.0% vs. main code):
    • 1 *.c files (5,229 lines of code)
    • 2 *.cs files (58 lines of code)
    • 1 *.json files (18 lines of code)
  • " *.c" is biggest, containing 98.57% of code.
  • " *.json" is smallest, containing 0.34% of code.


*.c5229 LOC (98%) 1 files
*.cs58 LOC (1%) 2 files
*.json18 LOC (<1%) 1 files
Build and Deployment Code
Source code used to configure or support build and deployment process.
csproj
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 ".*/[.]gitmodules".
    • files with paths like ".*[.]bat".
    • files with paths like ".*[.]csproj".
    • files with paths like ".*[.]sh".
    • files with paths like ".*/package[-]lock[.]json".
    • files with paths like ".*/package[.]json".
  • 11 files match defined criteria (178 lines of code, 1.4% vs. main code):
    • 2 *.csproj files (149 lines of code)
    • 6 *.sh files (24 lines of code)
    • 3 *.bat files (5 lines of code)
  • " *.csproj" is biggest, containing 83.71% of code.
  • " *.bat" is smallest, containing 2.81% of code.


*.csproj149 LOC (83%) 2 files
*.sh24 LOC (13%) 6 files
*.bat5 LOC (2%) 3 files
Other Code
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 ".*/README[.][a-z0-9]+".
    • files with paths like ".*/INSTALL[.][a-z0-9]+".
    • files with paths like ".*/[Dd]emos?/.*".
    • files with paths like ".*[.]txt".
    • files with paths like ".*[.](xml|xsd|robot|sql|pgsql|dashboard|profile|ipynb|raml|avsc|al)".
  • 38 files match defined criteria (216,154 lines of code, 1712.0% vs. main code):
    • 7 *.json files (202,871 lines of code)
    • 9 *.ipynb files (12,209 lines of code)
    • 20 *.md files (773 lines of code)
    • 2 *.py files (301 lines of code)
  • " *.json" is biggest, containing 93.85% of code.
  • " *.py" is smallest, containing 0.14% of code.


*.json202871 LOC (93%) 7 files
*.ipynb12209 LOC (5%) 9 files
*.md773 LOC (<1%) 20 files
*.py301 LOC (<1%) 2 files
Analyzers
Info about analyzers used for source code examinations.
  • *.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
  • *.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)
  • *.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
  • *.js files are analyzed with JavaScriptAnalyzer:
    • 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
  • *.cu 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
  • *.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
  • *.html files are analyzed with HtmlAnalyzer:
    • 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
  • *.md 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
  • *.pyx 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
  • *.css files are analyzed with CssAnalyzer:
    • 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 20:10