Skip to content

fix: standalone bundle + standardrb clean - #764

Open
ronaldtse wants to merge 3 commits into
mainfrom
fix/standardrb-standalone
Open

fix: standalone bundle + standardrb clean#764
ronaldtse wants to merge 3 commits into
mainfrom
fix/standardrb-standalone

Conversation

@ronaldtse

Copy link
Copy Markdown
Contributor

Two intertwined blockers for standalone use of this repo:

The Gemfile hard-required a sibling ../maps checkout (path: dependency). Standalone clones and the StandardRB CI job (which does not bootstrap the monorepo) died in Bundler::PathError. Now it uses the sibling path when present, exactly like the existing secryst group pattern, and falls back to the published interscript-maps gem otherwise. The gemspec was already correct; only the dev Gemfile was broken.

The StandardRB job then surfaced 37 real offenses in lib/:

  • mechanical fixes: split("") to chars, and/or to &&/|| with parens, paren-wrapped assignment-in-condition, redundant interpolations, identical-branch hoist
  • explicit directives where the pattern is deliberate: the eval-based map compiler, method_missing DSLs (respond_to_missing? returning true would break duck-typing on to_ary), execution-context globals ($compiler, $select_nth_string), debug hooks, URI.open model cache fetch

Verified: bundle exec standardrb exits 0; a transliteration smoke test over multiple maps is byte-identical before/after the change.

GitHub rejects SARIF from advanced (workflow) configurations when
default setup is enabled; default setup already scans every push.
- Gemfile: fall back to the published interscript-maps gem when no
  sibling ../maps checkout exists, so the repo bundles standalone
  (mirrors the existing secryst group pattern)
- Clear all remaining standardrb offenses in lib/: mechanical
  corrections (chars, and/or precedence, paren-wrapped assignment),
  explicit directives for deliberate patterns (eval-based compiler,
  method_missing DSL, execution-context globals, debug hooks)
- Verified zero behavior change: transliteration smoke test identical
  before/after
Bundler removed --with; it now fails every install step. Use
'bundle config set --local with jsexec' before bundle install.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant