microsoft / tigertoolbox
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
csproj
cmd
gitattributes
patch
tpl
bib
  • 22 extensions are included in analyses: ipynb, md, sql, scss, yml, html, js, cs, ps1, svg, json, txt, csproj, css, cmd, py, gitattributes, patch, psm1, gitignore, tpl, bib
  • 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) (4 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.

main9547 LOC (2%) 169 files
test0 LOC (0%) 0 files
generated0 LOC (0%) 0 files
build and deployment135 LOC (<1%) 3 files
other310029 LOC (96%) 1117 files
Main Code
All manually created or maintained source code that defines logic of the product that is run in a production environment.
tpl
cmd
Explore:   circles  |  sunburst
  • The following criteria are used to filter files:
    • files with paths like ".*".
  • 169 files match defined criteria (9,547 lines of code, 100.0% vs. main code):
    • 45 *.yml files (4,420 lines of code)
    • 61 *.scss files (2,213 lines of code)
    • 13 *.cs files (908 lines of code)
    • 27 *.html files (808 lines of code)
    • 10 *.ps1 files (715 lines of code)
    • 6 *.js files (249 lines of code)
    • 1 *.psm1 files (108 lines of code)
    • 1 *.tpl files (68 lines of code)
    • 2 *.cmd files (43 lines of code)
    • 1 *.py files (9 lines of code)
    • 2 *.css files (6 lines of code)
  • " *.yml" is biggest, containing 46.3% of code.
  • " *.css" is smallest, containing 0.06% of code.


*.yml4420 LOC (46%) 45 files
*.scss2213 LOC (23%) 61 files
*.cs908 LOC (9%) 13 files
*.html808 LOC (8%) 27 files
*.ps1715 LOC (7%) 10 files
*.js249 LOC (2%) 6 files
*.psm1108 LOC (1%) 1 files
*.tpl68 LOC (<1%) 1 files
*.cmd43 LOC (<1%) 2 files
*.py9 LOC (<1%) 1 files
*.css6 LOC (<1%) 2 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 ".*/[.]gitignore".
    • files with paths like ".*/[.]gitattributes".
    • files with paths like ".*[.]csproj".
  • 3 files match defined criteria (135 lines of code, 1.4% vs. main code). All matches are in *.csproj files.


*.csproj135 LOC (100%) 3 files
Other Code
patch
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 ".*[.]txt".
    • files with paths like ".*[.]md".
    • files with paths like ".*/README[.][a-z0-9]+".
    • files with paths like ".*[.]svg".
    • files with paths like ".*/LICENSE[.][a-z0-9]+".
    • files with paths like ".*[.]patch".
    • files with paths like ".*[.](xml|xsd|robot|sql|pgsql|dashboard|profile|ipynb|raml|avsc|al)".
  • 1117 files match defined criteria (310,029 lines of code, 3247.4% vs. main code):
    • 845 *.ipynb files (287,927 lines of code)
    • 62 *.sql files (15,682 lines of code)
    • 201 *.md files (6,135 lines of code)
    • 6 *.svg files (200 lines of code)
    • 2 *.json files (50 lines of code)
    • 1 *.patch files (35 lines of code)
  • " *.ipynb" is biggest, containing 92.87% of code.
  • " *.patch" is smallest, containing 0.01% of code.


*.ipynb287927 LOC (92%) 845 files
*.sql15682 LOC (5%) 62 files
*.md6135 LOC (1%) 201 files
*.svg200 LOC (<1%) 6 files
*.json50 LOC (<1%) 2 files
*.patch35 LOC (<1%) 1 files
Analyzers
Info about analyzers used for source code examinations.
  • *.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
  • *.scss files are analyzed with ScssAnalyzer:
    • 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
  • *.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)
  • *.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
  • *.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
  • *.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
  • *.tpl 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
  • *.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
  • *.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
  • *.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 14:02