microsoft / fluentui
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
snap
npmignore
mdx
hbs
txt
npmrc
gitattributes
ejs
eslintignore
prettierignore
  • 24 extensions are included in analyses: tsx, ts, json, md, js, snap, npmignore, scss, html, mdx, yml, hbs, svg, txt, gitignore, css, npmrc, gitattributes, jsx, sh, htm, ejs, eslintignore, prettierignore
  • 9 criteria are used to exclude files from analysis:
    • exclude files with path like ".*/[.][a-zA-Z0-9_]+.*" (Hidden files and folders) (409 files).
    • exclude files with path like ".*/docs/.*" (Documentation) (1592 files).
    • exclude files with path like ".*/bin/.*" (Binaries for distribution) (3 files).
    • exclude files with path like ".*\.d\.ts" (Typescript definition files) (10 files).
    • exclude files with path like ".*/react(-[^.]*)?\.js" (React) (55 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) (9 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.

main323012 LOC (36%) 7740 files
test200098 LOC (22%) 1143 files
generated0 LOC (0%) 0 files
build and deployment1480 LOC (<1%) 44 files
other368823 LOC (41%) 1436 files
Main Code
All manually created or maintained source code that defines logic of the product that is run in a production environment.
hbs
Explore:   circles  |  sunburst
  • The following criteria are used to filter files:
    • files with paths like ".*".
  • 7740 files match defined criteria (323,012 lines of code, 100.0% vs. main code):
    • 4,180 *.tsx files (181,711 lines of code)
    • 3,138 *.ts files (126,410 lines of code)
    • 267 *.js files (5,266 lines of code)
    • 77 *.scss files (4,418 lines of code)
    • 51 *.html files (3,840 lines of code)
    • 9 *.yml files (924 lines of code)
    • 13 *.hbs files (253 lines of code)
    • 4 *.css files (178 lines of code)
    • 1 *.jsx files (12 lines of code)
  • " *.tsx" is biggest, containing 56.26% of code.
  • " *.jsx" is smallest, containing 0% of code.


*.tsx181711 LOC (56%) 4180 files
*.ts126410 LOC (39%) 3138 files
*.js5266 LOC (1%) 267 files
*.scss4418 LOC (1%) 77 files
*.html3840 LOC (1%) 51 files
*.yml924 LOC (<1%) 9 files
*.hbs253 LOC (<1%) 13 files
*.css178 LOC (<1%) 4 files
*.jsx12 LOC (<1%) 1 files
Test Code
Used only for testing of the product. Normally not deployed in a production environment.
snap
hbs
Explore:   circles  |  sunburst
  • The following criteria are used to filter files:
    • files with paths like ".*[-]tests/.*".
    • files with paths like ".*/[Tt]est/.*".
    • files with paths like ".*[-]test[-].*".
    • files with paths like ".*[.][Tt]est[.].*".
    • files with paths like ".*[.]test[.].*".
    • files with paths like ".*[.]snap".
    • files with paths like ".*/[Tt]ests/.*".
    • files with paths like ".*/e2e/.*".
    • files with paths like ".*[.]spec[.]ts".
    • files with paths like ".*/__mocks?__/.*".
    • files with paths like ".*/[Ss]pecs/.*".
    • files with paths like ".*/karma[.]conf[.]js".
    • files with paths like ".*__test__.*".
    • files with paths like ".*[.]spec[.]js".
    • files with any line of content like ".*/simpletest/.*".
  • 1143 files match defined criteria (200,098 lines of code, 61.9% vs. main code):
    • 185 *.snap files (119,144 lines of code)
    • 618 *.tsx files (58,769 lines of code)
    • 313 *.ts files (21,188 lines of code)
    • 25 *.js files (970 lines of code)
    • 1 *.hbs files (15 lines of code)
    • 1 *.html files (12 lines of code)
  • " *.snap" is biggest, containing 59.54% of code.
  • " *.html" is smallest, containing 0.01% of code.


*.snap119144 LOC (59%) 185 files
*.tsx58769 LOC (29%) 618 files
*.ts21188 LOC (10%) 313 files
*.js970 LOC (<1%) 25 files
*.hbs15 LOC (<1%) 1 files
*.html12 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 ".*/package[.]json".
    • files with paths like ".*([.]|/)webpack([.]|/).*".
    • files with paths like ".*[.]sh".
  • 44 files match defined criteria (1,480 lines of code, 0.5% vs. main code):
    • 37 *.js files (923 lines of code)
    • 6 *.ts files (535 lines of code)
    • 1 *.sh files (22 lines of code)
  • " *.js" is biggest, containing 62.36% of code.
  • " *.sh" is smallest, containing 1.49% of code.


*.js923 LOC (62%) 37 files
*.ts535 LOC (36%) 6 files
*.sh22 LOC (1%) 1 files
Other Code
mdx
Explore:   circles  |  sunburst
  • The following criteria are used to filter files:
    • files with paths like ".*[.]json".
    • files with paths like ".*[.]md".
    • files with paths like ".*/[.]gitignore".
    • files with paths like ".*[.]npmrc".
    • files with paths like ".*/[.]prettierignore".
    • files with paths like ".*/README[.][a-z0-9]+".
    • files with paths like ".*/[.]npmignore".
    • files with paths like ".*[.]txt".
    • files with paths like ".*/[Ss]amples/.*".
    • files with paths like ".*/[Dd]ocumentation/.*".
    • files with paths like ".*/[Ee]xamples/.*".
    • files with paths like ".*[.]mdx".
    • files with paths like ".*[.]svg".
    • files with paths like ".*/[Dd]emos?/.*".
    • files with paths like ".*/[.]eslintignore".
  • 1436 files match defined criteria (368,823 lines of code, 114.2% vs. main code):
    • 995 *.json files (260,808 lines of code)
    • 395 *.md files (103,928 lines of code)
    • 33 *.mdx files (3,044 lines of code)
    • 9 *.tsx files (607 lines of code)
    • 2 *.ts files (418 lines of code)
    • 2 *.svg files (18 lines of code)
  • " *.json" is biggest, containing 70.71% of code.
  • " *.svg" is smallest, containing 0% of code.


*.json260808 LOC (70%) 995 files
*.md103928 LOC (28%) 395 files
*.mdx3044 LOC (<1%) 33 files
*.tsx607 LOC (<1%) 9 files
*.ts418 LOC (<1%) 2 files
*.svg18 LOC (<1%) 2 files
Analyzers
Info about analyzers used for source code examinations.
  • *.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
  • *.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
  • *.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
  • *.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
  • *.hbs 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
  • *.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
  • *.jsx 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


2022-01-30 13:40