Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Introduce example to run validation of of rubocop rules #347

Closed
wants to merge 1 commit into from
Closed

Conversation

miry
Copy link
Contributor

@miry miry commented Jan 12, 2022

There are sometime misconfigured Readme and Rubocop.
Make sure Rubocop correctly work, propose to have a file with
good and bad cases.

Started work, but would like to get feedback, before migrate Readme examples to ruby file.

Partialy covers #189

@miry miry self-assigned this Jan 12, 2022
@sambostock
Copy link
Contributor

I wonder if it would be possible to inline these in the README itself and then run Rubocop against that. Maybe we could look for ```ruby code blocks that have # good or # bad at the top.

Moving them to a seperate file just increases the synchronization problem, as we'd now have to keep three files in sync ( README.md, examples/sample.rb, and rubocop.yml) instead of just two.

@miry
Copy link
Contributor Author

miry commented Jan 12, 2022

@sambostock you read my mind. Have not investigated though. Probably it is not hard to write Markdown parser and feed to rubocop tests.

@volmer
Copy link
Contributor

volmer commented Feb 2, 2022

It would be really nice to be able to run RuboCop against the examples we have in the Readme. That would be better than having a separate Ruby file with code samples. Would you be interested in working on a parser for that?

@miry
Copy link
Contributor Author

miry commented Feb 7, 2022

It would be interesting.

@miry miry closed this Feb 7, 2022
@miry miry deleted the example branch February 7, 2022 10:49
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.

None yet

3 participants