glato / emerge

Emerge is a browser-based interactive codebase and dependency visualization tool for many different programming languages. It supports some basic code quality and graph metrics and provides a simple and intuitive way to explore and analyze a codebase by using graph structures.
MIT License
783 stars 46 forks source link

Scan only one file #20

Closed israteneda closed 2 years ago

israteneda commented 2 years ago

Is your feature request related to a problem? Please describe. First, thanks to this fantastic initiative, I was looking for a tool like this one. I'd like to scan only one file instead of a directory.

Describe the solution you'd like It could be great to have an option to scan only a file instead of a whole directory

Optional: Describe alternatives you've considered I'm attempting to scan all the module, but it's big.

Optional: Additional context I'd like to see the depencies of a file in python, but I got this error:

NotADirectoryError(f'error in analysis {analysis.analysis_name}: source directory not found/ accessible:
glato commented 2 years ago

@israteneda Thanks for the feedback, I've included a new config option only_permit_files_matching_absolute_path in the current release 1.2.2 that should solve your problem (https://github.com/glato/emerge/releases/tag/1.2.2). You can now simply specify one or more source code absolute paths in only_permit_files_matching_absolute_path, which are only permitted within the source code scan.

israteneda commented 2 years ago

Hey @glato thanks for your effort put in this solution, I appreciate it 🙌