crytic/slither

Rename IR classes so names do not clash with others.

開放

#1,059 建立於 2022年2月15日

 (1 則留言) (0 個反應) (0 位負責人)Python (886 個分叉)batch import
enhancementgood first issuehelp wanted

倉庫指標

星標
 (4,769 顆星)
PR 合併指標
 (平均合併 54天 9小時) (30 天內合併 2 個 PR)

描述

I noticed that the TypeConversion class from Slither IR

https://github.com/crytic/slither/blob/5021f3e7a04e46dd32655f8d168b43a8bb000770/slither/slithir/operations/type_conversion.py#L7

has the same name as another class from Slither Core

https://github.com/crytic/slither/blob/5021f3e7a04e46dd32655f8d168b43a8bb000770/slither/core/expressions/type_conversion.py#L6

This makes it so that, if you are not extra careful, you can import the wrong class.

I think that it would be a good idea to go through all the classes and look for those that have name clashes across different "packages" and rename them, for example by adding an IR suffix to them (TypeConversionIR).

NOTE:

This might apply to different packages i.e not only SlitherIR, in which case a different suffix would need to be added.

貢獻者指南