NatLabRockies / NatLabRockies/OpenStudio-server
rubocop is broken: inherited NREL rubocop_v3.yml style file is incompatible with pinned rubocop 1.50
Nobody has claimed this yet.
- Dominant language
- Ruby
- Stars
- 58
- Forks
- 27
- PR merge metrics
- No merged PRs in 30d
Description
Problem
cd server && bundle exec rubocop (the documented lint command) dies during config validation and never lints a single file:
Error: The `Lint/HandleExceptions` cop has been renamed to `Lint/SuppressedException`.
(obsolete configuration found in .rubocop-http---s3-amazonaws-com-openstudio-resources-styles-rubocop-v3-yml, please update it)
Plus warnings for Metrics/LineLength (now Layout/LineLength) and Performance/* cops (extracted to the rubocop-performance gem, which is not in the Gemfile).
Root cause
Config chain: server/.rubocop.yml → root .rubocop.yml → inherit_from:
http://s3.amazonaws.com/openstudio-resources/styles/rubocop_v3.ymlhttp://s3.amazonaws.com/openstudio-resources/styles/rubocop-rails.yml
rubocop_v3.yml targets rubocop 0.x (~2017). server/Gemfile pins rubocop ~> 1.50.0 (2023). Rubocop 1.x treats removed/renamed cop names in config as a fatal error.
Why nobody noticed
CI never runs rubocop (neither workflow in .github/workflows/ mentions it), so the breakage is invisible. It has likely been broken for years.
Suggested fix
The S3 bucket already hosts newer style files — rubocop_v4.yml, rubocop_v5.yml, rubocop_v6.yml all return 200. Newer NREL repos use those.
- Point root
.rubocop.ymlatrubocop_v6.yml(or v4); checkrubocop-rails.ymlfor the same staleness. - Run rubocop and triage the offense backlog (expect a large count after years unlinted;
--autocorrectshould handle most style cops). - Optionally add a rubocop job to CI so it cannot silently rot again.
🤖 Generated with Claude Code
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with root .rubocop.yml and server/Gemfile, then run cd server && bundle exec rubocop to reproduce the configuration failure. Compare the inherited rubocop_v4/v5/v6 style files and inspect rubocop-rails.yml for the same staleness. Done means the documented command completes, the offense backlog is triaged, and the relevant CI workflows cover linting if that option is taken.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- ruby
- Domain
- tooling
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 48/100