Skip to content
Snippets Groups Projects

Add newlines styleguide for Ruby code

Merged username-removed-444 requested to merge dz-newlines-styleguide into master
3 unresolved threads

Merge request reports

Loading
Loading

Activity

Filter activity
  • Approvals
  • Assignees & reviewers
  • Comments (from bots)
  • Comments (from users)
  • Commits & branches
  • Edits
  • Labels
  • Lock status
  • Mentions
  • Merge request status
  • Tracking
1 # Newlines styleguide
2
3 This style guide recommends best practices for newlines in Ruby code.
4
5 ## Rule: separate code with newlines only when it makes sense from logic perspectice
6
7 Good
8
9 ```
  • 1 # Newlines styleguide
    2
    3 This style guide recommends best practices for newlines in Ruby code.
    4
    5 ## Rule: separate code with newlines only when it makes sense from logic perspectice
    6
    7 Good
  • 459 459 - multi-line method chaining style **Option B**: dot `.` on previous line
    460 460 - string literal quoting style **Option A**: single quoted by default
    461 461 1. [Rails](https://github.com/bbatsov/rails-style-guide)
    462 1. [Newlines styleguide][newlines-styleguide]
  • Added 1 commit:

    • f037f7a9 - Reorganize newlines guide to follow consistencty with other guides [ci skip]
  • @rspeicher updated to match style of other guides

  • Added 1 commit:

    • 94df7186 - Fix newline styleguide link for CONTRIBUTING.md
  • Added 1 commit:

    • 13cabe71 - Add newlines styleguide for Ruby code
  • @rspeicher link added, commits squashed

  • Grzegorz Bizon mentioned in merge request !5692 (merged)

    mentioned in merge request !5692 (merged)

  • Robert Speicher Status changed to merged

    Status changed to merged

  • Robert Speicher mentioned in commit fa95d9e4

    mentioned in commit fa95d9e4

  • Zeger-Jan van de Weg mentioned in merge request !6213 (merged)

    mentioned in merge request !6213 (merged)

  • mentioned in issue gitlab#5678

  • Please register or sign in to reply
    Loading