aws-samples / amazon-transcribe-live-call-analytics
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
prettierignore
dockerignore
mk
ini
eslintignore
properties
  • 21 extensions are included in analyses: js, py, jsx, java, json, txt, md, yaml, css, sh, gitignore, toml, prettierignore, dockerignore, html, graphql, mk, ini, gradle, eslintignore, properties
  • 5 criteria are used to exclude files from analysis:
    • exclude files with path like ".*/[.][a-zA-Z0-9_]+.*" (Hidden files and folders) (12 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 ".*[.]txt" (Text files) (11 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.

main9141 LOC (6%) 113 files
test11 LOC (<1%) 1 files
generated64715 LOC (46%) 4 files
build and deployment207 LOC (<1%) 6 files
other65356 LOC (46%) 21 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 ".*".
  • 113 files match defined criteria (9,141 lines of code, 100.0% vs. main code):
    • 5 *.yaml files (3,277 lines of code)
    • 24 *.py files (1,503 lines of code)
    • 38 *.js files (1,421 lines of code)
    • 22 *.jsx files (1,348 lines of code)
    • 16 *.java files (1,327 lines of code)
    • 1 *.graphql files (200 lines of code)
    • 2 *.toml files (31 lines of code)
    • 1 *.html files (20 lines of code)
    • 4 *.css files (14 lines of code)
  • " *.yaml" is biggest, containing 35.85% of code.
  • " *.css" is smallest, containing 0.15% of code.


*.yaml3277 LOC (35%) 5 files
*.py1503 LOC (16%) 24 files
*.js1421 LOC (15%) 38 files
*.jsx1348 LOC (14%) 22 files
*.java1327 LOC (14%) 16 files
*.graphql200 LOC (2%) 1 files
*.toml31 LOC (<1%) 2 files
*.html20 LOC (<1%) 1 files
*.css14 LOC (<1%) 4 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]est[.].*".
    • files with paths like ".*[.]test[.].*".
    • files with any line of content like ".*/simpletest/.*".
  • 1 file matches defined criteria (11 lines of code, 0.1% vs. main code). All matches are in *.js files.


*.js11 LOC (100%) 1 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 ".*/package[-]lock[.]json".
  • 4 files match defined criteria (64,715 lines of code, 708.0% vs. main code). All matches are in *.json files.


*.json64715 LOC (100%) 4 files
Build and Deployment Code
Source code used to configure or support build and deployment process.
mk
Explore:   circles  |  sunburst
  • The following criteria are used to filter files:
    • files with paths like ".*[.]sh".
    • files with paths like ".*[.]mk".
    • files with paths like ".*/package[.]json".
    • files with paths like ".*[.]gradle".
    • files with paths like ".*[.]git[a-z]+".
    • files with paths like ".*/[.]gitignore".
    • files with paths like ".*/package[-]lock[.]json".
  • 6 files match defined criteria (207 lines of code, 2.3% vs. main code):
    • 4 *.sh files (153 lines of code)
    • 1 *.gradle files (42 lines of code)
    • 1 *.mk files (12 lines of code)
  • " *.sh" is biggest, containing 73.91% of code.
  • " *.mk" is smallest, containing 5.8% of code.


*.sh153 LOC (73%) 4 files
*.gradle42 LOC (20%) 1 files
*.mk12 LOC (5%) 1 files
Other Code
properties
ini
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 ".*[.]txt".
    • files with paths like ".*[.]json".
    • files with paths like ".*[.]ini".
    • files with paths like ".*[.]properties".
    • files with paths like ".*/[.]dockerignore".
    • files with paths like ".*/[.]eslintignore".
    • files with paths like ".*/[.]gitignore".
    • files with paths like ".*/[.]prettierignore".
    • files with paths like ".*/LICENSE[.][a-z0-9]+".
  • 21 files match defined criteria (65,356 lines of code, 715.0% vs. main code):
    • 9 *.json files (64,850 lines of code)
    • 10 *.md files (497 lines of code)
    • 1 *.properties files (7 lines of code)
    • 1 *.ini files (2 lines of code)
  • " *.json" is biggest, containing 99.23% of code.
  • " *.ini" is smallest, containing 0% of code.


*.json64850 LOC (99%) 9 files
*.md497 LOC (<1%) 10 files
*.properties7 LOC (<1%) 1 files
*.ini2 LOC (<1%) 1 files
Analyzers
Info about analyzers used for source code examinations.
  • *.yaml 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
  • *.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
  • *.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
  • *.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
  • *.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)
  • *.graphql 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
  • *.toml 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
  • *.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


2022-01-31 17:58