Repository navigation
Rewrite lint-no-raw-mdc as Ruby (was bash) - #21
Merged
Merged
Conversation
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.
Summary
bin/lint-no-raw-mdcwas a bash script. For a Ruby library this is thewrong choice — it requires bash on PATH (works on Linux/macOS, and on
Windows only because Git for Windows ships bash), and the previous PR
had to special-case the Rakefile to invoke
bash bin/lint-no-raw-mdcexplicitly.
Change
Rewrote
bin/lint-no-raw-mdcas a Ruby script:#!/usr/bin/env rubyOpen3.capture3to invokegit grep-Edoesn't accept Ruby regex syntax like
\dor(?:...)internal failure
Rakefile reverted to
ruby "bin/lint-no-raw-mdc"— the previousbash bin/lint-no-raw-mdcworkaround is no longer needed. Ruby isguaranteed on PATH because Rake itself runs on Ruby.
Verified locally
bundle exec rake lint:registry— passes on a clean tree"MDC_P999"in a tracked file underlib/opencdd/entity/—the script reports the violation with exit 1, matching the previous
bash behavior
Test plan