talira

RuboCop RSpec

RuboCop extension with cops for RSpec test files

open sourceMITfree

RuboCop RSpec adds RSpec-specific analysis to RuboCop, the Ruby linter: a set of cops that check spec files for style and correctness. You install the rubocop-rspec gem and load it as a plugin in your .rubocop.yml, and RuboCop then reports its offences alongside its own.

Problems it solves

  • enforce a consistent style across our RSpec test files
  • lint RSpec specs for common mistakes in CI
  • catch badly written RSpec examples before code review

Features

  • RSpec-specific cops for spec files
  • loads as a RuboCop plugin from .rubocop.yml

Alternatives

The same job

These do what RuboCop RSpec does.

  1. Clippy The official Rust linter: 800+ lints for common mistakes and unidiomatic code
  2. RuboCop A Ruby static code analyzer and formatter, based on the community Ruby style guide.
  3. Stylelint A CSS linter that catches errors and enforces conventions in your stylesheets
  4. Flake8 A Python linter that checks style and common errors by combining pycodestyle, pyflakes and McCabe
  5. eslint-plugin-jest ESLint rules for Jest tests
  6. lintr Static code analysis and style checking for R

Compare RuboCop RSpec with the top 3