microsoft / azure-pipelines-extensions
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
xlf
csproj
handlebars
gitattributes
  • 20 extensions are included in analyses: ts, ps1, json, md, txt, tsx, js, cs, xlf, svg, csproj, handlebars, psm1, html, gitignore, css, psd1, less, scss, gitattributes
  • 7 criteria are used to exclude files from analysis:
    • exclude files with path like ".*/[.][a-zA-Z0-9_]+.*" (Hidden files and folders) (11 files).
    • exclude files with path like ".*\.d\.ts" (Typescript definition files) (10 files).
    • exclude files with path like ".*/docs/.*" (Documentation) (8 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) (33 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.

main25141 LOC (17%) 242 files
test16286 LOC (11%) 443 files
generated44420 LOC (30%) 21 files
build and deployment326 LOC (<1%) 10 files
other57567 LOC (40%) 189 files
Main Code
All manually created or maintained source code that defines logic of the product that is run in a production environment.
xlf
handlebars
Explore:   circles  |  sunburst
  • The following criteria are used to filter files:
    • files with paths like ".*".
  • 242 files match defined criteria (25,141 lines of code, 100.0% vs. main code):
    • 43 *.ps1 files (8,406 lines of code)
    • 95 *.ts files (6,600 lines of code)
    • 19 *.js files (5,475 lines of code)
    • 30 *.tsx files (1,403 lines of code)
    • 26 *.cs files (1,355 lines of code)
    • 9 *.xlf files (513 lines of code)
    • 2 *.css files (464 lines of code)
    • 2 *.less files (458 lines of code)
    • 4 *.psm1 files (204 lines of code)
    • 4 *.html files (94 lines of code)
    • 5 *.handlebars files (93 lines of code)
    • 2 *.psd1 files (44 lines of code)
    • 1 *.scss files (32 lines of code)
  • " *.ps1" is biggest, containing 33.44% of code.
  • " *.scss" is smallest, containing 0.13% of code.


*.ps18406 LOC (33%) 43 files
*.ts6600 LOC (26%) 95 files
*.js5475 LOC (21%) 19 files
*.tsx1403 LOC (5%) 30 files
*.cs1355 LOC (5%) 26 files
*.xlf513 LOC (2%) 9 files
*.css464 LOC (1%) 2 files
*.less458 LOC (1%) 2 files
*.psm1204 LOC (<1%) 4 files
*.html94 LOC (<1%) 4 files
*.handlebars93 LOC (<1%) 5 files
*.psd144 LOC (<1%) 2 files
*.scss32 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 ".*/[Tt]ests/.*".
    • files with paths like ".*/IntegrationTests?/.*".
    • files with paths like ".*/TestData/.*".
    • files with paths like ".*[.][Tt]ests[.].*".
    • files with any line of content like ".*/simpletest/.*".
  • 443 files match defined criteria (16,286 lines of code, 64.8% vs. main code):
    • 301 *.ts files (10,222 lines of code)
    • 142 *.ps1 files (6,064 lines of code)
  • " *.ts" is biggest, containing 62.77% of code.
  • " *.ps1" is smallest, containing 37.23% of code.


*.ts10222 LOC (62%) 301 files
*.ps16064 LOC (37%) 142 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 ".*/npm[-]shrinkwrap[.]json".
    • files with paths like ".*/package[-]lock[.]json".
  • 21 files match defined criteria (44,420 lines of code, 176.7% vs. main code). All matches are in *.json files.


*.json44420 LOC (100%) 21 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 ".*/[.]gitattributes".
    • files with paths like ".*/[.]gitignore".
    • files with paths like ".*/package[.]json".
    • files with paths like ".*/package[-]lock[.]json".
    • files with paths like ".*([.]|/)webpack([.]|/).*".
    • files with paths like ".*[.]csproj".
  • 10 files match defined criteria (326 lines of code, 1.3% vs. main code):
    • 4 *.js files (218 lines of code)
    • 6 *.csproj files (108 lines of code)
  • " *.js" is biggest, containing 66.87% of code.
  • " *.csproj" is smallest, containing 33.13% of code.


*.js218 LOC (66%) 4 files
*.csproj108 LOC (33%) 6 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 ".*[.]txt".
    • files with paths like ".*/README[.][a-z0-9]+".
    • files with paths like ".*[.]svg".
  • 189 files match defined criteria (57,567 lines of code, 229.0% vs. main code):
    • 146 *.json files (55,918 lines of code)
    • 40 *.md files (1,625 lines of code)
    • 3 *.svg files (24 lines of code)
  • " *.json" is biggest, containing 97.14% of code.
  • " *.svg" is smallest, containing 0.04% of code.


*.json55918 LOC (97%) 146 files
*.md1625 LOC (2%) 40 files
*.svg24 LOC (<1%) 3 files
Analyzers
Info about analyzers used for source code examinations.
  • *.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
  • *.ts files are analyzed with TypeScriptAnalyzer:
    • 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
  • *.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
  • *.tsx files are analyzed with TypeScriptAnalyzer:
    • 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
  • *.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)
  • *.xlf 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
  • *.less files are analyzed with LessAnalyzer:
    • 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
  • *.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
  • *.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
  • *.handlebars 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
  • *.psd1 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
  • *.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


2022-01-30 13:33