{"action":"created","issue":{"url":"https://api.github.com/repos/lovepark/ifm3d/issues/38","repository_url":"https://api.github.com/repos/lovepark/ifm3d","labels_url":"https://api.github.com/repos/lovepark/ifm3d/issues/38/labels{/name}","comments_url":"https://api.github.com/repos/lovepark/ifm3d/issues/38/comments","events_url":"https://api.github.com/repos/lovepark/ifm3d/issues/38/events","html_url":"https://github.com/lovepark/ifm3d/issues/38","id":296367234,"number":38,"title":"[Question] Coding stle","user":{"login":"graugans","id":6263439,"avatar_url":"https://avatars0.githubusercontent.com/u/6263439?v=4","gravatar_id":"","url":"https://api.github.com/users/graugans","html_url":"https://github.com/graugans","followers_url":"https://api.github.com/users/graugans/followers","following_url":"https://api.github.com/users/graugans/following{/other_user}","gists_url":"https://api.github.com/users/graugans/gists{/gist_id}","starred_url":"https://api.github.com/users/graugans/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/graugans/subscriptions","organizations_url":"https://api.github.com/users/graugans/orgs","repos_url":"https://api.github.com/users/graugans/repos","events_url":"https://api.github.com/users/graugans/events{/privacy}","received_events_url":"https://api.github.com/users/graugans/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2018-02-12T13:01:25Z","updated_at":"2018-02-12T13:55:35Z","closed_at":null,"author_association":"CONTRIBUTOR","body":"What is the intended coding sytle for this project to contribute to. From the source formating I do expect [GNU indentation style](https://en.wikipedia.org/wiki/Indentation_style#GNU_style). \r\n\r\nIs it worth of thinking about a [CONTRIBUTING.md](https://github.com/uncrustify/uncrustify/blob/master/CONTRIBUTING.md)?"},"comment":{"url":"https://api.github.com/repos/lovepark/ifm3d/issues/comments/364929193","html_url":"https://github.com/lovepark/ifm3d/issues/38#issuecomment-364929193","issue_url":"https://api.github.com/repos/lovepark/ifm3d/issues/38","id":364929193,"user":{"login":"tpanzarella","id":645771,"avatar_url":"https://avatars2.githubusercontent.com/u/645771?v=4","gravatar_id":"","url":"https://api.github.com/users/tpanzarella","html_url":"https://github.com/tpanzarella","followers_url":"https://api.github.com/users/tpanzarella/followers","following_url":"https://api.github.com/users/tpanzarella/following{/other_user}","gists_url":"https://api.github.com/users/tpanzarella/gists{/gist_id}","starred_url":"https://api.github.com/users/tpanzarella/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tpanzarella/subscriptions","organizations_url":"https://api.github.com/users/tpanzarella/orgs","repos_url":"https://api.github.com/users/tpanzarella/repos","events_url":"https://api.github.com/users/tpanzarella/events{/privacy}","received_events_url":"https://api.github.com/users/tpanzarella/received_events","type":"User","site_admin":false},"created_at":"2018-02-12T13:55:35Z","updated_at":"2018-02-12T13:55:35Z","author_association":"OWNER","body":"For now the coding style should follow [the golden rule](https://llvm.org/docs/CodingStandards.html#golden-rule). I know that I have recently merged at least one PR that was *not* consistent, but we will have to go back and fix it. The style of the core of the code that I initially wrote has a very distinct style that should be very easy to parse -- we need to codify that (more on that later). Sadly, I do not like any of the \"published standards\" that are out there. For each one, there is *at least* one *major* thing that I cannot handle when looking at source code. So, the ifm3d code is currently, a mash-up of a few styles, taking the parts I personally like -- I guess this is first-mover advantage :-)\r\n\r\nTo answer your first question regarding brace indentation, yes. The link you provide captures the proper brace style -- it leaves no ambiguity as to where the block starts/stops. Additionally, even for a single line following an `if`, I prefer including braces, eg.:\r\n\r\n```\r\nif (YouDonIncludeBraces())\r\n{\r\n  EventuallyABugWillCreepIn();\r\n}\r\n```\r\nThere are other big peeves of mine as well. E.g., whitespace, not tabs (`whitespace-mode` in Emacs should make this obvious), no more than 80 characters per line (again, Emacs can enfore this, I am sure vim and others can too), etc.\r\n\r\nI do think it is worth pulling together a `Contributing.md`. Probably better than that is a `.clang-format`. However, the latter should not be used by those not used to handling power tools. It should be written, tested, and signed off by our core team then integrated into the editors of those who which to contribute. A while back I started one but never finished it -- IIRC, the style most closely resembles [LLVM](https://llvm.org/docs/CodingStandards.html) but with modifications -- like GNU style curly braces, etc.\r\n\r\nThis is a good topic and we should figure out the best way to formalize the style. I would expect it to carry through to more than just ifm3d."}}
{"actor":{"display_login":"tpanzarella"}}