microsoft / ajaxmin
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
csproj
targets
xaml
wixproj
nuspec
proj
txt
wxs
  • 18 extensions are included in analyses: js, cs, css, xml, resx, csproj, targets, xaml, ps1, bat, md, wixproj, json, nuspec, gitignore, proj, txt, wxs
  • 11 criteria are used to exclude files from analysis:
    • exclude files with path like ".*/[.][a-zA-Z0-9_]+.*" (Hidden files and folders) (1 file).
    • exclude files with path like ".*[.]resx" (The resx resource files) (14 files).
    • exclude files with path like ".*[.]min[.]js" (Minimized JS library) (5 files).
    • exclude files with path like "(?i).*/jquery.*[.]js" (jQuery files) (12 files).
    • exclude files with path like ".*/modernizr\-\d\.\d+(\.\d+)?\.js" (Modernizr) (1 file).
    • exclude files with path like ".*/prototype(.*)\.js" (Prototype) (2 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 ".*/bootstrap[-].*" (Library) (1 file).
    • exclude files with path like ".*[.]txt" (Text files) (0 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.

main50843 LOC (77%) 243 files
test7921 LOC (12%) 937 files
generated2189 LOC (3%) 13 files
build and deployment3899 LOC (5%) 16 files
other349 LOC (<1%) 24 files
Main Code
All manually created or maintained source code that defines logic of the product that is run in a production environment.
wxs
targets
wixproj
proj
Explore:   circles  |  sunburst
  • The following criteria are used to filter files:
    • files with paths like ".*".
  • 243 files match defined criteria (50,843 lines of code, 100.0% vs. main code):
    • 234 *.cs files (50,324 lines of code)
    • 1 *.wxs files (178 lines of code)
    • 4 *.targets files (134 lines of code)
    • 1 *.wixproj files (107 lines of code)
    • 1 *.proj files (78 lines of code)
    • 2 *.ps1 files (22 lines of code)
  • " *.cs" is biggest, containing 98.98% of code.
  • " *.ps1" is smallest, containing 0.04% of code.


*.cs50324 LOC (98%) 234 files
*.wxs178 LOC (<1%) 1 files
*.targets134 LOC (<1%) 4 files
*.wixproj107 LOC (<1%) 1 files
*.proj78 LOC (<1%) 1 files
*.ps122 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 ".*/TestData/.*".
    • files with paths like ".*/test_.*".
    • files with any line of content like ".*/simpletest/.*".
  • 937 files match defined criteria (7,921 lines of code, 15.6% vs. main code):
    • 707 *.js files (6,102 lines of code)
    • 230 *.css files (1,819 lines of code)
  • " *.js" is biggest, containing 77.04% of code.
  • " *.css" is smallest, containing 22.96% of code.


*.js6102 LOC (77%) 707 files
*.css1819 LOC (22%) 230 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 "[/][/][ ]*".
  • 13 files match defined criteria (2,189 lines of code, 4.3% vs. main code). All matches are in *.cs files.


*.cs2189 LOC (100%) 13 files
Build and Deployment Code
Source code used to configure or support build and deployment process.
csproj
nuspec
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 ".*[.]csproj".
    • files with paths like ".*[.]bat".
    • files with paths like ".*[.]nuspec".
  • 16 files match defined criteria (3,899 lines of code, 7.7% vs. main code):
    • 13 *.csproj files (3,858 lines of code)
    • 1 *.nuspec files (31 lines of code)
    • 2 *.bat files (10 lines of code)
  • " *.csproj" is biggest, containing 98.95% of code.
  • " *.bat" is smallest, containing 0.26% of code.


*.csproj3858 LOC (98%) 13 files
*.nuspec31 LOC (<1%) 1 files
*.bat10 LOC (<1%) 2 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 ".*[.](xml|xsd|robot|sql|pgsql|dashboard|profile|ipynb|raml|avsc|al)".
  • 24 files match defined criteria (349 lines of code, 0.7% vs. main code):
    • 22 *.xml files (320 lines of code)
    • 2 *.md files (29 lines of code)
  • " *.xml" is biggest, containing 91.69% of code.
  • " *.md" is smallest, containing 8.31% of code.


*.xml320 LOC (91%) 22 files
*.md29 LOC (8%) 2 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)
  • *.wxs 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
  • *.targets 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
  • *.wixproj 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
  • *.proj 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
  • *.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


2022-01-30 22:10