{"action":"created","issue":{"url":"https://api.github.com/repos/bbatsov/ruby-style-guide/issues/321","labels_url":"https://api.github.com/repos/bbatsov/ruby-style-guide/issues/321/labels{/name}","comments_url":"https://api.github.com/repos/bbatsov/ruby-style-guide/issues/321/comments","events_url":"https://api.github.com/repos/bbatsov/ruby-style-guide/issues/321/events","html_url":"https://github.com/bbatsov/ruby-style-guide/issues/321","id":34357749,"number":321,"title":"Whitespace before trailing conditional","user":{"login":"giddie","id":10906,"avatar_url":"https://avatars.githubusercontent.com/u/10906?v=3","gravatar_id":"","url":"https://api.github.com/users/giddie","html_url":"https://github.com/giddie","followers_url":"https://api.github.com/users/giddie/followers","following_url":"https://api.github.com/users/giddie/following{/other_user}","gists_url":"https://api.github.com/users/giddie/gists{/gist_id}","starred_url":"https://api.github.com/users/giddie/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/giddie/subscriptions","organizations_url":"https://api.github.com/users/giddie/orgs","repos_url":"https://api.github.com/users/giddie/repos","events_url":"https://api.github.com/users/giddie/events{/privacy}","received_events_url":"https://api.github.com/users/giddie/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":13,"created_at":"2014-05-27T10:10:03Z","updated_at":"2015-07-02T20:42:39Z","closed_at":"2015-02-18T06:50:13Z","body":"Before a trailing conditional, it seems common to use a single space:\r\n\r\n```ruby\r\nputs 'hello' if true\r\n```\r\n\r\nI suggest that further visual separation should be recommended in this case, by using two spaces:\r\n\r\n```ruby\r\nputs 'hello'  if true\r\n```\r\n\r\nIn my opinion, this makes the conditional stand out from the statement, making it harder to miss. It seems that the style guide does not overtly express any opinion on whitespace before trailing conditionals right now; it would be good to get a decision, I think."},"comment":{"url":"https://api.github.com/repos/bbatsov/ruby-style-guide/issues/comments/118162170","html_url":"https://github.com/bbatsov/ruby-style-guide/issues/321#issuecomment-118162170","issue_url":"https://api.github.com/repos/bbatsov/ruby-style-guide/issues/321","id":118162170,"user":{"login":"kliuless","id":307761,"avatar_url":"https://avatars.githubusercontent.com/u/307761?v=3","gravatar_id":"","url":"https://api.github.com/users/kliuless","html_url":"https://github.com/kliuless","followers_url":"https://api.github.com/users/kliuless/followers","following_url":"https://api.github.com/users/kliuless/following{/other_user}","gists_url":"https://api.github.com/users/kliuless/gists{/gist_id}","starred_url":"https://api.github.com/users/kliuless/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kliuless/subscriptions","organizations_url":"https://api.github.com/users/kliuless/orgs","repos_url":"https://api.github.com/users/kliuless/repos","events_url":"https://api.github.com/users/kliuless/events{/privacy}","received_events_url":"https://api.github.com/users/kliuless/received_events","type":"User","site_admin":false},"created_at":"2015-07-02T20:42:39Z","updated_at":"2015-07-02T20:42:39Z","body":"@giddie It's good to find someone else who likes 2 spaces for postfix conditionals. (I thought I was the only one who does this!) I prefer it because it calls attention to the fact that control-flow is happening on the line, which could easily be missed when visually scanning.\r\n\r\nBut it doesn't seem like a common enough practice for the style guide to enforce it. I'm happy enough that rubocop doesn't disallow the practice."}}