microsoft / initializr
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
adoc
txt
xsl
properties
prefs
cmd
snippet
gitattributes
  • 22 extensions are included in analyses: java, xml, json, adoc, css, txt, yml, xsl, properties, js, mustache, bat, kt, groovy, prefs, gradle, cmd, snippet, gitattributes, sh, svg, gitignore
  • 11 criteria are used to exclude files from analysis:
    • exclude files with path like ".*/[.][a-zA-Z0-9_]+.*" (Hidden files and folders) (3 files).
    • exclude files with path like ".*/[Jj]avadoc/.*" (Generated documentation) (1 file).
    • exclude files with path like ".*/gradle/wrapper/.*" (Gradle) (3 files).
    • exclude files with path like ".*/mvnw\.cmd" (Maven) (2 files).
    • exclude files with path like ".*[.]min[.]js" (Minimized JS library) (1 file).
    • exclude files with path like ".*/dependencies/.*" (Dependencies) (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 ".*[.]txt" (Text files) (7 files).
    • exclude files with path like ".*/static/js/.*" (JS library) (1 file).
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.

main9772 LOC (36%) 113 files
test9434 LOC (35%) 92 files
generated0 LOC (0%) 0 files
build and deployment381 LOC (1%) 6 files
other6968 LOC (26%) 55 files
Main Code
All manually created or maintained source code that defines logic of the product that is run in a production environment.
xsl
prefs
adoc
Explore:   circles  |  sunburst
  • The following criteria are used to filter files:
    • files with paths like ".*".
  • 113 files match defined criteria (9,772 lines of code, 100.0% vs. main code):
    • 88 *.java files (6,399 lines of code)
    • 2 *.yml files (1,404 lines of code)
    • 6 *.xsl files (605 lines of code)
    • 5 *.css files (463 lines of code)
    • 1 *.prefs files (412 lines of code)
    • 3 *.mustache files (320 lines of code)
    • 2 *.adoc files (91 lines of code)
    • 3 *.kt files (43 lines of code)
    • 3 *.groovy files (35 lines of code)
  • " *.java" is biggest, containing 65.48% of code.
  • " *.groovy" is smallest, containing 0.36% of code.


*.java6399 LOC (65%) 88 files
*.yml1404 LOC (14%) 2 files
*.xsl605 LOC (6%) 6 files
*.css463 LOC (4%) 5 files
*.prefs412 LOC (4%) 1 files
*.mustache320 LOC (3%) 3 files
*.adoc91 LOC (<1%) 2 files
*.kt43 LOC (<1%) 3 files
*.groovy35 LOC (<1%) 3 files
Test Code
Used only for testing of the product. Normally not deployed in a production environment.
snippet
Explore:   circles  |  sunburst
  • The following criteria are used to filter files:
    • files with paths like ".*/[Tt]est/.*".
    • files with paths like ".*[-]test[-].*".
    • files with any line of content like ".*/simpletest/.*".
  • 92 files match defined criteria (9,434 lines of code, 96.5% vs. main code):
    • 86 *.java files (9,231 lines of code)
    • 5 *.yml files (199 lines of code)
    • 1 *.snippet files (4 lines of code)
  • " *.java" is biggest, containing 97.85% of code.
  • " *.snippet" is smallest, containing 0.04% of code.


*.java9231 LOC (97%) 86 files
*.yml199 LOC (2%) 5 files
*.snippet4 LOC (<1%) 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 ".*/pom[.]xml".
    • files with paths like ".*[.]bat".
    • files with paths like ".*[.]gradle".
    • files with paths like ".*[.]sh".
    • files with paths like ".*/[.]mvn/.*".
  • 6 files match defined criteria (381 lines of code, 3.9% vs. main code):
    • 3 *.bat files (188 lines of code)
    • 2 *.gradle files (121 lines of code)
    • 1 *.sh files (72 lines of code)
  • " *.bat" is biggest, containing 49.34% of code.
  • " *.sh" is smallest, containing 18.9% of code.


*.bat188 LOC (49%) 3 files
*.gradle121 LOC (31%) 2 files
*.sh72 LOC (18%) 1 files
Other Code
adoc
properties
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 ".*[.]properties".
    • 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 ".*/asciidoc/.*".
    • files with paths like ".*[.](xml|xsd|robot|sql|pgsql|dashboard|profile|ipynb|raml|avsc|al)".
  • 55 files match defined criteria (6,968 lines of code, 71.3% vs. main code):
    • 32 *.xml files (3,383 lines of code)
    • 13 *.json files (2,091 lines of code)
    • 9 *.adoc files (1,493 lines of code)
    • 1 *.properties files (1 lines of code)
  • " *.xml" is biggest, containing 48.55% of code.
  • " *.properties" is smallest, containing 0.01% of code.


*.xml3383 LOC (48%) 32 files
*.json2091 LOC (30%) 13 files
*.adoc1493 LOC (21%) 9 files
*.properties1 LOC (<1%) 1 files
Analyzers
Info about analyzers used for source code examinations.
  • *.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)
  • *.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
  • *.xsl 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
  • *.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
  • *.prefs 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
  • *.mustache 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
  • *.adoc 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
  • *.kt files are analyzed with KotlinAnalyzer:
    • 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 (based on imports and package statements)
  • *.groovy files are analyzed with GroovyAnalyzer:
    • 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


2022-01-30 15:00