{"action":"created","issue":{"url":"https://api.github.com/repos/nanomsg/nanomsg/issues/680","repository_url":"https://api.github.com/repos/nanomsg/nanomsg","labels_url":"https://api.github.com/repos/nanomsg/nanomsg/issues/680/labels{/name}","comments_url":"https://api.github.com/repos/nanomsg/nanomsg/issues/680/comments","events_url":"https://api.github.com/repos/nanomsg/nanomsg/issues/680/events","html_url":"https://github.com/nanomsg/nanomsg/issues/680","id":151271858,"number":680,"title":"Consider switching to FreeBSD coding style","user":{"login":"gdamore","id":1295229,"avatar_url":"https://avatars.githubusercontent.com/u/1295229?v=3","gravatar_id":"","url":"https://api.github.com/users/gdamore","html_url":"https://github.com/gdamore","followers_url":"https://api.github.com/users/gdamore/followers","following_url":"https://api.github.com/users/gdamore/following{/other_user}","gists_url":"https://api.github.com/users/gdamore/gists{/gist_id}","starred_url":"https://api.github.com/users/gdamore/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gdamore/subscriptions","organizations_url":"https://api.github.com/users/gdamore/orgs","repos_url":"https://api.github.com/users/gdamore/repos","events_url":"https://api.github.com/users/gdamore/events{/privacy}","received_events_url":"https://api.github.com/users/gdamore/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2016-04-27T00:44:45Z","updated_at":"2016-04-29T22:05:58Z","closed_at":null,"body":"The nanomsg coding style is unique to nanomsg.  Its also fairly annoying in that those of us who work on other OSS code bases may struggle switching.  4 *space* indents are particularly annoying in the absence of good tooling.\r\n\r\nSo I'm hereby proposing to adopt the relevant parts of the FreeBSD coding style (the KNF parts).  The reason for this style is multifold.  Its one that I'm familiar with, it's very widely known, and there is excellent tool support for it.  I actually use the illumos style which is almost the same KNF.\r\n\r\nThe parts we wouldn't adopt are the parts relating to copyright blocks, pragma idents, and other intrinsically FreeBSD specific parts. The parts we would adopt are indention, line wrap, and other white space related issues.\r\n\r\nThis may seem like a small detail, but for someone who spends large amounts of time in the code, having a different coding style for this project is definitely an impediment.  And its an easy one to fix -- it can largely be done automatically via something like the indent program or emacs style plugin."},"comment":{"url":"https://api.github.com/repos/nanomsg/nanomsg/issues/comments/215894346","html_url":"https://github.com/nanomsg/nanomsg/issues/680#issuecomment-215894346","issue_url":"https://api.github.com/repos/nanomsg/nanomsg/issues/680","id":215894346,"user":{"login":"gdamore","id":1295229,"avatar_url":"https://avatars.githubusercontent.com/u/1295229?v=3","gravatar_id":"","url":"https://api.github.com/users/gdamore","html_url":"https://github.com/gdamore","followers_url":"https://api.github.com/users/gdamore/followers","following_url":"https://api.github.com/users/gdamore/following{/other_user}","gists_url":"https://api.github.com/users/gdamore/gists{/gist_id}","starred_url":"https://api.github.com/users/gdamore/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gdamore/subscriptions","organizations_url":"https://api.github.com/users/gdamore/orgs","repos_url":"https://api.github.com/users/gdamore/repos","events_url":"https://api.github.com/users/gdamore/events{/privacy}","received_events_url":"https://api.github.com/users/gdamore/received_events","type":"User","site_admin":false},"created_at":"2016-04-29T22:05:58Z","updated_at":"2016-04-29T22:05:58Z","body":"Conceptually the idea of enforcement is sound.  I don't know if pre-commit-hooks are the right answer, but pre-push ones definitely are.  (The later we control everywhere, the former we do not.)\r\n\r\nThe first step is choosing a style.  One that can be applied mechanically is desirable."}}