microsoft / AcademicContent
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
gitattributes
desktop
styl
  • 22 extensions are included in analyses: md, js, json, ps1, html, sh, py, css, gitignore, ipynb, yml, txt, gitattributes, jsx, desktop, rb, styl, psm1, MD, cs, Md, ts
  • 9 criteria are used to exclude files from analysis:
    • exclude files with path like ".*/[.][a-zA-Z0-9_]+.*" (Hidden files and folders) (20 files).
    • exclude files with path like ".*/react(-[^.]*)?\.js" (React) (10 files).
    • exclude files with path like ".*/bootstrap[.](js|css|less|scss|styl)" (Bootstrap) (1 file).
    • exclude files with path like ".*\.d\.ts" (Typescript definition files) (1 file).
    • exclude files with path like ".*/docs/.*" (Documentation) (6 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) (6 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.

main10795 LOC (23%) 106 files
test482 LOC (1%) 9 files
generated9881 LOC (21%) 1 files
build and deployment1145 LOC (2%) 13 files
other24002 LOC (51%) 114 files
Main Code
All manually created or maintained source code that defines logic of the product that is run in a production environment.
desktop
Explore:   circles  |  sunburst
  • The following criteria are used to filter files:
    • files with paths like ".*".
  • 106 files match defined criteria (10,795 lines of code, 100.0% vs. main code):
    • 46 *.js files (7,860 lines of code)
    • 6 *.css files (798 lines of code)
    • 14 *.html files (747 lines of code)
    • 15 *.ps1 files (551 lines of code)
    • 11 *.py files (263 lines of code)
    • 4 *.jsx files (230 lines of code)
    • 1 *.cs files (108 lines of code)
    • 2 *.md files (70 lines of code)
    • 2 *.rb files (58 lines of code)
    • 1 *.psm1 files (57 lines of code)
    • 2 *.yml files (33 lines of code)
    • 2 *.desktop files (20 lines of code)
  • " *.js" is biggest, containing 72.81% of code.
  • " *.desktop" is smallest, containing 0.19% of code.


*.js7860 LOC (72%) 46 files
*.css798 LOC (7%) 6 files
*.html747 LOC (6%) 14 files
*.ps1551 LOC (5%) 15 files
*.py263 LOC (2%) 11 files
*.jsx230 LOC (2%) 4 files
*.cs108 LOC (1%) 1 files
*.md70 LOC (<1%) 2 files
*.rb58 LOC (<1%) 2 files
*.psm157 LOC (<1%) 1 files
*.yml33 LOC (<1%) 2 files
*.desktop20 LOC (<1%) 2 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 paths like ".*/[Tt]ests/.*".
    • files with any line of content like ".*/simpletest/.*".
  • 9 files match defined criteria (482 lines of code, 4.5% vs. main code):
    • 7 *.js files (418 lines of code)
    • 1 *.yml files (51 lines of code)
    • 1 *.sh files (13 lines of code)
  • " *.js" is biggest, containing 86.72% of code.
  • " *.sh" is smallest, containing 2.7% of code.


*.js418 LOC (86%) 7 files
*.yml51 LOC (10%) 1 files
*.sh13 LOC (2%) 1 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 ".*/package[-]lock[.]json".
  • 1 file matches defined criteria (9,881 lines of code, 91.5% vs. main code). All matches are in *.json files.


*.json9881 LOC (100%) 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 ".*/package[.]json".
    • files with paths like ".*[.]sh".
    • files with paths like ".*/docker[-]compose[.]yml".
    • files with paths like ".*/package[-]lock[.]json".
  • 13 files match defined criteria (1,145 lines of code, 10.6% vs. main code):
    • 12 *.sh files (1,103 lines of code)
    • 1 *.yml files (42 lines of code)
  • " *.sh" is biggest, containing 96.33% of code.
  • " *.yml" is smallest, containing 3.67% of code.


*.sh1103 LOC (96%) 12 files
*.yml42 LOC (3%) 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 ".*/README[.][a-z0-9]+".
    • files with paths like ".*[.]txt".
    • files with paths like ".*/LICENSE[.][a-z0-9]+".
    • files with paths like ".*[.](xml|xsd|robot|sql|pgsql|dashboard|profile|ipynb|raml|avsc|al)".
  • 114 files match defined criteria (24,002 lines of code, 222.3% vs. main code):
    • 26 *.json files (14,003 lines of code)
    • 84 *.md files (5,512 lines of code)
    • 4 *.ipynb files (4,487 lines of code)
  • " *.json" is biggest, containing 58.34% of code.
  • " *.ipynb" is smallest, containing 18.69% of code.


*.json14003 LOC (58%) 26 files
*.md5512 LOC (22%) 84 files
*.ipynb4487 LOC (18%) 4 files
Analyzers
Info about analyzers used for source code examinations.
  • *.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
  • *.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
  • *.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
  • *.ps1 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
  • *.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
  • *.jsx 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
  • *.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)
  • *.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
  • *.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
  • *.psm1 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
  • *.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
  • *.desktop 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


2022-01-30 13:43