Regarding the php code smell detector at http://c2.com/cgi/wiki?DetectingCodeSmellsInPhp
When I open it in my web browser, I get an error, but when I open it in my IDE, I don't.
How to correct it?
Detecting a definitive code smell with code will possible the same day the halting problem will be fixed. *takes off joke hat*
What he is just doing is setting some parameters on what he thinks is bad code. And it's wrong (imo)
Having equal or more than 4 parameters is a code smell? He himself has that in the code smell detector!
More than 20 lines for a function is a code smell? The main function in this code smell detector is 49 lines of code!!
Code smell is not a thing you can program, in some cases the best way to do some function is the non standard way (whatever that way is) and in other cases it is not. You just have to trust your instinct and do as Frank Farmer said in the comments above. Just take a good wiff.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With