Hi, I'm the living repository provided as companion material to the talk “Tools, tools everywhere”, so far delivered at:
- Ruby User Group Berlin @ LIQID Investments (March 1st, 2018)
- Ruby User Group Madrid @ Cabify (January 4th, 2018)
- Ruby User Group Hamburg @ mindmatters (December 12th, 2017)
“There are a myriad of open-source tools which can help us in our day-a-day coding activities. Most of them, however, are unknown or rarely used by most developers.
During this session we walk through some (Ruby) tools, covering interesting configuration options and discussing ideas on how to incorporate them into our development workflow.”
- eXtreme Programming explained: embrace change, by Kent Beck.
- The Pragmatic Programmer: From Journeyman to Master, by Andrew Hunt and David Thomas.
- 99 bottles of OOP, by Katrina Owen & Sandi Metz.
- Apprenticeship Patterns: Guidance for the Aspiring Software Craftsman, 2009 by Dave Hoover and Adewale Oshineye.
- (Web) eXtreme Programming
- (Talk) Rules, by Sandi Metz @ Baruco 2013
- (Talk) Perusing the Rails Source Code - A Beginners Guide, by Alex Kitchens @ RailsConf 2017.
- (Article) Ruby is defined by terrible tools, by Avdi Grimm.
- (Article) Deciphering Ruby Code Metrics
- (GH repo) Curated list of tools for various programming languages
“A Ruby static code analyzer, based on the community Ruby style guide.”
To check out:
- Common (team/company wide) master configuration file.
- Tweaks proposed with pull requests.
- Automatically fixing offenses:
--auto-correct
.- Warning! ;)
- Integrating in legacy codebases:
--auto-gen-config
. - Selectively running cops:
--only
,--only-guide-cops
. - Excluding concrete cops: per line / per file.
- Rails-specific support.
- Integrable with development workflows (local, CI...).
To learn more:
- https://github.com/bbatsov/rubocop
- Annotated default config. file: https://github.com/bbatsov/rubocop/blob/master/config/default.yml
Ruby & Rails style guides:
Related with metrics after using --auto-gen-config
:
- rubocop/rubocop#5422 (comment) (Jan 9, 2018)
- rubocop/rubocop#5371 (Dec 31, 2017)
“Flog reports the most tortured code in an easy to read pain report. The higher the score, the more pain the code is in.”
To check out:
--group
: “group and sort by class.”--all
: “display all flog results, not top 60%.”--extended
: “put file:line on a separate line (for rubymine & friends).”
To learn more:
“Code smell detector for Ruby”
To check out:
--sort-by smelliness
: “sort by smelliness (number of detected code smells), listing the ‘smelliest’ files first.”--todo
: “generate a todo list.”--single-line
: “show IDE-compatible single-line-per-warning.”- Rails-specific configuration: https://github.com/troessner/reek#working-with-rails
To learn more:
- https://github.com/troessner/reek (README includes links to blog posts and talk)
- Code smells reported by Reek
- “Reek Driven Development”
“A static analysis security vulnerability scanner for Ruby on Rails applications”.
To check out:
--checks
: “list all available vulnerability checks.”--run-all-checks
: “run all default and optional checks.”--ignore-config IGNOREFILE
: “use configuration to ignore warnings.”--interactive-ignore
: “interactively ignore warnings.”--rails3
,--rails4
,--rails5
: “force Rails X mode.”
To learn more:
To “have fun injecting SQL into a Ruby on Rails application” (also from @presidentbeef):
“Patch-level verification for Bundler. Looks for security vulnerabilities in dependencies.”.
To check out:
bundler-audit update
: “updates the ruby-advisory-db.”
To learn more:
“Flay analyzes code for structural similarities. Differences in literal values, variable, class, method names, whitespace, programming style, braces vs do/end, etc are all ignored. Making this totally rad.”
To check out:
--summary
: “summarize. Show flay score per file only.”- Code Climate's duplication engine wraps flay, and supports JavaScript as well.
To learn more:
About Code Climate's duplication engine & concept:
- https://github.com/codeclimate/codeclimate-duplication
- https://docs.codeclimate.com/docs/duplication-concept
“Static analysis tool for checking Ruby code for Sandi Metz' rules.”
To check out:
--rules
: “show rules.”--graph
: “HTML mode. Create folder, log data and output stats to HTML file.”--thresholds
: “thresholds for each rule (default: 90,90,90,90) or in config.yml.”
To learn more:
To learn more:
To learn more:
- https://codeclimate.com/product
- https://docs.codeclimate.com/v1.0/docs/getting-started-team-adoption
To learn more: