Ever since its inception in 1995, Ruby has been a programming language that is "a simple Lisp language at its core, with an object system like that of Smalltalk, blocks inspired by higher-order functions, and practical utility like that of Perl".
Add to it the fact that you get to use Rails, and you have one of the most loved and widely used programming languages in the world. What's not to love!
Today, we are excited to launch continuous static analysis for Ruby, detecting 170+ issues, like bug risks, anti-patterns, security vulnerabilities, and style issues.
To start analyzing your Ruby code, just enable the
ruby analyzer in your
.deepsource.toml file, and you are good to go.
version = 1 test_patterns = [ "test/**", "*_test.rb" ] exclude_patterns = [ "vendor/**", "**/examples/**" ] [[analyzers]] name = "ruby" enabled = true
At the time of writing this, the analyzer detects 170+ issues in your Ruby code, across categories like bug risks, anti-patterns, security vulnerabilities, and style issues. Here's some of them to give you an idea:
- Iterable is called with
with_index, but its value is never used
- Unreachable code detected
- Use of
- Use of
- A block can be used that cleans up resources automatically on closing
- Use of class variables detected