microsoft / ai-edu
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
resx
txt
csproj
xaml
gitattributes
pascal
gitmodules
  • 20 extensions are included in analyses: py, md, cs, resx, txt, csproj, ipynb, html, xaml, json, gitignore, sh, gitattributes, xml, yml, pascal, js, java, bat, gitmodules
  • 8 criteria are used to exclude files from analysis:
    • exclude files with path like ".*/[.][a-zA-Z0-9_]+.*" (Hidden files and folders) (11 files).
    • exclude files with path like ".*/docs/.*" (Documentation) (12 files).
    • exclude files with path like ".*/docs?/_?(build|themes?|templates?|static)/.*" (Sphinx) (0 files).
    • exclude files with path like ".*[.]resx" (The resx resource files) (21 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) (19 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.

main105217 LOC (62%) 679 files
test182 LOC (<1%) 3 files
generated1859 LOC (1%) 25 files
build and deployment2315 LOC (1%) 26 files
other58401 LOC (34%) 517 files
Main Code
All manually created or maintained source code that defines logic of the product that is run in a production environment.
xaml
pascal
Explore:   circles  |  sunburst
  • The following criteria are used to filter files:
    • files with paths like ".*".
  • 679 files match defined criteria (105,217 lines of code, 100.0% vs. main code):
    • 5 *.html files (69,263 lines of code)
    • 558 *.py files (29,694 lines of code)
    • 99 *.cs files (5,559 lines of code)
    • 14 *.xaml files (412 lines of code)
    • 1 *.yml files (280 lines of code)
    • 1 *.java files (5 lines of code)
    • 1 *.pascal files (4 lines of code)
  • " *.html" is biggest, containing 65.83% of code.
  • " *.pascal" is smallest, containing 0% of code.


*.html69263 LOC (65%) 5 files
*.py29694 LOC (28%) 558 files
*.cs5559 LOC (5%) 99 files
*.xaml412 LOC (<1%) 14 files
*.yml280 LOC (<1%) 1 files
*.java5 LOC (<1%) 1 files
*.pascal4 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 ".*_test[.].*".
    • files with any line of content like ".*/simpletest/.*".
  • 3 files match defined criteria (182 lines of code, 0.2% vs. main code). All matches are in *.py files.


*.py182 LOC (100%) 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 "[/][/][ ]*".
  • 25 files match defined criteria (1,859 lines of code, 1.8% vs. main code). All matches are in *.cs files.


*.cs1859 LOC (100%) 25 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 ".*[.]csproj".
    • files with paths like ".*[.]sh".
    • files with paths like ".*[.]bat".
  • 26 files match defined criteria (2,315 lines of code, 2.2% vs. main code):
    • 20 *.csproj files (2,178 lines of code)
    • 5 *.sh files (111 lines of code)
    • 1 *.bat files (26 lines of code)
  • " *.csproj" is biggest, containing 94.08% of code.
  • " *.bat" is smallest, containing 1.12% of code.


*.csproj2178 LOC (94%) 20 files
*.sh111 LOC (4%) 5 files
*.bat26 LOC (1%) 1 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 ".*/LICENSE[.][a-z0-9]+".
    • files with paths like ".*/README[.][a-z0-9]+".
    • files with paths like ".*[.]txt".
    • files with paths like ".*[.](xml|xsd|robot|sql|pgsql|dashboard|profile|ipynb|raml|avsc|al)".
  • 517 files match defined criteria (58,401 lines of code, 55.5% vs. main code):
    • 506 *.md files (55,343 lines of code)
    • 3 *.ipynb files (2,725 lines of code)
    • 6 *.json files (323 lines of code)
    • 2 *.xml files (10 lines of code)
  • " *.md" is biggest, containing 94.76% of code.
  • " *.xml" is smallest, containing 0.02% of code.


*.md55343 LOC (94%) 506 files
*.ipynb2725 LOC (4%) 3 files
*.json323 LOC (<1%) 6 files
*.xml10 LOC (<1%) 2 files
Analyzers
Info about analyzers used for source code examinations.
  • *.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
  • *.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)
  • *.xaml 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
  • *.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
  • *.java files are analyzed with JavaAnalyzer:
    • 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 package names)
  • *.pascal files are analyzed with ObjectPascalAnalyzer:
    • 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 22:28