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 improvements to styleguide #113

Merged
merged 7 commits into from
Aug 30, 2022

Conversation

elenatanasoiu
Copy link
Contributor

@elenatanasoiu elenatanasoiu commented Aug 29, 2022

🚨 Please review this PR commit-by-commit.

While looking into which of our styleguide rules are represented by Rubocop rules, I thought I'd take the time to add some improvements:

  1. Add a table of contents for easier scanning.
  2. Add more granular sections (inspired by the RuboCop and AirBnb styleguides)
  3. Add anchor links to all rules mentioned in the guide.

NB: This PR doesn't add or remove any rules.

At the moment they're displayed on a single line.
The old styleguide page [1] points to the Rubocop styleguide as a source
of inspiration. Let's add it here as well.

[1]: https://web.archive.org/web/20160410033955/https://github.com/styleguide/ruby
This doesn't add or remove any rules, it just groups them together under:

Layout
 - Indentation
 - Inline
 - Newlines
Maximum Line Length

Inspired by the RuboCop [1] and AirBnb [2] styleguides.

[1]: https://github.com/rubocop/ruby-style-guide/blob/master/README.adoc
[2]: https://github.com/airbnb/ruby/blob/master/README.md
I've noticed people point at the styleguide when doing reviews.

Let's make their life easier by adding a link to each rule.

Spoiler: I am one of those people.
@elenatanasoiu elenatanasoiu force-pushed the elenatanasoiu/style-the-styleguide branch from cbf5700 to 653e004 Compare August 29, 2022 20:34
Copy link
Member

@cheshire137 cheshire137 left a comment

Choose a reason for hiding this comment

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

This looks great, thank you! I especially like the links for each guideline.

@elenatanasoiu elenatanasoiu merged commit 95d99fd into master Aug 30, 2022
@elenatanasoiu elenatanasoiu deleted the elenatanasoiu/style-the-styleguide branch August 30, 2022 21:44
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.

3 participants