#28 Check for unnecessary (boolean) parameters

Difficult
open
2
2013-02-07
2009-11-07
No

After cleaning our source code which was developed by four different companies in the last few years, I found methods containing a boolean parameter which were always true or false. Sometimes only old unit tests used the other value.

Checking for unnecessary parameters which will always use the same parameter would be great.

Discussion

  • Joerg Spieler

    Joerg Spieler - 2009-11-13

    Hi Lars,
    this is a interesting feature. But similar as "feature request 2689156 Check for unnecessary return values" y think it is not so important and I think there are many false positives.
    I added a low priority.
    Joerg

     
  • Comment has been marked as spam. 
    Undo

    You can see all pending comments posted by this user  here

    Anonymous - 2013-02-07

    Hi Lars,

    this problem is better addressed using code coverage analysis at runtime. Certainly you have to instrument a life system and not evaluate the coverage of your test suite.

    Regards, Georg

     


Anonymous

Cancel  Add attachments





Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:





No, thanks