{"action":"created","issue":{"url":"https://api.github.com/repos/prusa3d/Slic3r/issues/1021","repository_url":"https://api.github.com/repos/prusa3d/Slic3r","labels_url":"https://api.github.com/repos/prusa3d/Slic3r/issues/1021/labels{/name}","comments_url":"https://api.github.com/repos/prusa3d/Slic3r/issues/1021/comments","events_url":"https://api.github.com/repos/prusa3d/Slic3r/issues/1021/events","html_url":"https://github.com/prusa3d/Slic3r/issues/1021","id":337523715,"node_id":"MDU6SXNzdWUzMzc1MjM3MTU=","number":1021,"title":"Can we use a code formater?","user":{"login":"supermerill","id":6536403,"node_id":"MDQ6VXNlcjY1MzY0MDM=","avatar_url":"https://avatars1.githubusercontent.com/u/6536403?v=4","gravatar_id":"","url":"https://api.github.com/users/supermerill","html_url":"https://github.com/supermerill","followers_url":"https://api.github.com/users/supermerill/followers","following_url":"https://api.github.com/users/supermerill/following{/other_user}","gists_url":"https://api.github.com/users/supermerill/gists{/gist_id}","starred_url":"https://api.github.com/users/supermerill/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/supermerill/subscriptions","organizations_url":"https://api.github.com/users/supermerill/orgs","repos_url":"https://api.github.com/users/supermerill/repos","events_url":"https://api.github.com/users/supermerill/events{/privacy}","received_events_url":"https://api.github.com/users/supermerill/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":13,"created_at":"2018-07-02T13:40:55Z","updated_at":"2018-07-26T16:59:12Z","closed_at":null,"author_association":"NONE","body":"I am a bit bothered\r\nEvery file has \\t or 4 space or both and it's a mess.\r\nSometimes, braces are removed, sometimes they are here.\r\nSometimes there are the new foreach, sometimes the old for(begin;end;++)\r\n\r\nCan we agree to a common coding style for the futures commits?\r\nMaybe not enforcing it harshly but something to help people to contribute more easily, to keep a good base code.\r\nExemple: when using auto is okay, preferring using the foreach when possible, using tabs instead of spaces, using braces everywhere (even when there are only one statement after, because it's safer), inserting a space between each operator (=+*-/|&),  etc....\r\nBecause it's your code, it's up to you to decide what you want.\r\n\r\nexemples: configWizard.cpp (some month old) and Serial.cpp (some month old also)"},"comment":{"url":"https://api.github.com/repos/prusa3d/Slic3r/issues/comments/408164838","html_url":"https://github.com/prusa3d/Slic3r/issues/1021#issuecomment-408164838","issue_url":"https://api.github.com/repos/prusa3d/Slic3r/issues/1021","id":408164838,"node_id":"MDEyOklzc3VlQ29tbWVudDQwODE2NDgzOA==","user":{"login":"bubnikv","id":5830947,"node_id":"MDQ6VXNlcjU4MzA5NDc=","avatar_url":"https://avatars1.githubusercontent.com/u/5830947?v=4","gravatar_id":"","url":"https://api.github.com/users/bubnikv","html_url":"https://github.com/bubnikv","followers_url":"https://api.github.com/users/bubnikv/followers","following_url":"https://api.github.com/users/bubnikv/following{/other_user}","gists_url":"https://api.github.com/users/bubnikv/gists{/gist_id}","starred_url":"https://api.github.com/users/bubnikv/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bubnikv/subscriptions","organizations_url":"https://api.github.com/users/bubnikv/orgs","repos_url":"https://api.github.com/users/bubnikv/repos","events_url":"https://api.github.com/users/bubnikv/events{/privacy}","received_events_url":"https://api.github.com/users/bubnikv/received_events","type":"User","site_admin":false},"created_at":"2018-07-26T16:59:12Z","updated_at":"2018-07-26T16:59:12Z","author_association":"COLLABORATOR","body":"> I can see big ugly line, that i think are not making many sense:\r\n\r\nThat is an indicator, that Prusa Research cares for its employees, and we are working with a top notch hardware :-)\r\n\r\nThe line does not fit MY monitor, so is too long.\r\n\r\nI just checked some of the lines I wrote, they are up to 180 characters long. It is difficult to work with such code on my laptop screen. The particular line you referenced is 232 characters long, but I have found one, which is 255 characters long. Clearly, @lukasmatena has a much better eye sight than me (he sits next to me and his monitor is the same size as mine).\r\n\r\n```\r\nstd::vector<Region> &by_region_specific = island.by_region;\r\n// some useful comment do write about the if like:\r\n// if some regions are overriden, create a new vector without them inside\r\nif(const_cast<LayerTools&>(layer_tools).wiping_extrusions().is_anything_overridden()) {\r\n    by_region_specific = island.by_region_per_copy(copy_id, extruder_id, 0 != print_wipe_extrusions);\r\n}\r\n```\r\nThis does something different from the original code by @lukasmatena . Yours would overwrite the content of island.by_region, so it is not correct. IMHO @lukasmatena 's code is just fine, but with a worse eye sight, therefore a bigger font on my screen, I would break the line into two lines. But I think this is a detail, and correctness is much more important than following a precise coding guideline. You can always enable word wrapping in your editor.\r\n\r\n> Also, can we ban the auto keyword, unless for special cases like for an iterator?\r\n\r\nWould you enumerate the special cases? There are many cases, like \r\n```\r\nauto v = new SomeClass()\r\n```\r\nwhere the use of auto is desirable, not just allowed.\r\n\r\nI agree with @supermerill though, that in this particular case I would personally not use auto, as the return type is not obvious. We will discuss this topic internally.\r\n"}}
{"actor":{"display_login":"bubnikv"}}