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
- Host: GitHub
- URL: https://github.com/schanur/cycle-breaker
- Owner: schanur
- License: gpl-3.0
- Created: 2017-08-28T13:52:03.000Z (about 8 years ago)
- Default Branch: master
- Last Pushed: 2019-03-21T16:19:59.000Z (over 6 years ago)
- Last Synced: 2025-01-30T01:22:22.594Z (9 months ago)
- Topics: c, command-line-tool, cpp, cyclic-references, graph, linter, python, python3, shell, shell-script, stacktrace, static-analyzer
- Language: Python
- Homepage:
- Size: 30.3 KB
- Stars: 0
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE.md
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 scriptsSupport 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.