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). 

+1 for automatic code review that can enforce coding style, security and
sanity checks, ... 

-- 
Sébastien BLAISOT

Le 08/06/2015 09:22, Daniel Schürmann a écrit : 

> Hi, 
> 
> I have some good experience with the Eclipse Formatter: 
> 
> http://www.mixxx.org/wiki/doku.php/eclipse?s[]=eclipse#eclipse_code_formatter 
> [1]
> 
> We have to be careful not to put clutter on a PR just because using an auto 
> formatter. This may happens if an auto formatter changes code that already 
> meets the requirements.
> 
> Therefor I prefer the way Eclipse works, It supports you as much as possible 
> while editing. It does not reformat the code except you ask for it 
> "Ctrl-Shift-F"
> 
> What may help, In the Mixxx project is a build chain tool that warns about 
> code style violations.
> 
> Kind regards, 
> 
> Daniel 
> 
> 2015-06-07 11:54 GMT+02:00 Max Linke <max_li...@gmx.de>:
> There is really no way to port this. It is the configuration file for 
> `clang-format` a separate program. Since I only use emacs I don't know how to 
> best use it in other editors.
> 
> you can find more information here
> http://clang.llvm.org/docs/ClangFormat.html [2]
> 
> Just try to google clang-format + your favorite editor
> 
> ecplise: https://github.com/wangzw/cppstyle [3]
> sublime: https://github.com/rosshemsley/SublimeClangFormat [4]
> creator: 
> https://www.snip2code.com/Snippet/11436/Configuration-of-clang-format-for-QtCrea
>  [5]
> 
> You can also always use it from the CLI
> 
> clang-format -i [file1 ... ]
> 
> I missed some indentation settings in the yesterday. Attached is an updated 
> file.
> 
> best Max 
> 
> On 06/07/2015 11:18 AM, Tuukka Pasanen wrote:
> Hello,
> Can you port this to astyle because not everyone are using Emacs or
> something silmilar for more convient use.
> 
> Thanks,
> Tuukka
> 
> 2015-06-06 21:43 GMT+03:00 Max Linke <max_li...@gmx.de>:
> Hi
> 
> We had some recurring discussions in the PR about coding style. I have
> recently started to rely on clang-format with a set of predefined rules. My
> emacs is configured to apply this always before I save a file. I personally
> find that really nice and relaxing, I don't need to format my code manually
> anymore and every time I touch a file it automatically looks nice.
> 
> I attached the clang-format file I use for mixxx. It is based on the Google
> style with our indentation rules.
> 
> This would also help in a PR because we can just point them to clang-format.
> 
> I don't have experience with other editors besides emacs but I guess it
> should be also possible in a something like vim or eclipse.
> 
> What do you think? Would others like to use this as well?
> 
> best Max
> 
> ------------------------------------------------------------------------------
> 
> _______________________________________________
> Get Mixxx, the #1 Free MP3 DJ Mixing software Today
> http://mixxx.org [6]
> 
> Mixxx-devel mailing list
> Mixxx-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/mixxx-devel [7] 
> ------------------------------------------------------------------------------
> _______________________________________________
> Get Mixxx, the #1 Free MP3 DJ Mixing software Today
> http://mixxx.org [6]
> 
> Mixxx-devel mailing list
> Mixxx-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/mixxx-devel [7]

------------------------------------------------------------------------------

_______________________________________________
 Get Mixxx, the #1 Free MP3 DJ Mixing software Today
 http://mixxx.org [6]

 Mixxx-devel mailing list
 Mixxx-devel@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/mixxx-devel [7] 

------------------------------------------------------------------------------

_______________________________________________
Get Mixxx, the #1 Free MP3 DJ Mixing software Today
http://mixxx.org [6]

Mixxx-devel mailing list
Mixxx-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mixxx-devel [7]

 

Links:
------
[1]
http://www.mixxx.org/wiki/doku.php/eclipse?s[]=eclipse#eclipse_code_formatter
[2] http://clang.llvm.org/docs/ClangFormat.html
[3] https://github.com/wangzw/cppstyle
[4] https://github.com/rosshemsley/SublimeClangFormat
[5]
https://www.snip2code.com/Snippet/11436/Configuration-of-clang-format-for-QtCrea
[6] http://mixxx.org
[7] 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

Reply via email to