aws-samples / chip-wafer-classification-deep-learning
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
webmanifest
txt
adoc
  • 16 extensions are included in analyses: js, css, py, yaml, yml, ipynb, md, json, gitignore, sh, svg, webmanifest, txt, xml, html, adoc
  • 5 criteria are used to exclude files from analysis:
    • exclude files with path like ".*/[.][a-zA-Z0-9_]+.*" (Hidden files and folders) (5 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) (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.

main3823 LOC (8%) 32 files
test41 LOC (<1%) 3 files
generated19148 LOC (40%) 1 files
build and deployment113 LOC (<1%) 3 files
other23976 LOC (50%) 14 files
Main Code
All manually created or maintained source code that defines logic of the product that is run in a production environment.
webmanifest
Explore:   circles  |  sunburst
  • The following criteria are used to filter files:
    • files with paths like ".*".
  • 32 files match defined criteria (3,823 lines of code, 100.0% vs. main code):
    • 6 *.yaml files (2,629 lines of code)
    • 10 *.js files (581 lines of code)
    • 5 *.py files (438 lines of code)
    • 6 *.css files (91 lines of code)
    • 3 *.yml files (43 lines of code)
    • 1 *.html files (22 lines of code)
    • 1 *.webmanifest files (19 lines of code)
  • " *.yaml" is biggest, containing 68.77% of code.
  • " *.webmanifest" is smallest, containing 0.5% of code.


*.yaml2629 LOC (68%) 6 files
*.js581 LOC (15%) 10 files
*.py438 LOC (11%) 5 files
*.css91 LOC (2%) 6 files
*.yml43 LOC (1%) 3 files
*.html22 LOC (<1%) 1 files
*.webmanifest19 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]est[.].*".
    • files with paths like ".*[.]test[.].*".
    • files with paths like ".*/test_.*".
    • files with any line of content like ".*/simpletest/.*".
  • 3 files match defined criteria (41 lines of code, 1.1% vs. main code):
    • 1 *.py files (24 lines of code)
    • 1 *.yml files (11 lines of code)
    • 1 *.js files (6 lines of code)
  • " *.py" is biggest, containing 58.54% of code.
  • " *.js" is smallest, containing 14.63% of code.


*.py24 LOC (58%) 1 files
*.yml11 LOC (26%) 1 files
*.js6 LOC (14%) 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".
  • 1 file matches defined criteria (19,148 lines of code, 500.9% vs. main code). All matches are in *.json files.


*.json19148 LOC (100%) 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 ".*/[.]gitignore".
    • files with paths like ".*/package[.]json".
    • files with paths like ".*/package[-]lock[.]json".
    • files with paths like ".*[.]sh".
  • 3 files match defined criteria (113 lines of code, 3.0% vs. main code). All matches are in *.sh files.


*.sh113 LOC (100%) 3 files
Other Code
Explore:   circles  |  sunburst
  • The following criteria are used to filter files:
    • files with paths like ".*[.]md".
    • files with paths like ".*[.]txt".
    • files with paths like ".*/[.]gitignore".
    • files with paths like ".*/README[.][a-z0-9]+".
    • files with paths like ".*[.]json".
    • files with paths like ".*[.]svg".
    • files with paths like ".*[.](xml|xsd|robot|sql|pgsql|dashboard|profile|ipynb|raml|avsc|al)".
  • 14 files match defined criteria (23,976 lines of code, 627.2% vs. main code):
    • 3 *.json files (19,193 lines of code)
    • 5 *.ipynb files (2,573 lines of code)
    • 3 *.md files (1,731 lines of code)
    • 2 *.svg files (470 lines of code)
    • 1 *.xml files (9 lines of code)
  • " *.json" is biggest, containing 80.05% of code.
  • " *.xml" is smallest, containing 0.04% of code.


*.json19193 LOC (80%) 3 files
*.ipynb2573 LOC (10%) 5 files
*.md1731 LOC (7%) 3 files
*.svg470 LOC (1%) 2 files
*.xml9 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
  • *.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
  • *.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
  • *.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
  • *.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
  • *.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
  • *.webmanifest files are analyzed with JsonAnalyzer:
    • 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 15:55