Skip to content

Rewrite scripts in Ruby with strict linting#938

Draft
leighmcculloch wants to merge 2 commits into
mainfrom
rewrite-scripts-to-ruby
Draft

Rewrite scripts in Ruby with strict linting#938
leighmcculloch wants to merge 2 commits into
mainfrom
rewrite-scripts-to-ruby

Conversation

@leighmcculloch
Copy link
Copy Markdown
Member

What

Port the five helper scripts in .scripts/ from a mix of Python and Bash to Ruby, and add a RuboCop setup that enforces a deliberately plain, predictable dialect of the language. The lint configuration requires parentheses on method calls and bans unless and trailing modifier if/unless through two custom cops, while disabling the cops that would otherwise push code back toward those forms. Linting runs inside a Ruby container via a new make lint target and a CI job, so neither contributors nor the runners need Ruby installed locally.

Why

After some comments from fnando I wanted to see whether these scripts would be easier to maintain as Ruby than as Python. Because Ruby readily invites idioms that readers unfamiliar with the language find surprising, the RuboCop rules are tuned to forbid those constructs up front rather than relying on review to catch them, keeping the scripts approachable for anyone maintaining the image build pipeline. Running the linter through Docker keeps the toolchain consistent between local development and CI without adding a Ruby installation step to either.

@github-project-automation github-project-automation Bot moved this to Backlog (Not Ready) in DevX May 29, 2026
@socket-security
Copy link
Copy Markdown

socket-security Bot commented May 29, 2026

Review the following changes in direct dependencies. Learn more about Socket for GitHub.

Diff Package Supply Chain
Security
Vulnerability Quality Maintenance License
Addedrubocop@​1.86.283100100100100

View full report

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Backlog (Not Ready)

Development

Successfully merging this pull request may close these issues.

1 participant