{"action":"created","issue":{"url":"https://api.github.com/repos/gapt/gapt/issues/280","labels_url":"https://api.github.com/repos/gapt/gapt/issues/280/labels{/name}","comments_url":"https://api.github.com/repos/gapt/gapt/issues/280/comments","events_url":"https://api.github.com/repos/gapt/gapt/issues/280/events","html_url":"https://github.com/gapt/gapt/pull/280","id":56306476,"number":280,"title":"Adding support for source code formatting using Scalariform","user":{"login":"newca12","id":543542,"avatar_url":"https://avatars.githubusercontent.com/u/543542?v=3","gravatar_id":"","url":"https://api.github.com/users/newca12","html_url":"https://github.com/newca12","followers_url":"https://api.github.com/users/newca12/followers","following_url":"https://api.github.com/users/newca12/following{/other_user}","gists_url":"https://api.github.com/users/newca12/gists{/gist_id}","starred_url":"https://api.github.com/users/newca12/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/newca12/subscriptions","organizations_url":"https://api.github.com/users/newca12/orgs","repos_url":"https://api.github.com/users/newca12/repos","events_url":"https://api.github.com/users/newca12/events{/privacy}","received_events_url":"https://api.github.com/users/newca12/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":12,"created_at":"2015-02-02T22:53:55Z","updated_at":"2015-02-04T12:04:12Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/gapt/gapt/pulls/280","html_url":"https://github.com/gapt/gapt/pull/280","diff_url":"https://github.com/gapt/gapt/pull/280.diff","patch_url":"https://github.com/gapt/gapt/pull/280.patch"},"body":"This should have been done before.\r\nAutomatic code formatting is step 0 of code quality.\r\nRules used here are the one used by typesafe + DoubleIndentClassDeclaration"},"comment":{"url":"https://api.github.com/repos/gapt/gapt/issues/comments/72843635","html_url":"https://github.com/gapt/gapt/pull/280#issuecomment-72843635","issue_url":"https://api.github.com/repos/gapt/gapt/issues/280","id":72843635,"user":{"login":"shetzl","id":10726013,"avatar_url":"https://avatars.githubusercontent.com/u/10726013?v=3","gravatar_id":"","url":"https://api.github.com/users/shetzl","html_url":"https://github.com/shetzl","followers_url":"https://api.github.com/users/shetzl/followers","following_url":"https://api.github.com/users/shetzl/following{/other_user}","gists_url":"https://api.github.com/users/shetzl/gists{/gist_id}","starred_url":"https://api.github.com/users/shetzl/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/shetzl/subscriptions","organizations_url":"https://api.github.com/users/shetzl/orgs","repos_url":"https://api.github.com/users/shetzl/repos","events_url":"https://api.github.com/users/shetzl/events{/privacy}","received_events_url":"https://api.github.com/users/shetzl/received_events","type":"User","site_admin":false},"created_at":"2015-02-04T12:04:11Z","updated_at":"2015-02-04T12:04:11Z","body":"My understanding of these //format: OFF and //format: ON lines is that they are to be used only as an emergency measure. Consider for example the code used for illustrating this feature at http://mdr.github.io/scalariform/. It is certainly not intended to put these comments before and after every long line.\r\n\r\nI think there are two different questions:\r\n1) Do we want to use scalariform to enforce a uniform code formatting?, and\r\n2) If yes, how do we want to use it?\r\n\r\nI think that we agree on 2) in so far that - if we use it - it should not be run on \"sbt compile\" but instead via a designated sbt target. Our convention should then be that every commit should run sucessfully not only trough \"sbt compile\" and \"sbt test\" but also trough \"sbt scalariform\" (or however this target will be named). At some later point, and indepedently of that, we may want to enforce this (via Jenkins or commit hooks).\r\n\r\nConcerning 1) I think there is a good case to make in favour of scalariform. It helps code readability and leads to a significantly more polished appearence of the code. The disadvantage is that scalariform may sometimes mess up formatting chosen judiciously by the programmer. I personally can live with the long lines. If nothing worse than that happens I think the benefits of using scalariform largely outweigh its disadvantage.\r\n\r\nGiselle, I am not sure what you meant by being \"against using an automatic formatting tool\", is that opposition to 1) or to running scalariform on sbt compile?"}}