Fighting false detections with LINT tools in abyssinian mode

LINT tools such as RuboCop helps you detect potential problems hiding in your code, but false detections are always an issue. For example, it doesn’t feel right when your LINT tool says that a program like the following has a problem.

This is a warning from RuboCop which recommends you use the Pathname#join method rather than manipulating strings like using expression substitution when constructing a path from Rails.root, which returns the directory your Rails application is placed in. In other words, it’s a warning that tells it’s better to use

path = Rails.root.join('tmp', 'icons', "#{user.id}.png")

rather than

path = "#{Rails.root}/tmp/icons/#{user.id}.png"

It’s not a bad suggestion, but it’s a meaningless warning when talking about the specific program shown in the screenshot. In this situation, expression substitution is used in making the log message, and the path itself is constructed using Pathname#join.

In cases like this, the Abyssinian mode comes in handy.

Click the “close” button in the bottom right corner, and act like the warning from RuboCop never happened. Just like that.

Information about the ignored warnings can be checked on SideCI. When reviewing, be sure to check SideCI, and if there are ignored warnings that shouldn’t be, click “reopen” to restore the warning, and ask the developer to fix it.

When all problems found on SideCI are either revised or ignored, the Commit Status will turn green.

The number of ignored warnings are shown in the message. If there are too many warnings ignored… looks like you need your reviews done more carefully :angry:.

SideCI’s Abyssinian mode allows developers to deal with the problems detected by LINT tools more flexibly. If the warning is meaningful, fix it. If you are sure it doesn’t help, it’s a false detection or doesn’t make any sense, just ignore and leave it as it is. In the case you’re not so sure about it, start a discussion with other developers and reviewers in the comments on GitHub. We have been using it for several months (from under development), and it makes our development process so smooth that we can’t get ourselves to go back to classic mode. We really recommend giving it a try.

  • The Abyssinian mode can be enabled from the Repository Settings screen. If there are any inconveniences, you can change it back to classic mode anytime. (We would really appreciate if you could send us feedback!!)
  • Some of SideCI’s functions and analytic tools cannot be used in the current Abyssinian mode. We’re working on it, so please give us a little more time.

For more information about Sider, please go to our website.

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.