List / delete unused methods from a cohesion analysis.
Process a dgml file generated from a cohesion analysis. Expected usage: DeepEnds ReportRedundant <options> filenames <options> available: --deleteUnused Default(). Delete the lines giving the warning if the file containing those lines is in this path --ignoreAbstract Default(true). Whether or not to ignore abstract classes --ignoreExtensions Default(true). Whether or not to ignore extension methods --ignoreOverrides Default(true). Don't warn on a method that is an override as probably a false positive --suppressWarnings Default(). Comma separated list of those warnings to suppress Examples: DeepEnds ReportRedundant --deleteUnused=C:\Source\CSharp C:\Processed\NestedClass2.dgml - read a cohesion graph and delete unused code DeepEnds ReportRedundant --suppressWarnings=RED8001,RED8002 C:\Processed\NestedClass2.dgml - read a cohesion graph and warn about redundant code
Having created a DGML file using a tool for reading the source code with
cohesion this tool then post-processes it.
The resulting warnings can be viewed in Visual Studio by redirecting the tool output to a text file and then replaying within the IDE.
Note that when deleting redundant code there may be false positives and thus there is no guarantee that your code will still compile. It is assumed that any directory that is supplied as the argument is kept under some form of revision control to allow the reverting of unintended changes.