Open snd opened 3 years ago
I also see this. Would like to know the reason behind it.
Yeah I've also noticed this - I will add a few labels maybe this can be changed easily (albeit it might affect already working tooling around Slither).
In the same topic, slither returns the number of results, instead of the traditional status code: https://github.com/crytic/slither/blob/630a74f96b23a397e5a4ccaaf2e5d0d533309ed2/slither/__main__.py#L833
This and stderr are for legacy reasons - but we can change it now
I encountered the same problem. I used the cmd command to run slither in Go, and then used the commonly used if err!=nil to judge the return result. The result kept returning an error, which confuses me.
How would you all feel about sending compiler warnings to stderr and the rest of the output to stdout so that
slither . > output.txt
would log solc warnings to the console & all of the slither-specific output would end up in output.txt?
On the other hand, solc warnings are an expected part of the output so maybe sending everything except internal warnings/errors to stdout would be best.
Any thoughts on this @0xalpharush ?
It's possible I'm missing something obvious or it's some weirdness on my system.
With a fresh install of slither the output of detectors and printers is output to stderr instead of stdout. This goes a bit against unix cli tool expectations and makes piping, grepping, etc more awkward than it has to be.