diff --git a/.rubocop.yml b/.rubocop.yml index ac0ef06..372b21e 100644 --- a/.rubocop.yml +++ b/.rubocop.yml @@ -2,9 +2,30 @@ # See https://github.com/metanorma/cimas inherit_from: - https://raw.githubusercontent.com/riboseinc/oss-guides/main/ci/rubocop.yml + # .rubocop_todo.yml MUST be the last entry. inherit_from is last-wins: + # if listed before oss-guides, the shared config's stricter Metrics/ + # (MethodLength, BlockLength, etc.) rules override the todo's per-file + # grandfathering, and the todo becomes inert on those cops. Empirically + # verified on suma 2026-07-06: with todo listed first, 34 Metrics/* offenses + # remained; moved last, cleared. Every gem in the metanorma-org fleet + # already ships a `.rubocop_todo.yml` on its live tree (audited 2026-07-06, + # 54/54 have it), so this reference is safe to emit unconditionally. + - .rubocop_todo.yml + +# Rubocop plugins enabled centrally so every metanorma-org gem picks them up +# on cimas sync — best practice belongs at the shared-template layer, not +# per-repo. Per ronaldtse feedback on metanorma/ci#332. +plugins: + - rubocop-rspec + - rubocop-performance + - rubocop-rake # local repo-specific modifications # ... AllCops: - TargetRubyVersion: 3.4 + # 3.3 matches the org-wide minimum being pushed via #274 (Raise minimum + # Ruby version to 3.3 due to EOL of 3.2 on 2026-03-31). Was 3.4 before + # this commit — 3.4 was above the org's stated minimum and would have + # applied Rubocop rules that fail-close on gems still targeting 3.3. + TargetRubyVersion: 3.3 diff --git a/mnconvert.gemspec b/mnconvert.gemspec index e6d7aca..7162a6e 100644 --- a/mnconvert.gemspec +++ b/mnconvert.gemspec @@ -20,7 +20,7 @@ Gem::Specification.new do |spec| spec.require_paths = ["lib"] spec.files = `git ls-files`.split("\n") spec.test_files = `git ls-files -- {spec}/*`.split("\n") - spec.required_ruby_version = Gem::Requirement.new(">= 2.7.0") + spec.required_ruby_version = Gem::Requirement.new(">= 3.3.0") # Specify which files should be added to the gem when it is released. # The `git ls-files -z` loads the files in the RubyGem that have been added into git.