Repository navigation
style: adopt the shared Elanthia Online RuboCop rules - #274
Merged
MahtraDR merged 1 commit intoOct 26, 2026
Merged
Conversation
Replace .rubocop.yml with an inherit_from of .rubocop/base.yml, a
byte-identical copy of the shared EO config (with the custom
AsciiOnlySource cop), and pin RuboCop to 1.92.1. ProfanityFE no longer
turns off the ASCII cops or Lint/ScriptPermission.
Fix all 217 offenses without changing behavior:
- Comments: plain-ASCII equivalents (-> for arrows, "section" for the
section sign, U+XXXX for example characters).
- Non-ASCII string values: AsciiOnlySource also flags \u and high \x
escapes, so non-ASCII characters are built at runtime with
[0x00E9].pack('U'), as lich-5's specs already do. Every rewritten
literal was checked to have the same bytes and encoding as before.
- SharedState::TITLE_UNSAFE: [\p{Cc}\\] with /u matches exactly the
same code points as the old \x00-\x1f\x7f\u0080-\u009f class.
- script/check_yard_tags.rb is now executable (it has a shebang).
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
|
Important Review skippedAuto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the
|
MahtraDR
added a commit
that referenced
this pull request
Oct 26, 2026
This moves ProfanityFE onto the shared CI baseline the EO admins agreed on, following #274, which adopted the shared RuboCop rules. Lint and tests now come from one shared workflow in elanthia-online/.github, pinned by commit SHA. The YARD checks stay here as a repo-specific job with their steps unchanged. A new ci-gate job sums up every job and will be the single required check once branch protection is switched on. It replaces rspec_tests, rubocop_syntax_checker, ruby_syntax_checker and yard_docs. The YARD job now runs on every PR instead of only when Ruby files change, so the required check always reports. .ruby-version is bumped to 4.0.9 and is the only place the CI Ruby version is set. Checked locally: RuboCop reports no offenses across 246 files, the suite passes on two seeds (4282 examples, 0 failures), and all four YARD checks pass. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-authored-by: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
This was referenced Oct 27, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This moves ProfanityFE onto the RuboCop configuration the EO admins agreed to share across lich-5, scripts, dr-scripts and ProfanityFE.
What changes
.rubocop/base.ymland.rubocop/cops/ascii_only_source.rbare byte-identical copies of the shared config and its custom cop..rubocop.ymlonly inherits from the base. It may list excluded files, but it lists none.Gemfile.lockwas updated only for rubocop and its dependencies.Lint/ScriptPermission. That brought 217 offenses, and this PR fixes all of them, with no excludes and norubocop:disablecomments.How the offenses were fixed
->, the section sign becomes "section", and an example character is written asU+00E9.\uescapes and\xescapes above 0x7F, so"café"isn't allowed either. These characters are now built at runtime, as in"caf#{[0x00E9].pack('U')}", which is how lich-5's specs already do it. Every rewritten literal was checked to have the same bytes and encoding as before, so the tests still exercise exactly the same input.SharedState::TITLE_UNSAFE: now/[\p{Cc}\\]/u. It matches exactly the same code points as the old[\x00-\x1f\x7f\u0080-\u009f\\](checked over every code point) and has the same encoding and options.effects_window.rbandline_buffered.rb: the ellipsis, rule and scrollbar characters are built withpack('U').freeze. They have the same value and are still frozen.script/check_yard_tags.rb: has a shebang, so git now records it as executable.Safe autocorrect would have replaced characters inside four spec strings (for example
'^Bob says — hi'would have become'^Bob says - hi'). Those strings were restored and rewritten by hand, so their test data is unchanged.Verification
bundle exec rubocop: 0 offenses.bundle exec rspec: 4282 examples, 0 failures, in defined order and with three random seeds.--fail-on-warningandscript/check_yard_tags.rb(including--self-test): clean..github/workflows/or.ruby-version. Other PRs handle those.🤖 Generated with Claude Code