RuboCop logo

RuboCop

A Ruby static code analyzer, based on the community Ruby style guide
185
121
+ 1
38

What is RuboCop?

RuboCop is a Ruby static code analyzer. Out of the box it will enforce many of the guidelines outlined in the community Ruby Style Guide.
RuboCop is a tool in the Code Review category of a tech stack.
RuboCop is an open source tool with 10.4K GitHub stars and 2.2K GitHub forks. Here’s a link to RuboCop's open source repository on GitHub

Who uses RuboCop?

Companies
60 companies reportedly use RuboCop in their tech stacks, including StackShare, Talkable, and WeLend.hk.

Developers
113 developers on StackShare have stated that they use RuboCop.

RuboCop Integrations

Why developers like RuboCop?

Here’s a list of reasons why companies and developers use RuboCop
RuboCop Reviews

Here are some stack decisions, common use cases and reviews by companies and developers who chose RuboCop in their tech stack.

Francisco Quintero
Francisco Quintero
Tech Lead at Dev As Pros · | 7 upvotes · 70K views
atDev As ProsDev As Pros
Node.js
Node.js
Rails
Rails
Amazon EC2
Amazon EC2
Heroku
Heroku
RuboCop
RuboCop
JavaScript
JavaScript
ESLint
ESLint
Slack
Slack
Twist
Twist

For many(if not all) small and medium size business time and cost matter a lot.

That's why languages, frameworks, tools, and services that are easy to use and provide 0 to productive in less time, it's best.

Maybe Node.js frameworks might provide better features compared to Rails but in terms of MVPs, for us Rails is the leading alternative.

Amazon EC2 might be cheaper and more customizable than Heroku but in the initial terms of a project, you need to complete configurationos and deploy early.

Advanced configurations can be done down the road, when the project is running and making money, not before.

But moving fast isn't the only thing we care about. We also take the job to leave a good codebase from the beginning and because of that we try to follow, as much as we can, style guides in Ruby with RuboCop and in JavaScript with ESLint and StandardJS.

Finally, comunication and keeping a good history of conversations, decisions, and discussions is important so we use a mix of Slack and Twist

See more
Jerome Dalbert
Jerome Dalbert
Senior Backend Engineer at StackShare · | 5 upvotes · 65.5K views
atStackShareStackShare
GitHub
GitHub
CircleCI
CircleCI
Code Climate
Code Climate
Brakeman
Brakeman
RuboCop
RuboCop
RSpec
RSpec
Rails
Rails
Git
Git
#ContinuousIntegration

The continuous integration process for our Rails backend app starts by opening a GitHub pull request. This triggers a CircleCI build and some Code Climate checks.

The CircleCI build is a workflow that runs the following jobs:

  • check for security vulnerabilities with Brakeman
  • check code quality with RuboCop
  • run RSpec tests in parallel with the knapsack gem, and output test coverage reports with the simplecov gem
  • upload test coverage to Code Climate

Code Climate checks the following:

  • code quality metrics like code complexity
  • test coverage minimum thresholds

The CircleCI jobs and Code Climate checks above have corresponding GitHub status checks.

Once all the mandatory GitHub checks pass and the code+functionality have been reviewed, developers can merge their pull request into our Git master branch. Code is then ready to deploy!

#ContinuousIntegration

See more

RuboCop Alternatives & Comparisons

What are some alternatives to RuboCop?
Reek
Reek is a tool that examines Ruby classes, modules, and methods and reports any Code Smells it finds.
ESLint
A pluggable and configurable linter tool for identifying and reporting on patterns in JavaScript. Maintain your code quality with ease.
SonarQube
SonarQube provides an overview of the overall health of your source code and even more importantly, it highlights issues found on new code. With a Quality Gate set on your project, you will simply fix the Leak and start mechanically improving.
Code Climate
After each Git push, Code Climate analyzes your code for complexity, duplication, and common smells to determine changes in quality and surface technical debt hotspots.
Prettier
Prettier is an opinionated code formatter. It enforces a consistent style by parsing your code and re-printing it with its own rules that take the maximum line length into account, wrapping code when necessary.
See all alternatives

RuboCop's Followers
121 developers follow RuboCop to keep up with related blogs and decisions.
Matthew Litwin
esteoliver
Murray Catto
Chris Hall
Emre Can Yılmaz
Yury Buldakov
John Alton
Mohamma76685757
Marc Dagatan
Ntale Shadik