Re: [shogun] Automatize Code Style Checks

2017-04-05 Thread Heiko Strathmann


On Wed, 5 Apr 2017 at 10:19, Fernando J. Iglesias García <
fernando.igles...@shogun-toolbox.org> wrote:

> Automatising style checks is indeed something very nice to have.
>
> I think it is worth to take into account that labelling a PR as failure
> because of style failures might make the process of getting into
> contributing to Shogun less friendly for newcomers.
>
> On 5 April 2017 at 10:10, Viktor Gal  wrote:
>
> Hi Giovanni
>
> great idea! there’s already a clang-format file in my shogun folder for a
> while… but it was never finished as there was always something else to be
> worked on. lemme try to dig it up for you the formatting file - as far as
> i’ve got with it - and then we could finish that together? + add the format
> checking into the travis...
>
> cheers,
> viktor
>
>
> > On 5 Apr 2017, at 3:47 PM, Giovanni De Toni 
> wrote:
> >
> > Hello everybody,
> >
> > Since I noticed that many of the developers' comments on PRs are
> targeted to fix code formatting and style, I thought it would be very
> useful to have a way to reduce the time spent on these small issues (and
> therefore, gain more time to focus on the "working" code).
> >
> > There is a tool called `clang-format` that can be used to format a piece
> of code to follow predefined style guidelines. There is also a python
> script called `git-clang-format` that can be used to check if commits
> respect these guidelines and to produce diffs (with newly formatted code)
> that can be later applied with the `git apply` command.
> >
> > It is also possible to configure Travis to make a build fail if the code
> is not consistent with the coding conventions. For example, ROOT is a big
> project that uses this approach to validate its PRs.
> >
> > We could make our personalized clang-format configuration (that is
> almost trivial) and simply write a custom script which will be executed by
> Travis before the build process to make sure that all the code submitted is
> well written.
> >
> > I think this could be a great addition to the project since it will
> produce a more readable and consistent Shogun codebase over time.
> >
> > Here some further references:
> >   • https://clang.llvm.org/docs/ClangFormat.html
> >   • https://clang.llvm.org/docs/ClangFormatStyleOptions.html
> >   •
> https://github.com/llvm-mirror/clang/blob/master/tools/clang-format/git-clang-format
> > What do you think? Could it be worth the effort?
> >
> > Cheers,
> > Giovanni De Toni
>
>
>
> --
Sent from my phone


Re: [shogun] Automatize Code Style Checks

2017-04-05 Thread Fernando J . Iglesias García
Automatising style checks is indeed something very nice to have.

I think it is worth to take into account that labelling a PR as failure
because of style failures might make the process of getting into
contributing to Shogun less friendly for newcomers.

On 5 April 2017 at 10:10, Viktor Gal  wrote:

> Hi Giovanni
>
> great idea! there’s already a clang-format file in my shogun folder for a
> while… but it was never finished as there was always something else to be
> worked on. lemme try to dig it up for you the formatting file - as far as
> i’ve got with it - and then we could finish that together? + add the format
> checking into the travis...
>
> cheers,
> viktor
>
>
> > On 5 Apr 2017, at 3:47 PM, Giovanni De Toni 
> wrote:
> >
> > Hello everybody,
> >
> > Since I noticed that many of the developers' comments on PRs are
> targeted to fix code formatting and style, I thought it would be very
> useful to have a way to reduce the time spent on these small issues (and
> therefore, gain more time to focus on the "working" code).
> >
> > There is a tool called `clang-format` that can be used to format a piece
> of code to follow predefined style guidelines. There is also a python
> script called `git-clang-format` that can be used to check if commits
> respect these guidelines and to produce diffs (with newly formatted code)
> that can be later applied with the `git apply` command.
> >
> > It is also possible to configure Travis to make a build fail if the code
> is not consistent with the coding conventions. For example, ROOT is a big
> project that uses this approach to validate its PRs.
> >
> > We could make our personalized clang-format configuration (that is
> almost trivial) and simply write a custom script which will be executed by
> Travis before the build process to make sure that all the code submitted is
> well written.
> >
> > I think this could be a great addition to the project since it will
> produce a more readable and consistent Shogun codebase over time.
> >
> > Here some further references:
> >   • https://clang.llvm.org/docs/ClangFormat.html
> >   • https://clang.llvm.org/docs/ClangFormatStyleOptions.html
> >   • https://github.com/llvm-mirror/clang/blob/master/
> tools/clang-format/git-clang-format
> > What do you think? Could it be worth the effort?
> >
> > Cheers,
> > Giovanni De Toni
>
>
>


