CodesAway/DYCE

Ideas for tracking upstream references

Opened this issue · 1 comments

Will be used to detect unused code (no upstream references) and upstream call hierarchy

  • When index code, add an upstream reference to any invoked methods (regardless if inside or outside of method)
  • When delete code documents, such as when reindexing file, also delete any upstream references to the deleted documents / code (will need to have something can search on, like method signature
  • Then, when readd, can create document mentioning the upstream

Basically, at the same time I create a downstream reference, I'd also create an upstream reference to the current method / field / class

This way, can incrementally build upstream references.

How to easily identify methods / fields / classes with no upstream references (unused code)?

  • Goal is that if I'm in a method, I want it to tell me the code isn't used
  • That way, I'm not modifying unused code

The idea is that downstream and upstream references both would be indexed based on the upstream document. This way, they'll be reindexed just like currently done when the upstream file changes.

  • First, existing stuff will be deleted
  • Then, file will be reindexed, including upstream and downstream references