aws-amplify / amplify-ui
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
mdx
feature
t
editorconfig
gitattributes
txt
prettierignore
  • 22 extensions are included in analyses: tsx, svg, ts, mdx, json, js, scss, vue, html, md, css, gitignore, feature, yml, t, sh, cjs, editorconfig, yaml, gitattributes, txt, prettierignore
  • 9 criteria are used to exclude files from analysis:
    • exclude files with path like ".*/[.][a-zA-Z0-9_]+.*" (Hidden files and folders) (77 files).
    • exclude files with path like ".*\.d\.ts" (Typescript definition files) (25 files).
    • exclude files with path like ".*/angular([^.]*)\.js" (AngularJS) (19 files).
    • exclude files with path like ".*/docs/.*" (Documentation) (527 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 ".*/react(-[^.]*)?\.js" (React) (1 file).
    • exclude files with path like ".*[.]txt" (Text files) (0 files).
    • exclude files with path like ".*/sokrates_conventions[.]json" (Sokrates scoping conventions) (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.

main61636 LOC (73%) 1814 files
test11462 LOC (13%) 121 files
generated0 LOC (0%) 0 files
build and deployment40 LOC (<1%) 1 files
other11164 LOC (13%) 1578 files
Main Code
All manually created or maintained source code that defines logic of the product that is run in a production environment.
t
Explore:   circles  |  sunburst
  • The following criteria are used to filter files:
    • files with paths like ".*".
  • 1814 files match defined criteria (61,636 lines of code, 100.0% vs. main code):
    • 1,379 *.tsx files (40,616 lines of code)
    • 255 *.ts files (9,284 lines of code)
    • 15 *.yml files (4,403 lines of code)
    • 36 *.vue files (2,829 lines of code)
    • 46 *.scss files (2,146 lines of code)
    • 44 *.js files (1,364 lines of code)
    • 26 *.html files (890 lines of code)
    • 6 *.t files (39 lines of code)
    • 4 *.css files (37 lines of code)
    • 3 *.cjs files (28 lines of code)
  • " *.tsx" is biggest, containing 65.9% of code.
  • " *.cjs" is smallest, containing 0.05% of code.


*.tsx40616 LOC (65%) 1379 files
*.ts9284 LOC (15%) 255 files
*.yml4403 LOC (7%) 15 files
*.vue2829 LOC (4%) 36 files
*.scss2146 LOC (3%) 46 files
*.js1364 LOC (2%) 44 files
*.html890 LOC (1%) 26 files
*.t39 LOC (<1%) 6 files
*.css37 LOC (<1%) 4 files
*.cjs28 LOC (<1%) 3 files
Test Code
Used only for testing of the product. Normally not deployed in a production environment.
feature
Explore:   circles  |  sunburst
  • The following criteria are used to filter files:
    • files with paths like ".*/e2e/.*".
    • files with paths like ".*/protractor[.]conf[.]js".
    • files with paths like ".*/karma[.]conf[.]js".
    • files with paths like ".*[.][Tt]est[.].*".
    • files with paths like ".*[.]test[.].*".
    • files with paths like ".*__tests__.*".
    • files with paths like ".*__test__.*".
    • files with paths like ".*[.]spec[.]ts".
    • files with paths like ".*[.]feature".
    • files with any line of content like ".*/simpletest/.*".
  • 121 files match defined criteria (11,462 lines of code, 18.6% vs. main code):
    • 67 *.tsx files (6,199 lines of code)
    • 29 *.ts files (4,412 lines of code)
    • 23 *.feature files (804 lines of code)
    • 2 *.js files (47 lines of code)
  • " *.tsx" is biggest, containing 54.08% of code.
  • " *.js" is smallest, containing 0.41% of code.


*.tsx6199 LOC (54%) 67 files
*.ts4412 LOC (38%) 29 files
*.feature804 LOC (7%) 23 files
*.js47 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 ".*[.]sh".
    • files with paths like ".*/package[.]json".
    • files with paths like ".*[.]git[a-z]+".
    • files with paths like ".*/[.]gitignore".
    • files with paths like ".*/[.]gitattributes".
  • 1 file matches defined criteria (40 lines of code, 0.1% vs. main code). All matches are in *.sh files.


*.sh40 LOC (100%) 1 files
Other Code
Explore:   circles  |  sunburst
  • The following criteria are used to filter files:
    • files with paths like ".*[.]md".
    • files with paths like ".*/README[.][a-z0-9]+".
    • files with paths like ".*[.]json".
    • files with paths like ".*/[Ee]xamples/.*".
    • files with paths like ".*/[.]gitignore".
    • files with paths like ".*[.]editorconfig".
    • files with paths like ".*[.]mdx".
    • files with paths like ".*[.]svg".
    • files with paths like ".*[.]txt".
    • files with paths like ".*/[.]prettierignore".
  • 1578 files match defined criteria (11,164 lines of code, 18.1% vs. main code):
    • 1,272 *.svg files (4,204 lines of code)
    • 126 *.json files (3,365 lines of code)
    • 31 *.md files (1,152 lines of code)
    • 35 *.ts files (761 lines of code)
    • 28 *.tsx files (691 lines of code)
    • 19 *.vue files (422 lines of code)
    • 22 *.html files (317 lines of code)
    • 42 *.js files (146 lines of code)
    • 2 *.scss files (105 lines of code)
    • 1 *.css files (1 lines of code)
  • " *.svg" is biggest, containing 37.66% of code.
  • " *.css" is smallest, containing 0.01% of code.


*.svg4204 LOC (37%) 1272 files
*.json3365 LOC (30%) 126 files
*.md1152 LOC (10%) 31 files
*.ts761 LOC (6%) 35 files
*.tsx691 LOC (6%) 28 files
*.vue422 LOC (3%) 19 files
*.html317 LOC (2%) 22 files
*.js146 LOC (1%) 42 files
*.scss105 LOC (<1%) 2 files
*.css1 LOC (<1%) 1 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
  • *.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
  • *.vue 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
  • *.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
  • *.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
  • *.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
  • *.t files are analyzed with PerlAnalyzer:
    • 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
  • *.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
  • *.cjs 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


2022-02-01 01:58