{"action":"created","issue":{"url":"https://api.github.com/repos/OCamlPro/ocp-indent/issues/178","labels_url":"https://api.github.com/repos/OCamlPro/ocp-indent/issues/178/labels{/name}","comments_url":"https://api.github.com/repos/OCamlPro/ocp-indent/issues/178/comments","events_url":"https://api.github.com/repos/OCamlPro/ocp-indent/issues/178/events","html_url":"https://github.com/OCamlPro/ocp-indent/pull/178","id":70987507,"number":178,"title":"Add option to treat semicolon as an operator","user":{"login":"toroidal-code","id":2250579,"avatar_url":"https://avatars.githubusercontent.com/u/2250579?v=3","gravatar_id":"","url":"https://api.github.com/users/toroidal-code","html_url":"https://github.com/toroidal-code","followers_url":"https://api.github.com/users/toroidal-code/followers","following_url":"https://api.github.com/users/toroidal-code/following{/other_user}","gists_url":"https://api.github.com/users/toroidal-code/gists{/gist_id}","starred_url":"https://api.github.com/users/toroidal-code/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/toroidal-code/subscriptions","organizations_url":"https://api.github.com/users/toroidal-code/orgs","repos_url":"https://api.github.com/users/toroidal-code/repos","events_url":"https://api.github.com/users/toroidal-code/events{/privacy}","received_events_url":"https://api.github.com/users/toroidal-code/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-04-26T00:39:53Z","updated_at":"2015-04-27T01:46:56Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/OCamlPro/ocp-indent/pulls/178","html_url":"https://github.com/OCamlPro/ocp-indent/pull/178","diff_url":"https://github.com/OCamlPro/ocp-indent/pull/178.diff","patch_url":"https://github.com/OCamlPro/ocp-indent/pull/178.patch"},"body":"This commit adds a new option `semi_as_op` to allow for treating the semicolon as a standard operator, and thus column-alignment.\r\n\r\nThis has always kinda bugged me, since I like to be able to organize sequential statements in the same column, instead of on the same line, in things like this:\r\n```ocaml\r\n  try\r\n    ignore (Unix.alarm timeout);\r\n    ignore (f args);\r\n    finish ()\r\n  with\r\n    exn -> finish ();\r\n           raise exn\r\n```\r\n\r\nIs this something that would be accepted as a PR? I don't really know the protocol for submitting a feature-addition to a company-managed tool, and this seemed easy enough to implement that I didn't think it warranted an issue if I could give a PR instead."},"comment":{"url":"https://api.github.com/repos/OCamlPro/ocp-indent/issues/comments/96461438","html_url":"https://github.com/OCamlPro/ocp-indent/pull/178#issuecomment-96461438","issue_url":"https://api.github.com/repos/OCamlPro/ocp-indent/issues/178","id":96461438,"user":{"login":"AltGr","id":807966,"avatar_url":"https://avatars.githubusercontent.com/u/807966?v=3","gravatar_id":"","url":"https://api.github.com/users/AltGr","html_url":"https://github.com/AltGr","followers_url":"https://api.github.com/users/AltGr/followers","following_url":"https://api.github.com/users/AltGr/following{/other_user}","gists_url":"https://api.github.com/users/AltGr/gists{/gist_id}","starred_url":"https://api.github.com/users/AltGr/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/AltGr/subscriptions","organizations_url":"https://api.github.com/users/AltGr/orgs","repos_url":"https://api.github.com/users/AltGr/repos","events_url":"https://api.github.com/users/AltGr/events{/privacy}","received_events_url":"https://api.github.com/users/AltGr/received_events","type":"User","site_admin":false},"created_at":"2015-04-27T01:46:56Z","updated_at":"2015-04-27T01:46:56Z","body":"> Is this something that would be accepted as a PR? I don't really know the protocol for submitting a feature-addition to a company-managed tool, and this seemed easy enough to implement that I didn't think it warranted an issue if I could give a PR instead.\r\n\r\nWe (OCamlPro) maintain the tool for the community (with, I must mention, kind support from JaneStreet), but gladly welcome contributions -- Thanks! We could probably be more explicit about it, since this also concerns OPAM, ocp-index, [etc.](http://www.typerex.org/)\r\n\r\nWe're not at the moment monetizing ocp-indent in any way, and don't expect to, but as a company, we need to keep some ownership on our codebase (so that we can distribute or include it under another license if needed, for example); to this end, we have a [small CLA](https://github.com/OCamlPro/ocp-indent/wiki/CLA) that grants us co-ownership of the contributions, that we need contributors to agree on. Thanks, that's it for the boring stuff!\r\n\r\n\r\n> This has always kinda bugged me, since I like to be able to organize sequential statements in the same column, instead of on the same line, in things like this:\r\n\r\nI see your point. I try to be considerate of every added option, to avoid having huge, obscure configuration files, without standard, but yours seems a fair addition.\r\n\r\nNote that it is already possible to get alignment with semicolons, using the prefix syntax:\r\n\r\n```\r\nlet x = foo\r\n      ; bar\r\n```\r\n\r\n(I personally find it ugly, but without any further arguments, try to not take that into account).\r\n\r\nOn the option itself, an `align_semi` option might be more explicit and consistent with other option names. In the current setting, that would be equivalent as long as `align_ops` is set ; not sure making it possible to align on semi but not binary operators is a good idea, but that seems easier to understand.\r\n\r\nThanks again, waiting to hear from you!\r\n"}}