naddison36 / sol2uml

Solidity contract visualisation tool
MIT License
1.12k stars 257 forks source link

diff: allow ignoring file patterns #164

Closed aspiers closed 10 months ago

aspiers commented 11 months ago

Another feature request, this time for sol2uml diff!

It would be great if we could do something like sol2uml diff --exclude='@openzeppelin/*' to exclude files from the diff matching a particular path pattern.

naddison36 commented 11 months ago

I like it. It'll be on file paths rather than the remapped import names, though

naddison36 commented 11 months ago

There is no exclude option, yet, but there is an implicit include using the aFile option. The aFile and bFile options were introduced to diff files that had been renamed. But you can just specify the aFile and the diff will be done on that file. For example

sol2uml diff 0x1091588Cc431275F99DC5Df311fd8E1Ab81c89F3 0xEA24e9Bac006DE9635Ac7fA4D767fFb64FB5645c --aFile contracts/governance/Governable.sol
aspiers commented 10 months ago

Amazing, thanks!

aspiers commented 9 months ago

@naddison36 Just looked into this and realised that the aFile trick doesn't really address my use case, since I want to generate diffs which span many files, but exclude library files (typically just those matching @openzeppelin/*). Please would it be possible to reopen this to track the idea of adding an exclude option in the future?