Successfully reported this slideshow.
You’ve unlocked unlimited downloads on SlideShare!
Metrics• Reek – Uncommunicative name – One char name – Name ends with number – Camelcase variable – instance_of?, kind_of?, is_a? instead of polymorphism – Duplication – Long class, method, parameter list – Nested iterators www.jetbrains.com 9
Metrics• Flog – Assignment Branch Call metrics• Saikuro – Cyclomatic complexity• Roodi – Assignment in condition – Missing else in case – Long class/module/method – Class/module/method name check – Cyclomatic complexity• Flay – Duplicates www.jetbrains.com 10
Testing and Coverage tools• RSpec• Cucumber• Autotest• RCov, SimpleCov• Continuous integration• Heckle – Change code (if <-> unless, calls, numbers, assignments, etc.) to see if test fail www.jetbrains.com 11
What else can be done?All these tools use Abstract Syntax Tree, but this is not all the information that can be extracted!The main problem is Ruby object model complexityLEXICAL analysis• Lexer -> Parser -> Abstract Syntax Tree -> Control Flow Graph -> Data Flow Analysis www.jetbrains.com 13
RubyMine• On the fly code inspections• Code duplicates• Test tools integration with graphical UI• Coverage tool integration• Everything is tightly integrated in IDE www.jetbrains.com 14
GO AND TRY!jetbrains.com/ruby www.jetbrains.com 15
Thank you!• Visit us http://www.jetbrains.com/ruby• Read about http://blogs.jetbrains.com/ruby/• Post bugs http://youtrack.jetbrains.net/issues/RUBY• Follow us on twitter @rubymine www.jetbrains.com 16
Develop with pleasure!Dennis.Ushakov@jetbrains.com @en_dalOleg.Shpynov@jetbrains.com @oleg_s www.jetbrains.com Copyrights are retained by their respective owners