Skip to content

Github.com public Go source code reader and importer

License

Notifications You must be signed in to change notification settings

eroatta/src-reader

Repository files navigation

src-reader

Another tool for static source code analysis.

src-reader allows you to perform static analysis of source code, focusing primarily on the identifiers names. A measure of source code quality can be calculated from the analysis performed on the identifiers, based on how descriptive they are.

The tool main use cases allows you to:

  • Clone a GitHub repository.
  • Parse each *.go file to generate its Abstract Syntax Tree.
  • Pre-process each AST to create the input needed by the splitting/expansion algorithms.
  • Process each AST, applying a set of pre-defined algorithms for splitting and expansion. Currently, only a subset of identifiers is considered valuable (package functions, variables, struct, interfaces and constants). Local variables are not analyzed.
  • Extract insights from the identifiers that are considered valuable, and determine the project's quality level.
  • Modify an AST with the best applicable identifier names and generate a new file.

The following activity diagram shows the a general overview of the included steps on the process.

Steps

Currently, the only supported language is Golang.

Features

Supported Use cases

Architecture Overview

architecture overview

  • Yellow components represent project/analysis/insights handler components. They retrieve the source code, store it, analyze it, and extract insights from it.
  • Orange components are used for visualization. This visualizations include golden signals, projects, analysis, identifiers, insights and comparisons.
  • Green components are used for synchronization, so generated data from the yellow components can be visualized on the orange components.

Packages Overview class diagram

packages overview class diagram

Class Diagram: usecase

usecase class diagram

License

See the LICENSE file for license rights and limitations (MIT).

About

Github.com public Go source code reader and importer

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Languages