Re: [Mixxx-devel] Fwd: Re: formating source Code with clang-format
Hello, I'm with auto formatting people. Before we had code auto formatting it was mostly complaining coding style. Now like RJ said nobody can argue because there is one to rule them all system. I also like to see cppcheck and flawfinder style hooks to check code for dummy mistakes. Never seen astyle has broke something like code didn't work anymore. Thanks, Tuukka 09.06.2015, 23:48, RJ Ryan kirjoitti: On Tue, Jun 9, 2015 at 4:43 PM, RJ Ryan rr...@mixxx.org mailto:rr...@mixxx.org wrote: I can remember that RJs biggest issue in the clang autotransformer was the alignment with the openparenthesis. If we set it just to double indent most issues should be solved (sove-able) FWIW this was Emacs code formatting, not clang-format. I don't believe I ever shared the results of my previous experiments with using clang-format in mixxx. BTW: https://bugs.launchpad.net/bugs/1392757 -- ___ Get Mixxx, the #1 Free MP3 DJ Mixing software Today http://mixxx.org Mixxx-devel mailing list Mixxx-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/mixxx-devel -- ___ Get Mixxx, the #1 Free MP3 DJ Mixing software Today http://mixxx.org Mixxx-devel mailing list Mixxx-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/mixxx-devel
Re: [Mixxx-devel] Fwd: Re: formating source Code with clang-format
On Tue, Jun 9, 2015 at 4:37 PM, Daniel Schürmann dasch...@mixxx.org wrote: Hi I have very bad experience in a similar size closed source project. The code was cluttered and the source control blame feature broken When a line is auto-formatted you can just blame from that revision to find the real line. How often do we run git blame versus argue about style on a PR? We finally revert all the auto formated stuff. It works beautifully at Google -- nobody wastes any time worrying about formatting while writing code or code reviewing for style issues anymore. It's a gigantic time saver. IMHO a code style checker will help to get around the noise in the PRs. We can also provide an auto-formater for manual use. I can remember that RJs biggest issue in the clang autotransformer was the alignment with the open parenthesis. If we set it just to double indent most issues should be solved (sove-able) IMHO the open parenthesis alignment needs a developer to check if the readability is actually improved. Basically, the way you do it is you say whatever clang-format does is correct and stop worrying about it. I know you dislike certain aspects of Google C++ style -- and in our previous discussions I've allowed you to just change our style guide because I didn't want to waste any more time arguing with you. So this is a solution to that problem. Uwe and I had a code style discussion during the review of the Sound Source branch. After Uwe relies on the Eclipse formatter, which also just uses double indent for line brakes all issues were gone. So there is no need to change our code style and reformat the whole Mixxx source to a new style. I disagree! Kind regards, Daniel Am 09.06.2015 um 22:08 schrieb RJ Ryan: I'm for this -- we waste too much time arguing about code style and spend way too much time cleaning up code. We do differ from Google C++ style in certain ways. I'm for eliminating most of the differences. We should do a 1-step reformat-the-world and then distribute a commit hook to reformat. That will prevent a lot of unrelated noise in PRs. It looks like reformatting the world will change about 32k lines. That's a small price to pay for never having to worry about this again. On Mon, Jun 8, 2015 at 4:50 AM, Max Linke max_li...@gmx.de wrote: On 06/08/2015 09:51 AM, Sébastien BLAISOT wrote: Hi, I did recently, as asked by RJ, added some coding style commit in a PR, particularly on the following rule: _Plain-text comments should be separated from the comment symbol by a single space. Commented-out code should have no space between the comment symbol and the code_ I'm not sure that this kind of rule can be automatically enforced (detecting if comment is code or plain text is not easy). Yeah this is not possible. The best solution would be to delete the dead-code. We actually have some useful dead debug statements somewhere but most code gets deleted eventually anyway. And personally I'm not so set on the spacing rule for code vs text comments. Every commenting engine I used so far can't handle this case. +1 for automatic code review that can enforce coding style, security and sanity checks, ... -- ___ Get Mixxx, the #1 Free MP3 DJ Mixing software Today http://mixxx.org Mixxx-devel mailing list Mixxx-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/mixxx-devel -- ___ Get Mixxx, the #1 Free MP3 DJ Mixing software Todayhttp://mixxx.org Mixxx-devel mailing listMixxx-devel@lists.sourceforge.nethttps://lists.sourceforge.net/lists/listinfo/mixxx-devel -- ___ Get Mixxx, the #1 Free MP3 DJ Mixing software Today http://mixxx.org Mixxx-devel mailing list Mixxx-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/mixxx-devel -- ___ Get Mixxx, the #1 Free MP3 DJ Mixing software Today http://mixxx.org Mixxx-devel mailing list Mixxx-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/mixxx-devel
[Mixxx-devel] Fwd: Re: formating source Code with clang-format
Hi I have very bad experience in a similar size closed source project. The code was cluttered and the source control blame feature broken We finally revert all the auto formated stuff. IMHO a code style checker will help to get around the noise in the PRs. We can also provide an auto-formater for manual use. I can remember that RJs biggest issue in the clang autotransformer was the alignment with the openparenthesis. If we set it just to double indent most issues should be solved (sove-able) IMHO the openparenthesis alignment needs a developer to check if the readability is actually improved. Uwe and I had a code style discussion during the review of the Sound Source branch. After Uwe relies on the Eclipse formatter, which also just uses double indent for line brakes all issues were gone. So there is no need to change our code style and reformat the whole Mixxx source to a new style. Kind regards, Daniel Am 09.06.2015 um 22:08 schrieb RJ Ryan: I'm for this -- we waste too much time arguing about code style and spend way too much time cleaning up code. We do differ from Google C++ style in certain ways. I'm for eliminating most of the differences. We should do a 1-step reformat-the-world and then distribute a commit hook to reformat. That will prevent a lot of unrelated noise in PRs. It looks like reformatting the world will change about 32k lines. That's a small price to pay for never having to worry about this again. On Mon, Jun 8, 2015 at 4:50 AM, Max Linke max_li...@gmx.de mailto:max_li...@gmx.de wrote: On 06/08/2015 09:51 AM, Sébastien BLAISOT wrote: Hi, I did recently, as asked by RJ, added some coding style commit in a PR, particularly on the following rule: _Plain-text comments should be separated from the comment symbol by a single space. Commented-out code should have no space between the comment symbol and the code_ I'm not sure that this kind of rule can be automatically enforced (detecting if comment is code or plain text is not easy). Yeah this is not possible. The best solution would be to delete the dead-code. We actually have some useful dead debug statements somewhere but most code gets deleted eventually anyway. And personally I'm not so set on the spacing rule for code vs text comments. Every commenting engine I used so far can't handle this case. +1 for automatic code review that can enforce coding style, security and sanity checks, ... -- ___ Get Mixxx, the #1 Free MP3 DJ Mixing software Today http://mixxx.org Mixxx-devel mailing list Mixxx-devel@lists.sourceforge.net mailto:Mixxx-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/mixxx-devel -- ___ Get Mixxx, the #1 Free MP3 DJ Mixing software Today http://mixxx.org Mixxx-devel mailing list Mixxx-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/mixxx-devel -- ___ Get Mixxx, the #1 Free MP3 DJ Mixing software Today http://mixxx.org Mixxx-devel mailing list Mixxx-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/mixxx-devel
Re: [Mixxx-devel] Fwd: Re: formating source Code with clang-format
On Tue, Jun 9, 2015 at 4:43 PM, RJ Ryan rr...@mixxx.org wrote: I can remember that RJs biggest issue in the clang autotransformer was the alignment with the open parenthesis. If we set it just to double indent most issues should be solved (sove-able) FWIW this was Emacs code formatting, not clang-format. I don't believe I ever shared the results of my previous experiments with using clang-format in mixxx. BTW: https://bugs.launchpad.net/bugs/1392757 -- ___ Get Mixxx, the #1 Free MP3 DJ Mixing software Today http://mixxx.org Mixxx-devel mailing list Mixxx-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/mixxx-devel