# Introducing RuboCop Spellcheck

DevFeed: [Introducing RuboCop Spellcheck](<https://devfeed.tech/articles/introducing-rubocop-spellcheck-93012.md>)

Original publisher: [Read original article](<https://code.dblock.org/2026/10/21/introducing-rubocop-spellcheck.html>)

Author: Daniel Doubrovkine (dblock@dblock.org)

Published: 2026-10-21T00:00:00Z

Content type: tutorial

Language: en

Sources: [Daniel Doubrovkine](<https://devfeed.tech/sources/daniel-doubrovkine.md>)

Topics: [Tool](<https://devfeed.tech/topics/tool.md>), [Python](<https://devfeed.tech/topics/python.md>), [code comments](<https://devfeed.tech/topics/code-comments.md>), [Markdown](<https://devfeed.tech/topics/markdown.md>)

Tags: [ai](<https://devfeed.tech/tags/ai.md>), [backend](<https://devfeed.tech/tags/backend.md>), [blog](<https://devfeed.tech/tags/blog.md>), [comment](<https://devfeed.tech/tags/comment.md>), [development](<https://devfeed.tech/tags/development.md>), [easy](<https://devfeed.tech/tags/easy.md>), [english](<https://devfeed.tech/tags/english.md>), [environment](<https://devfeed.tech/tags/environment.md>), [example](<https://devfeed.tech/tags/example.md>), [examples](<https://devfeed.tech/tags/examples.md>), [false-positives](<https://devfeed.tech/tags/false-positives.md>), [first](<https://devfeed.tech/tags/first.md>), [generate](<https://devfeed.tech/tags/generate.md>), [getting-started](<https://devfeed.tech/tags/getting-started.md>), [implementation](<https://devfeed.tech/tags/implementation.md>), [install](<https://devfeed.tech/tags/install.md>), [linting](<https://devfeed.tech/tags/linting.md>), [markdown](<https://devfeed.tech/tags/markdown.md>), [meaning](<https://devfeed.tech/tags/meaning.md>), [minutes](<https://devfeed.tech/tags/minutes.md>), [open-source](<https://devfeed.tech/tags/open-source.md>), [ruby](<https://devfeed.tech/tags/ruby.md>), [testing](<https://devfeed.tech/tags/testing.md>)

## AI overview

rubocop-spellcheck brings spelling checks into RuboCop for Ruby comments, strings, identifiers, Markdown, RDoc, AsciiDoc, and plain text. Version 0.2.0 uses Kotoshu's pure Ruby backend and includes an American English dictionary, with no separate spelling package required. Add the gem to the development group, enable the plugin, and run the Spellcheck/Spelling cop. Its optional `-A` autocorrection can fix cases such as the adjacent transposition `jumsp` to `jumps`; it leaves all-caps, mixed-case, and dotted technical tokens alone. Because unsafe corrections can alter meaning or names, review the diff. Remaining false positives can be stored in `.spellcheck.txt`, but generated entries also suppress real typos, so review that list. The author reports an average of 3.69 seconds to check 618 tracked Markdown files over three runs with caching disabled.

## Source excerpt

I replaced this blog's Python spell checker that took more than three minutes to run with the new rubocop-spellcheck. I really love RuboCop for its standard approach to linting and auto-correction, which solves the difficult problem of deciding between tabs and spaces (use defaults). My typical implementation in Ruby projects is to add a standard .rubocop.yml, run rubocop -a, ask an AI to fix easy fixable violations, then run rubocop --auto-gen-config to mark all remaining ones as an exception. Why should spelling be any different? Introducing rubocop-spellcheck, a RuboCop plugin for checking spelling in Ruby comments, strings, identifiers, Markdown, RDoc, AsciiDoc, and plain text. It uses Kotoshu with its pure Ruby backend and ships an American English dictionary. No separate dictionary download, environment, or system spelling package is required. Getting Started The examples below use released 0.2.0. Add this to your Gemfile: group :development do gem 'rubocop-spellcheck', '~> 0.2.0', require: false end Enable the plugin in .rubocop.yml: plugins: - rubocop-spellcheck Run it: bundle install bundle exec rubocop --only Spellcheck/Spelling Given this Ruby comment: # The red brown fox jumsp over the lazy dog. RuboCop reports: example.rb:1:21: C: [Correctable] Spellcheck/Spelling: Misspelled word: jumsp. Did you mean jumps, jump, jumpy? # The red brown fox jumsp over the lazy dog. ^^^^^ Try auto-correct when the first suggestion is one edit away: bundle exec rubocop -A --only Spellcheck/Spelling This changes jumsp to jumps, an adjacent transposition, even though there are three suggestions. Corrections accept lowercase and title-case words, but leave ALL CAPS, mixed-case words, and dotted technical tokens alone. -A opts into unsafe changes: even a correctly spelled replacement can change the meaning of a comment or document, including people's names. Review the diff. Examine spelling mistakes and fix them. Then generate a .spellcheck.txt for remaining false positives s