Re: [shogun] Automatize Code Style Checks

2017-04-05 Thread Viktor Gal
Hi Giovanni

great idea! there’s already a clang-format file in my shogun folder for a 
while… but it was never finished as there was always something else to be 
worked on. lemme try to dig it up for you the formatting file - as far as i’ve 
got with it - and then we could finish that together? + add the format checking 
into the travis...

cheers,
viktor


> On 5 Apr 2017, at 3:47 PM, Giovanni De Toni  wrote:
> 
> Hello everybody,
> 
> Since I noticed that many of the developers' comments on PRs are targeted to 
> fix code formatting and style, I thought it would be very useful to have a 
> way to reduce the time spent on these small issues (and therefore, gain more 
> time to focus on the "working" code).
> 
> There is a tool called `clang-format` that can be used to format a piece of 
> code to follow predefined style guidelines. There is also a python script 
> called `git-clang-format` that can be used to check if commits respect these 
> guidelines and to produce diffs (with newly formatted code) that can be later 
> applied with the `git apply` command.
> 
> It is also possible to configure Travis to make a build fail if the code is 
> not consistent with the coding conventions. For example, ROOT is a big 
> project that uses this approach to validate its PRs.
> 
> We could make our personalized clang-format configuration (that is almost 
> trivial) and simply write a custom script which will be executed by Travis 
> before the build process to make sure that all the code submitted is well 
> written.
> 
> I think this could be a great addition to the project since it will produce a 
> more readable and consistent Shogun codebase over time.
> 
> Here some further references:
>   • https://clang.llvm.org/docs/ClangFormat.html
>   • https://clang.llvm.org/docs/ClangFormatStyleOptions.html
>   • 
> https://github.com/llvm-mirror/clang/blob/master/tools/clang-format/git-clang-format
> What do you think? Could it be worth the effort?
> 
> Cheers,
> Giovanni De Toni




[shogun] Automatize Code Style Checks

2017-04-05 Thread Giovanni De Toni
Hello everybody,

Since I noticed that many of the developers' comments on PRs are targeted
to fix code formatting and style, I thought it would be very useful to have
a way to reduce the time spent on these small issues (and therefore, gain
more time to focus on the "working" code).

There is a tool called `clang-format` that can be used to format a piece of
code to follow predefined style guidelines. There is also a python script
called `git-clang-format` that can be used to check if commits respect
these guidelines and to produce diffs (with newly formatted code) that can
be later applied with the `git apply` command.

It is also possible to configure Travis to make a build fail if the code is
not consistent with the coding conventions. For example, ROOT
 is a big project that uses this
approach to validate its PRs.

We could make our personalized clang-format configuration (that is almost
trivial) and simply write a custom script which will be executed by Travis
before the build process to make sure that all the code submitted is well
written.

I think this could be a great addition to the project since it will produce
a more readable and consistent Shogun codebase over time.

Here some further references:

   - https://clang.llvm.org/docs/ClangFormat.html
   - https://clang.llvm.org/docs/ClangFormatStyleOptions.html
   - https://github.com/llvm-mirror/clang/blob/master/
   tools/clang-format/git-clang-format
   


What do you think? Could it be worth the effort?

Cheers,
Giovanni De Toni