{"action":"created","issue":{"url":"https://api.github.com/repos/LLNL/RAJA/issues/33","repository_url":"https://api.github.com/repos/LLNL/RAJA","labels_url":"https://api.github.com/repos/LLNL/RAJA/issues/33/labels{/name}","comments_url":"https://api.github.com/repos/LLNL/RAJA/issues/33/comments","events_url":"https://api.github.com/repos/LLNL/RAJA/issues/33/events","html_url":"https://github.com/LLNL/RAJA/pull/33","id":157552492,"number":33,"title":"adding a clang-format file to help style code","user":{"login":"trws","id":660149,"avatar_url":"https://avatars.githubusercontent.com/u/660149?v=3","gravatar_id":"","url":"https://api.github.com/users/trws","html_url":"https://github.com/trws","followers_url":"https://api.github.com/users/trws/followers","following_url":"https://api.github.com/users/trws/following{/other_user}","gists_url":"https://api.github.com/users/trws/gists{/gist_id}","starred_url":"https://api.github.com/users/trws/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/trws/subscriptions","organizations_url":"https://api.github.com/users/trws/orgs","repos_url":"https://api.github.com/users/trws/repos","events_url":"https://api.github.com/users/trws/events{/privacy}","received_events_url":"https://api.github.com/users/trws/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":21,"created_at":"2016-05-30T20:21:00Z","updated_at":"2016-06-01T17:25:22Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/LLNL/RAJA/pulls/33","html_url":"https://github.com/LLNL/RAJA/pull/33","diff_url":"https://github.com/LLNL/RAJA/pull/33.diff","patch_url":"https://github.com/LLNL/RAJA/pull/33.patch"},"body":"This encodes a format that is as similar as I could seem to get clang-format to go to the style used in RAJA overall.  The only real difference is that it is more likely to pull template parameters and function arguments onto a single line when they fit in the 80-column limit than the manual style.\r\n\r\nI suggest folks give this a try, and see if it's close enough to be made a standard tool for styling.  If there are any particular complaints, it's entirely possible they can be fixed."},"comment":{"url":"https://api.github.com/repos/LLNL/RAJA/issues/comments/223064854","html_url":"https://github.com/LLNL/RAJA/pull/33#issuecomment-223064854","issue_url":"https://api.github.com/repos/LLNL/RAJA/issues/33","id":223064854,"user":{"login":"rhornung67","id":12800412,"avatar_url":"https://avatars.githubusercontent.com/u/12800412?v=3","gravatar_id":"","url":"https://api.github.com/users/rhornung67","html_url":"https://github.com/rhornung67","followers_url":"https://api.github.com/users/rhornung67/followers","following_url":"https://api.github.com/users/rhornung67/following{/other_user}","gists_url":"https://api.github.com/users/rhornung67/gists{/gist_id}","starred_url":"https://api.github.com/users/rhornung67/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rhornung67/subscriptions","organizations_url":"https://api.github.com/users/rhornung67/orgs","repos_url":"https://api.github.com/users/rhornung67/repos","events_url":"https://api.github.com/users/rhornung67/events{/privacy}","received_events_url":"https://api.github.com/users/rhornung67/received_events","type":"User","site_admin":false},"created_at":"2016-06-01T17:25:22Z","updated_at":"2016-06-01T17:25:22Z","body":"Tom, this looks fine if others are happy with it.  I have no religious attachment to code formatting conventions.\n\nFrom: Tom Scogland <notifications@github.com<mailto:notifications@github.com>>\nReply-To: LLNL/RAJA <reply@reply.github.com<mailto:reply@reply.github.com>>\nDate: Wednesday, June 1, 2016 at 7:55 AM\nTo: LLNL/RAJA <RAJA@noreply.github.com<mailto:RAJA@noreply.github.com>>\nCc: Rich Hornung <hornung1@llnl.gov<mailto:hornung1@llnl.gov>>, Mention <mention@noreply.github.com<mailto:mention@noreply.github.com>>\nSubject: Re: [LLNL/RAJA] adding a clang-format file to help style code (#33)\n\n\nOk, updated version. This one is a closer match to what I normally do. You'll notice much of it is the same, but it goes to a 2-space indent, and while it allows single-line functions it no longer allows single line loops. The difference in most places is pretty minimal, this is the complete diff for BaseSegment for example:\n\n$ diff -w <(clang-format include/RAJA/BaseSegment.hxx) include/RAJA/BaseSegment.hxx\n60,61c60,62< namespace RAJA< {---> > namespace RAJA {> 71a73> 75c77,79<   explicit BaseSegment(SegmentType type) : m_type(type), m_private(0) { ; }--->    explicit BaseSegment(SegmentType type)>       : m_type(type), m_private(0) { ; }> 83a88> 87a93> 91a98> 98a106> 141a150>\n\nThe biggest difference is probably in mathematical and boolean logic expressions and template parameter lists. We don't have many of the former, but complex boolean expressions will be wrapped such that their operator precedence is reflected in their indentation.\n\nTemplate parameter lists will end up on one line unless they exceed the line length limit, so that's a change too:\n\n165,166c181,184 // new\n< template <typename EXEC_POLICY_T, typename LOOP_BODY>< RAJA_INLINE void forall_Icount(const RangeSegment& iseg,--- // old> template <typename EXEC_POLICY_T,>           typename LOOP_BODY>> RAJA_INLINE> void forall_Icount(const RangeSegment& iseg,\n\nAnyway, I think this is reasonable, but as before let me know if there's something that should change. One option that I didn't hit on was whether there should be spaces inside parens or not. The codebase is about half and half it seems, so I left it at my default which is no extra spaces in parens.\n\n—\nYou are receiving this because you were mentioned.\nReply to this email directly, view it on GitHub<https://github.com/LLNL/RAJA/pull/33#issuecomment-223018911>, or mute the thread<https://github.com/notifications/unsubscribe/AMNRnMIyH0zPKo45wa3VNUXt2bIiCl3Qks5qHZ1tgaJpZM4IqA9C>.\n"}}
{"actor":{"display_login":"rhornung67"}}