microsoft / ApplicationInspector

A source code analyzer built for surfacing features of interest and other characteristics to answer the question 'What's in the code?' quickly using static analysis with a json based rules engine. Ideal for scanning components before use or detecting feature level changes.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Refactor MetaDataHelper

gfs opened this issue · comments

The metadata helper is too complex and inflexible. Significant changes should be made to simplify - like holistically collecting everyhing for "metadata" rather than having magic value fields in the metadata helper - magic values can be chosen for the specific report instead. this would also enable doing the TagsOnly mode with DependsOn per #535

Potential ideas:

  1. Collect all matches during the run, at the end of the run do depends on processing, then overrides processing, then send the matches to metadata helper to generate the tags. One complication here is the MaxNumMatches mode which requires counting the tags as matches are made. And TagsOnly mode which does not collect matches currently.
  2. Rethink how/when Exerpts and samples are taken. Currently they are gathered as part of the match, but if matches are discarded before return to the user the extra time to allocate the data for the strings is a waste. A complication here is a sample needs to be taken from the file Stream which may not relate directly to a file on disk (i.e. may have been a file found inside an archive via recursive extractor)