{"action":"created","issue":{"url":"https://api.github.com/repos/manastech/crystal/issues/1924","labels_url":"https://api.github.com/repos/manastech/crystal/issues/1924/labels{/name}","comments_url":"https://api.github.com/repos/manastech/crystal/issues/1924/comments","events_url":"https://api.github.com/repos/manastech/crystal/issues/1924/events","html_url":"https://github.com/manastech/crystal/issues/1924","id":119859498,"number":1924,"title":"Formatter indentation not matching with what I'd expect","user":{"login":"miketheman","id":529516,"avatar_url":"https://avatars.githubusercontent.com/u/529516?v=3","gravatar_id":"","url":"https://api.github.com/users/miketheman","html_url":"https://github.com/miketheman","followers_url":"https://api.github.com/users/miketheman/followers","following_url":"https://api.github.com/users/miketheman/following{/other_user}","gists_url":"https://api.github.com/users/miketheman/gists{/gist_id}","starred_url":"https://api.github.com/users/miketheman/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/miketheman/subscriptions","organizations_url":"https://api.github.com/users/miketheman/orgs","repos_url":"https://api.github.com/users/miketheman/repos","events_url":"https://api.github.com/users/miketheman/events{/privacy}","received_events_url":"https://api.github.com/users/miketheman/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-12-02T03:31:34Z","updated_at":"2015-12-02T10:48:41Z","closed_at":null,"body":"Hi there!\r\n\r\nLearning more every day, and ran into this. Since I know the formatter is new and under active discussions, I thought I'd show what I'm seeing, and see if I'm way wrong about this.\r\n\r\nConsider a Ruby class that has a few paramters that need to be supplied during initialize:\r\n\r\n```ruby\r\nmodule Foo\r\n  class Bar\r\n    def initialize(\r\n      name,\r\n      value,\r\n      type\r\n    )\r\n      # ... snip\r\n    end\r\n  end\r\nend\r\n```\r\n\r\nThe Ruby Style Guide will indent each paramter on a new line, indented from the opening paren, with the closing paren on its own line, indented to the opening declaration.\r\n\r\nIf I apply a similar approach to Crystal 0.9.1:\r\n\r\n```crystal\r\nmodule Foo\r\n  class Bar\r\n    def initialize(\r\n      @name : String,\r\n      @value : (Int32 | Float),\r\n      @type : String\r\n    )\r\n      # ... snip\r\n    end\r\n  end\r\nend\r\n```\r\n\r\nRunning the formatter tool gets converted to:\r\n\r\n```crystal\r\nmodule Foo\r\n  class Bar\r\n    def initialize(\r\n                   @name : String,\r\n                   @value : (Int32 | Float),\r\n                   @type : String)\r\n      # ... snip\r\n    end\r\n  end\r\nend\r\n```\r\n\r\nWhich leaves me the closing paren almost \"invisible\" at the end of the `@type` line.\r\n\r\nI tried to find a simple way to scaffold a test for the formatters - but I'm a bit behind on reading how to work with the core language - any pointers would be helpful."},"comment":{"url":"https://api.github.com/repos/manastech/crystal/issues/comments/161256385","html_url":"https://github.com/manastech/crystal/issues/1924#issuecomment-161256385","issue_url":"https://api.github.com/repos/manastech/crystal/issues/1924","id":161256385,"user":{"login":"asterite","id":209371,"avatar_url":"https://avatars.githubusercontent.com/u/209371?v=3","gravatar_id":"","url":"https://api.github.com/users/asterite","html_url":"https://github.com/asterite","followers_url":"https://api.github.com/users/asterite/followers","following_url":"https://api.github.com/users/asterite/following{/other_user}","gists_url":"https://api.github.com/users/asterite/gists{/gist_id}","starred_url":"https://api.github.com/users/asterite/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/asterite/subscriptions","organizations_url":"https://api.github.com/users/asterite/orgs","repos_url":"https://api.github.com/users/asterite/repos","events_url":"https://api.github.com/users/asterite/events{/privacy}","received_events_url":"https://api.github.com/users/asterite/received_events","type":"User","site_admin":false},"created_at":"2015-12-02T10:48:40Z","updated_at":"2015-12-02T10:48:40Z","body":"Yes, I think the first style makes more sense. It's also easier to read because code doesn't go too much to the right of the screen. I'll fix it :-)"}}