microsoft / fabric8-maven-plugin
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
adoc
properties
txt
  • 13 extensions are included in analyses: java, yml, xml, adoc, properties, groovy, yaml, md, json, sh, html, txt, gitignore
  • 7 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 ".*/extern(al)?/.*" (Dependencies) (2 files).
    • exclude files with path like ".*/bin/.*" (Binaries for distribution) (1 file).
    • 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) (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.

main18264 LOC (56%) 194 files
test6900 LOC (21%) 141 files
generated0 LOC (0%) 0 files
build and deployment21 LOC (<1%) 2 files
other6866 LOC (21%) 169 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 ".*".
  • 194 files match defined criteria (18,264 lines of code, 100.0% vs. main code):
    • 192 *.java files (18,091 lines of code)
    • 1 *.yml files (90 lines of code)
    • 1 *.groovy files (83 lines of code)
  • " *.java" is biggest, containing 99.05% of code.
  • " *.groovy" is smallest, containing 0.45% of code.


*.java18091 LOC (99%) 192 files
*.yml90 LOC (<1%) 1 files
*.groovy83 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 any line of content like ".*/simpletest/.*".
    • files with paths like ".*/src/it/.*".
  • 141 files match defined criteria (6,900 lines of code, 37.8% vs. main code):
    • 71 *.java files (4,937 lines of code)
    • 48 *.yml files (1,772 lines of code)
    • 13 *.groovy files (118 lines of code)
    • 9 *.yaml files (73 lines of code)
  • " *.java" is biggest, containing 71.55% of code.
  • " *.yaml" is smallest, containing 1.06% of code.


*.java4937 LOC (71%) 71 files
*.yml1772 LOC (25%) 48 files
*.groovy118 LOC (1%) 13 files
*.yaml73 LOC (1%) 9 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 ".*/pom[.]xml".
    • files with paths like ".*[.]sh".
    • files with paths like ".*/docker[-]compose[.]yaml".
  • 2 files match defined criteria (21 lines of code, 0.1% vs. main code). All matches are in *.sh files.


*.sh21 LOC (100%) 2 files
Other Code
adoc
properties
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 ".*/README[.][a-z0-9]+".
    • files with paths like ".*[.]properties".
    • files with paths like ".*/asciidoc/.*".
    • files with paths like ".*/[Ss]amples/.*".
    • files with paths like ".*[.]txt".
    • files with paths like ".*[.](xml|xsd|robot|sql|pgsql|dashboard|profile|ipynb|raml|avsc|al)".
  • 169 files match defined criteria (6,866 lines of code, 37.6% vs. main code):
    • 53 *.xml files (3,340 lines of code)
    • 50 *.adoc files (2,533 lines of code)
    • 21 *.properties files (392 lines of code)
    • 21 *.java files (318 lines of code)
    • 12 *.yml files (132 lines of code)
    • 2 *.md files (55 lines of code)
    • 4 *.yaml files (36 lines of code)
    • 3 *.json files (30 lines of code)
    • 3 *.html files (30 lines of code)
  • " *.xml" is biggest, containing 48.65% of code.
  • " *.html" is smallest, containing 0.44% of code.


*.xml3340 LOC (48%) 53 files
*.adoc2533 LOC (36%) 50 files
*.properties392 LOC (5%) 21 files
*.java318 LOC (4%) 21 files
*.yml132 LOC (1%) 12 files
*.md55 LOC (<1%) 2 files
*.yaml36 LOC (<1%) 4 files
*.json30 LOC (<1%) 3 files
*.html30 LOC (<1%) 3 files
Analyzers
Info about analyzers used for source code examinations.
  • *.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)
  • *.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
  • *.groovy files are analyzed with GroovyAnalyzer:
    • 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


2022-01-30 15:05