slither
slither copied to clipboard
Inheritance printer adds unnecessary carriage return
% cat test.sol
pragma solidity >= 0.8.19;
interface IFoo{}
contract Foo is IFoo {}
abstract contract Bar is Foo {}
interface IBaz{}
contract Baz is Bar, IBaz{}
% slither test.sol --print inheritance
+ Baz
-> Bar, IBaz
, [Foo, IFoo]
It looks like we added unnecessary carriage return to the output at some point
I'd like to contribute, can you please give me more information?
Hi @mehrdadmms, awesome.
I think it's mostly about reviewing https://github.com/crytic/slither/blob/master/slither/printers/inheritance/inheritance.py, and removing some of the misplaced "\n"
Hi @montyly
What should the correct output look like for slither test.sol --print inheritance
Should it look like this?
INFO:Printers:Inheritance
Child_Contract -> Immediate_Base_Contracts [Not_Immediate_Base_Contracts]
+ IFoo
+ Foo -> IFoo
+ Bar -> Foo, [IFoo]
+ IBaz
+ Baz -> Bar, IBaz, [Foo, IFoo]
Base_Contract -> Immediate_Child_Contracts [Not_Immediate_Child_Contracts]
+ IFoo -> Foo, [Bar, Baz]
+ Foo -> Bar, [Baz]
+ Bar -> Baz
+ IBaz -> Baz
+ Baz