rust-code-analysis icon indicating copy to clipboard operation
rust-code-analysis copied to clipboard

Getting all of the functions and classes of the inspected code

Open marco-silva0000 opened this issue 5 years ago • 1 comments

I would like to add a feature to print out all of the available classes and methods in a codebase, but I'm just now learning rust. Do you thing this would be easy to do and a useful thing to merge in?

marco-silva0000 avatar May 16 '20 20:05 marco-silva0000

If you run rca with -p foo.py --metrics then you'll get metrics for classes, functions, nested functions and so on. So what you're asking for is almost the hierarchy without the metrics. The code for that stuff is here: https://github.com/mozilla/rust-code-analysis/blob/master/src/spaces.rs Maybe it could be interesting to have a hierarchy explorer with some callbacks to call on each node and these callback could be metrics computer. Anyway I'm not sure that's something for a beginner but definitly it's something interesting. But I'll happy to review a PR ;)

calixteman avatar May 18 '20 08:05 calixteman