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

Add markdown formatter #10542

Merged
merged 7 commits into from Apr 25, 2022
Merged

Conversation

joe-sharp
Copy link
Contributor

@joe-sharp joe-sharp commented Apr 15, 2022

Add a new formatter that outputs markdown. I copied the style from the existing HTML formatter so that after processing, they should be the same looking to the end user. I also added tests for this new formatter.


Before submitting the PR make sure the following are checked:

  • The PR relates to only one subject with a clear title and description in grammatically correct, complete sentences.
  • Wrote good commit messages.
  • Commit message starts with [Fix #issue-number] (if the related issue exists).
  • Feature branch is up-to-date with master (if not - rebase it).
  • Squashed related commits together.
  • Added tests.
  • Ran bundle exec rake default. It executes all tests and runs RuboCop on its own code.
  • Added an entry (file) to the changelog folder named {change_type}_{change_description}.md if the new code introduces user-observable changes. See changelog entry format for details.

@bbatsov
Copy link
Collaborator

bbatsov commented Apr 16, 2022

What's your use case for such a formatter?

@joe-sharp
Copy link
Contributor Author

What's your use case for such a formatter?

I made it to be able to add comments to GitHub PRs in a nice format. An additional use case could be for use with static site generators such as Jekyll.

@bbatsov
Copy link
Collaborator

bbatsov commented Apr 17, 2022

I copied the style from the existing HTML formatter

I still made a couple of suggestions that I think would improve the readability of the generated output. You'll also have to mention this new formatter in the docs.

@bbatsov
Copy link
Collaborator

bbatsov commented Apr 20, 2022

FYI - I'll be cutting a new release some time tomorrow, so we'll have to wrap this up today if you want it to make the release.

@joe-sharp
Copy link
Contributor Author

@bbatsov thank you for the heads up about the release. I am not in a rush for this, but I do hope to pick up work on this today. Apologies for the delay!

@joe-sharp
Copy link
Contributor Author

Thanks much for these suggestions, I think the report looks quite a bit nicer and definitely more readable!

@joe-sharp joe-sharp requested a review from bbatsov April 22, 2022 18:23
@bbatsov bbatsov merged commit 6ff34fd into rubocop:master Apr 25, 2022
@bbatsov
Copy link
Collaborator

bbatsov commented Apr 25, 2022

Thanks!

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

2 participants