KEMBAR78
Restyle the example formatting for some Layout cops by koic · Pull Request #4978 · rubocop/rubocop · GitHub
Skip to content

Conversation

@koic
Copy link
Member

@koic koic commented Nov 1, 2017

Follow up of #4880 (comment).

This commit is a change of document format.

Because there are many cops to be changed 💦, this commit applied a new style to some Layout department cops first.


Before submitting the PR make sure the following are checked:

  • Wrote good commit messages.
  • Commit message starts with [Fix #issue-number] (if the related issue exists).
  • Used the same coding conventions as the rest of the project.
  • Feature branch is up-to-date with master (if not - rebase it).
  • Squashed related commits together.
  • Added tests.
  • Added an entry to the Changelog if the new code introduces user-observable changes. See changelog entry format.
  • All tests(rake spec) are passing.
  • The new code doesn't generate RuboCop offenses that are checked by rake internal_investigation.
  • The PR relates to only one subject with a clear title
    and description in grammatically correct, complete sentences.
  • Updated cop documentation with rake generate_cops_documentation (required only when you've added a new cop or changed the configuration/documentation of an existing cop).

Follow up of rubocop#4880 (comment).

This commit is a change of document format.

Because there are many cops to be changed, this commit applied
a new style to some Layout department cops first.
#
# @example
# # Good if EnforcedStyle is no_space, bad if space.
# @example EnforcedStyle no_space (default)
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You forgot : here and in the other example.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oops. I fixed by #4994. Thanks for the review 💦

@bbatsov bbatsov merged commit fc9d225 into rubocop:master Nov 2, 2017
@bbatsov
Copy link
Collaborator

bbatsov commented Nov 2, 2017

Great change!

It just reveals one small problem of the current approach - we're not extracting the example's name where converting it to the manual's snippet and some valuable info for the end user gets lost. We should improve the code of the manual generator to account for this. (should be trivial)

@koic koic deleted the restyle_example_formatting_for_some_layout_cops branch November 3, 2017 08:34
koic added a commit to koic/rubocop that referenced this pull request Nov 4, 2017
Follow up of rubocop#4978 (comment).
This is a small fix to the document of `Layout/SpaceInsideStringInterpolation` cop.
bbatsov pushed a commit that referenced this pull request Nov 4, 2017
Follow up of #4978 (comment).
This is a small fix to the document of `Layout/SpaceInsideStringInterpolation` cop.
koic added a commit to koic/rubocop that referenced this pull request Nov 6, 2017
Follow up of rubocop#4880 (comment).

This commit applied a new style to some `Style` department cops, the same
policy as rubocop#4978.
bbatsov pushed a commit that referenced this pull request Nov 7, 2017
Follow up of #4880 (comment).

This commit applied a new style to some `Style` department cops, the same
policy as #4978.
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.

2 participants