<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Sourya Vatsyayan</title>
    <description>The latest articles on DEV Community by Sourya Vatsyayan (@sourya).</description>
    <link>https://dev.to/sourya</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F197198%2F54154b4b-210d-4dbb-a3f2-5ea19a33f68c.jpeg</url>
      <title>DEV Community: Sourya Vatsyayan</title>
      <link>https://dev.to/sourya</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/sourya"/>
    <language>en</language>
    <item>
      <title>Release: DeepSource Ruby analyzer lands in beta</title>
      <dc:creator>Sourya Vatsyayan</dc:creator>
      <pubDate>Tue, 18 Feb 2020 07:42:31 +0000</pubDate>
      <link>https://dev.to/deepsource/release-deepsource-ruby-analyzer-lands-in-beta-h53</link>
      <guid>https://dev.to/deepsource/release-deepsource-ruby-analyzer-lands-in-beta-h53</guid>
      <description>&lt;p&gt;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".&lt;/p&gt;

&lt;p&gt;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!&lt;/p&gt;

&lt;p&gt;Today, we are excited to launch continuous static analysis for Ruby, detecting 170+ issues, like bug risks, anti-patterns, security vulnerabilities, and style issues.&lt;/p&gt;

&lt;h2&gt;
  
  
  Using the Ruby analyzer
&lt;/h2&gt;

&lt;p&gt;To start analyzing your Ruby code, just enable the &lt;code&gt;ruby&lt;/code&gt; analyzer in your &lt;code&gt;.deepsource.toml&lt;/code&gt; file, and you are good to go.&lt;/p&gt;

&lt;h3&gt;
  
  
  Sample configuration
&lt;/h3&gt;



&lt;div class="highlight"&gt;&lt;pre class="highlight toml"&gt;&lt;code&gt;&lt;span class="py"&gt;version&lt;/span&gt; &lt;span class="p"&gt;=&lt;/span&gt; &lt;span class="mi"&gt;1&lt;/span&gt;

&lt;span class="py"&gt;test_patterns&lt;/span&gt; &lt;span class="p"&gt;=&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;
  &lt;span class="s"&gt;"test/**"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="s"&gt;"*_test.rb"&lt;/span&gt;
&lt;span class="p"&gt;]&lt;/span&gt;

&lt;span class="py"&gt;exclude_patterns&lt;/span&gt; &lt;span class="p"&gt;=&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;
  &lt;span class="s"&gt;"vendor/**"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="s"&gt;"**/examples/**"&lt;/span&gt;
&lt;span class="p"&gt;]&lt;/span&gt;

&lt;span class="nn"&gt;[[analyzers]]&lt;/span&gt;
&lt;span class="py"&gt;name&lt;/span&gt; &lt;span class="p"&gt;=&lt;/span&gt; &lt;span class="s"&gt;"ruby"&lt;/span&gt;
&lt;span class="py"&gt;enabled&lt;/span&gt; &lt;span class="p"&gt;=&lt;/span&gt; &lt;span class="kc"&gt;true&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;



&lt;h2&gt;
  
  
  Issues detected by the Ruby analyzer
&lt;/h2&gt;

&lt;p&gt;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:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Bug risks:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Iterable is called with &lt;code&gt;with_index&lt;/code&gt;, but its value is never used&lt;/li&gt;
&lt;li&gt;Unreachable code detected&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Security issues:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Use of &lt;code&gt;Kernel#open&lt;/code&gt; detected &lt;/li&gt;
&lt;li&gt;Use of &lt;code&gt;Kernel#eval&lt;/code&gt;/&lt;code&gt;Binding#eval&lt;/code&gt; detected&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Antipatterns:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;A block can be used that cleans up resources automatically on closing&lt;/li&gt;
&lt;li&gt;Use of class variables detected&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;We're very excited about this release, and hope that this will help you avoid many issues in your code, and make writing Ruby even more fun! Head over to &lt;a href="https://deepsource.io/docs/analyzers/ruby.html"&gt;the docs&lt;/a&gt; or &lt;a href="https://twitter.com/DeepSourceHQ"&gt;tell us&lt;/a&gt; what you think!&lt;/p&gt;

</description>
    </item>
  </channel>
</rss>
