Skip to content

prj-04-cyclomaticcomplexityanalyzer created by GitHub Classroom

Notifications You must be signed in to change notification settings

cis3296f22/Cyclomatic-Complexity-Analyzer

Repository files navigation

Cyclomatic Complexity Analyzer

Cyclomatic Complexity is a software metric that is used to indicate the complexity of the program.

It is important for a programmer to maintain low Cyclomatic Complexity Number for their projects, since having a higher CCN provides higher chances of the code to crash. This application will help programmers see where they are during the development process.

In this project, we have created a full stack applications targeting programmers.

Users will be able to see the live evaluation of their code and the cyclomatic complexity of each individual functions that make up a file.

Class Diagram

CCA_Class_Diagram (1)

First, the user will encounter the GUI of our program, which prompts them to enter a GitHub URL to a repository that they wish to analyze, then we use the class scraper to “scrape”/clone by using GitHub API the project from GitHub. Then in the main, we read the files in the local repository that we just cloned. Next, we call the lizard API, to help us analyze the code’s cyclomatic complexity number. After that, we will delete the local file and then display the result in GUI. Things that we can expect from the GUI are CCN(cyclomatic complex number) and the number of function calls that a program uses. All statists of the program and its performance in a nice and easy way which calculate in a short amount of time.

Sequence Diagram

Screen Shot 2022-11-30 at 6 08 13 PM

Setup

  • Check out the dependencies that are required to run this application here

How to build

  • Install pipenv using pip install -U pipenv.
  • Run pipenv update in the working directory to synchronize the dependencies in the Pipfile.
  • Run pipenv run pyinstaller -F main.py. This will create an executable binary file at dist/main.exe

How to contribute

Follow this project board to know the latest status of the project

Running Screen

Screen Shot 2022-11-30 at 6 12 05 PM

  • initial screen when launched

Screen Shot 2022-11-30 at 6 12 33 PM

- insert the github repo, and click enter. - Analysis process will start and the result will appear on the screen.

Screen Shot 2022-11-30 at 6 14 13 PM

- by clicking the 'save' button, it allows the users to download the results into a csv file.