{"action":"created","issue":{"url":"https://api.github.com/repos/fatih/hcl/issues/1","labels_url":"https://api.github.com/repos/fatih/hcl/issues/1/labels{/name}","comments_url":"https://api.github.com/repos/fatih/hcl/issues/1/comments","events_url":"https://api.github.com/repos/fatih/hcl/issues/1/events","html_url":"https://github.com/fatih/hcl/issues/1","id":114713205,"number":1,"title":"Proposed tweaks to printer style from HashiCorp internal discussions","user":{"login":"phinze","id":37534,"avatar_url":"https://avatars.githubusercontent.com/u/37534?v=3","gravatar_id":"","url":"https://api.github.com/users/phinze","html_url":"https://github.com/phinze","followers_url":"https://api.github.com/users/phinze/followers","following_url":"https://api.github.com/users/phinze/following{/other_user}","gists_url":"https://api.github.com/users/phinze/gists{/gist_id}","starred_url":"https://api.github.com/users/phinze/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/phinze/subscriptions","organizations_url":"https://api.github.com/users/phinze/orgs","repos_url":"https://api.github.com/users/phinze/repos","events_url":"https://api.github.com/users/phinze/events{/privacy}","received_events_url":"https://api.github.com/users/phinze/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":9,"created_at":"2015-11-03T00:06:56Z","updated_at":"2015-11-03T17:33:21Z","closed_at":null,"body":"Hey @fatih - amazing work on this! You've definitely taken a top-N side project off the list of many HashiCorp employees and community members. :smile: \r\n\r\nWe have an internal thread where we were trying to converge on a consistent documented style for HCL. Here's where the general consensus was headed:\r\n\r\n```js\r\n//                     v brace MUST appear at end of first line of block\r\nresource \"type\" \"name\" {\r\n  // <-- indents MUST be two spaces\r\n  an_attribute      = \"value\"\r\n  another_attribute = \"another_value\"\r\n  third_attribute   = \"three\"\r\n  //                ^ equals for adjacent attributes SHOULD be aligned\r\n\r\n  // ^ empty lines MAY be used to separate attributes into logical groups\r\n  subblock {\r\n    one   = \"foo\"\r\n    two   = \"bar\"\r\n    three = \"qux\"\r\n    // ^^ attribute ordering not dictated, users MAY choose alpha or any other semantic ordering\r\n  }\r\n}\r\n```\r\n\r\nSeems like just the equals alignment and tabs-vs-2-spaces were the differences I could see on first glance of the `printer` output config.\r\n\r\nLet me know what you think! Happy to dig into the implementation to make these tweaks as a PR."},"comment":{"url":"https://api.github.com/repos/fatih/hcl/issues/comments/153426810","html_url":"https://github.com/fatih/hcl/issues/1#issuecomment-153426810","issue_url":"https://api.github.com/repos/fatih/hcl/issues/1","id":153426810,"user":{"login":"fatih","id":438920,"avatar_url":"https://avatars.githubusercontent.com/u/438920?v=3","gravatar_id":"","url":"https://api.github.com/users/fatih","html_url":"https://github.com/fatih","followers_url":"https://api.github.com/users/fatih/followers","following_url":"https://api.github.com/users/fatih/following{/other_user}","gists_url":"https://api.github.com/users/fatih/gists{/gist_id}","starred_url":"https://api.github.com/users/fatih/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/fatih/subscriptions","organizations_url":"https://api.github.com/users/fatih/orgs","repos_url":"https://api.github.com/users/fatih/repos","events_url":"https://api.github.com/users/fatih/events{/privacy}","received_events_url":"https://api.github.com/users/fatih/received_events","type":"User","site_admin":false},"created_at":"2015-11-03T17:33:20Z","updated_at":"2015-11-03T17:33:20Z","body":"@apparentlymart I can understand your concerns, but hclfmt is optional as you know. So even though you can use it, you can always fix the lines yourself after the formatting is done. Another thing is, that it's hard to impossible to please everyone. I know this from gofmt already. However gofmt excelled because of that attitude. And as per @sethvargo, I did not encountered merge conflicts too. "}}