microsoft / PartsUnlimitedMRP
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
properties
gitattributes
txt
  • 20 extensions are included in analyses: java, json, sh, md, js, yml, html, css, properties, py, bat, gitignore, ps1, gradle, pp, rb, groovy, gitattributes, txt, xml
  • 6 criteria are used to exclude files from analysis:
    • exclude files with path like ".*/[.][a-zA-Z0-9_]+.*" (Hidden files and folders) (7 files).
    • exclude files with path like ".*/gradle/wrapper/.*" (Gradle) (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) (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.

main79868 LOC (86%) 146 files
test1865 LOC (2%) 26 files
generated0 LOC (0%) 0 files
build and deployment677 LOC (<1%) 34 files
other10339 LOC (11%) 77 files
Main Code
All manually created or maintained source code that defines logic of the product that is run in a production environment.
Explore:   circles  |  sunburst
  • The following criteria are used to filter files:
    • files with paths like ".*".
  • 146 files match defined criteria (79,868 lines of code, 100.0% vs. main code):
    • 17 *.js files (58,239 lines of code)
    • 12 *.css files (14,631 lines of code)
    • 75 *.java files (5,221 lines of code)
    • 13 *.html files (830 lines of code)
    • 11 *.yml files (338 lines of code)
    • 2 *.pp files (254 lines of code)
    • 2 *.rb files (124 lines of code)
    • 4 *.ps1 files (108 lines of code)
    • 2 *.groovy files (86 lines of code)
    • 8 *.py files (37 lines of code)
  • " *.js" is biggest, containing 72.92% of code.
  • " *.py" is smallest, containing 0.05% of code.


*.js58239 LOC (72%) 17 files
*.css14631 LOC (18%) 12 files
*.java5221 LOC (6%) 75 files
*.html830 LOC (1%) 13 files
*.yml338 LOC (<1%) 11 files
*.pp254 LOC (<1%) 2 files
*.rb124 LOC (<1%) 2 files
*.ps1108 LOC (<1%) 4 files
*.groovy86 LOC (<1%) 2 files
*.py37 LOC (<1%) 8 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]ests/.*".
    • files with paths like ".*/[Tt]est/.*".
    • files with any line of content like ".*/simpletest/.*".
  • 26 files match defined criteria (1,865 lines of code, 2.3% vs. main code):
    • 24 *.java files (1,852 lines of code)
    • 2 *.py files (13 lines of code)
  • " *.java" is biggest, containing 99.3% of code.
  • " *.py" is smallest, containing 0.7% of code.


*.java1852 LOC (99%) 24 files
*.py13 LOC (<1%) 2 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 ".*[.]sh".
    • files with paths like ".*[.]gradle".
    • files with paths like ".*[.]bat".
  • 34 files match defined criteria (677 lines of code, 0.8% vs. main code):
    • 25 *.sh files (328 lines of code)
    • 5 *.bat files (201 lines of code)
    • 4 *.gradle files (148 lines of code)
  • " *.sh" is biggest, containing 48.45% of code.
  • " *.gradle" is smallest, containing 21.86% of code.


*.sh328 LOC (48%) 25 files
*.bat201 LOC (29%) 5 files
*.gradle148 LOC (21%) 4 files
Other Code
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 ".*[.]md".
    • files with paths like ".*/README[.][a-z0-9]+".
    • files with paths like ".*[.]txt".
    • files with paths like ".*[.]properties".
    • files with paths like ".*[.](xml|xsd|robot|sql|pgsql|dashboard|profile|ipynb|raml|avsc|al)".
  • 77 files match defined criteria (10,339 lines of code, 12.9% vs. main code):
    • 49 *.json files (8,872 lines of code)
    • 22 *.md files (1,385 lines of code)
    • 5 *.properties files (59 lines of code)
    • 1 *.xml files (23 lines of code)
  • " *.json" is biggest, containing 85.81% of code.
  • " *.xml" is smallest, containing 0.22% of code.


*.json8872 LOC (85%) 49 files
*.md1385 LOC (13%) 22 files
*.properties59 LOC (<1%) 5 files
*.xml23 LOC (<1%) 1 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
  • *.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)
  • *.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
  • *.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
  • *.pp files are analyzed with PuppetAnalyzer:
    • 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
  • *.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
  • *.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
  • *.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
  • *.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


2022-01-30 10:05