I'm working with C# and I was hoping to find some tools akin to those I'm used to in Ruby and Ruby on Rails for detecting code smells. I'm referring to things like Roodi, Flay, Flog, Reek, Rcov, and Saikuro. It would be nice if the tool(s) integrated with Visual Studio 2008.
I have ReSharper and it's nice for alerting me when I'm not following my own naming conventions, if I could use an object initializer, etc., but it doesn't tell me things like:
- this code looks a lot like that code
- [Duplication] ApplicationController#authenticate_admin calls session[user] more than once
- [Nested Iterators] ApplicationController#remove_from_all_games has nested iterators
- [Feature Envy] GameController#valid_set? refers to cards more than self
- cyclomatic complexity
A tool akin to Railroad ("RailRoad is a class diagrams generator for Ruby on Rails applications") would also be nice.
I tried search StackOverflow for a question addressing this, but didn't have any luck. Sorry if this is a duplicate. Maybe the functionality I'm looking for is actually built into VS 2008 or ReSharper, and I'm just missing it.
Edit: I'm not sure whether ReSharper or Clone Detective added it, or perhaps it's VS 2008, but I was able to right-click on my Solution in Solution Explorer and choose Calculate Code Metrics. The metrics show up in a Code Metrics Results window and include columns Maintainability Index, Cyclomatic Complexity, Depth of Inheritance, Class Coupling, and Lines of Code. This is certainly a start to getting all the data I want!