microsoft / Dynamics365FO-AppChecker
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
xq
xaml
csproj
txt
resx
editorconfig
mod
cmd
  • 24 extensions are included in analyses: xq, svg, cs, xaml, csproj, md, txt, py, js, json, yml, yaml, go, resx, editorconfig, ipynb, pl, mod, sql, bat, html, htm, gitignore, cmd
  • 6 criteria are used to exclude files from analysis:
    • exclude files with path like ".*/[.][a-zA-Z0-9_]+.*" (Hidden files and folders) (10 files).
    • exclude files with path like ".*[.]resx" (The resx resource files) (3 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) (10 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.

main34015 LOC (91%) 404 files
test322 LOC (<1%) 1 files
generated835 LOC (2%) 7 files
build and deployment1498 LOC (4%) 18 files
other393 LOC (1%) 111 files
Main Code
All manually created or maintained source code that defines logic of the product that is run in a production environment.
xq
xaml
cmd
Explore:   circles  |  sunburst
  • The following criteria are used to filter files:
    • files with paths like ".*".
  • 404 files match defined criteria (34,015 lines of code, 100.0% vs. main code):
    • 115 *.cs files (21,382 lines of code)
    • 250 *.xq files (6,908 lines of code)
    • 25 *.xaml files (2,640 lines of code)
    • 4 *.py files (1,815 lines of code)
    • 2 *.go files (708 lines of code)
    • 1 *.htm files (224 lines of code)
    • 3 *.js files (165 lines of code)
    • 2 *.pl files (93 lines of code)
    • 1 *.html files (56 lines of code)
    • 1 *.cmd files (24 lines of code)
  • " *.cs" is biggest, containing 62.86% of code.
  • " *.cmd" is smallest, containing 0.07% of code.


*.cs21382 LOC (62%) 115 files
*.xq6908 LOC (20%) 250 files
*.xaml2640 LOC (7%) 25 files
*.py1815 LOC (5%) 4 files
*.go708 LOC (2%) 2 files
*.htm224 LOC (<1%) 1 files
*.js165 LOC (<1%) 3 files
*.pl93 LOC (<1%) 2 files
*.html56 LOC (<1%) 1 files
*.cmd24 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/.*".
  • 1 file matches defined criteria (322 lines of code, 0.9% vs. main code). All matches are in *.go files.


*.go322 LOC (100%) 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 ".*[.]cs" AND any line of content like "[/][/][ ]*".
  • 7 files match defined criteria (835 lines of code, 2.5% vs. main code). All matches are in *.cs files.


*.cs835 LOC (100%) 7 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 ".*[.]bat".
    • files with paths like ".*[.]csproj".
  • 18 files match defined criteria (1,498 lines of code, 4.4% vs. main code):
    • 17 *.csproj files (1,433 lines of code)
    • 1 *.bat files (65 lines of code)
  • " *.csproj" is biggest, containing 95.66% of code.
  • " *.bat" is smallest, containing 4.34% of code.


*.csproj1433 LOC (95%) 17 files
*.bat65 LOC (4%) 1 files
Other Code
editorconfig
mod
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 ".*/go[.]mod".
    • files with paths like ".*[.]txt".
    • files with paths like ".*/LICENSE[.][a-z0-9]+".
    • files with paths like ".*/README[.][a-z0-9]+".
    • files with paths like ".*[.]editorconfig".
    • files with paths like ".*[.]svg".
    • files with paths like ".*[.](xml|xsd|robot|sql|pgsql|dashboard|profile|ipynb|raml|avsc|al)".
  • 111 files match defined criteria (393 lines of code, 1.2% vs. main code):
    • 93 *.svg files (195 lines of code)
    • 15 *.md files (168 lines of code)
    • 1 *.sql files (17 lines of code)
    • 1 *.editorconfig files (8 lines of code)
    • 1 *.mod files (5 lines of code)
  • " *.svg" is biggest, containing 49.62% of code.
  • " *.mod" is smallest, containing 1.27% of code.


*.svg195 LOC (49%) 93 files
*.md168 LOC (42%) 15 files
*.sql17 LOC (4%) 1 files
*.editorconfig8 LOC (2%) 1 files
*.mod5 LOC (1%) 1 files
Analyzers
Info about analyzers used for source code examinations.
  • *.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)
  • *.xq 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
  • *.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
  • *.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
  • *.go files are analyzed with GoLangAnalyzer:
    • 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
  • *.htm 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
  • *.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
  • *.pl files are analyzed with PerlAnalyzer:
    • 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
  • *.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
  • *.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


2022-01-31 00:54