An open API service indexing awesome lists of open source software.

https://github.com/schanur/cycle-breaker

Find cyclic references in code modules
https://github.com/schanur/cycle-breaker

c command-line-tool cpp cyclic-references graph linter python python3 shell shell-script stacktrace static-analyzer

Last synced: 7 months ago
JSON representation

Find cyclic references in code modules

Awesome Lists containing this project

README

          

# Cycle-Breaker

Some programming languages make it difficult to find cyclic references between different source files. Cycle-Breaker finds them.

## Supported programming languages

* C
* C++
* Shell scripts

Support for Python and Ruby is planned for the next version. Need another language supported? Tell me!

## Features

* Switch between JSON and human readable formating
* Found cyclic references are printed in a format similar to that of a stack trace
* Heuristic programming language detection if source file has no file suffix

## Limitations

* Only the first cycle gets found, even if more than one cycle exists

## How does it work

Cyclic referencing in a directed graph is easy to detect using a depth search algorithm. When entering a new file recursively, you check if the file has been visited before. If yes, a cycle is found.