Re: [PROPOSAL] Add spotless to Karaf and subprojects

2018-12-01 Thread Jean-Baptiste Onofré

Thanks Robert,

I like what you did. spotless suppots checkstyle formatter, so, I can 
use a modified odl_checks.xml.


I will update the PR accordingly.

Regards
JB

On 01/12/2018 10:02, Robert Varga wrote:

On 30/11/2018 15:50, Jean-Baptiste Onofré wrote:

Hi Lukasz,

I tried to use the "standard" style supported by spotless. It's also
possible to use a custom eclipse formatter.


FWIW, in ODL we started off with Google formatting (if I remember
correctly, it's 5+ years now), but decided to tweak it:

- max columns = 120
- indent = 4
- imports: groups only for static/non-static, alpha-sorted
- curly braces are never standalone (to save vertical space)

The resulting (checkstyle) rules are at
https://github.com/opendaylight/odlparent/blob/master/checkstyle/src/main/resources/odl_checks.xml

Regards,
Robert




Does it what you are proposing ?

I can do that if you think it's a better way.

Thanks
Regards
JB

On 30/11/2018 14:26, Łukasz Dywicki wrote:

I'm not entirely sure if style which gets promoted is not too "wide". I
love approach as it reduces to bare minimum fights between IDEs and
their way of ordering imports and so on and makes PR review process just
simpler.

Some points for formatter and verbosity of some elements:
1. Two extra tabs after field doesn't make 80-100 margin:
 private static final EventImpl STOP_EVENT =
 new EventImpl(new Event("stop", Collections.emptyMap()));


2. Extra tabs for lambdas which are just taking space:
 return () ->
 new Iterator() {

3. Double indention for case statements:

 case Event.TYPE_LOGIN:
 {
 append(event, "username");
 break;
 }


Not sure how former standard java formatting rules or Sun style was
made, however its a minor thing.
Similar approach is used within Eclipse Smarthome and its fine. At
beginning its a pain when maven reports you - add comment here, add
comment there, but once you get used to it it pays off.

Cheers,
Lukasz


On 23.11.2018 06:19, Jean-Baptiste Onofré wrote:

Hi guys,

Thoughts about spotless ?

https://github.com/apache/karaf/pull/648

I will update the PR today.

Agree to apply spotless or we just avoid this for now ? Shall I start a
formal vote ?

Thanks !
Regards
JB

On 07/11/2018 05:43, Jean-Baptiste Onofré wrote:

Hi team,

I created a PR (https://github.com/apache/karaf/pull/648) to enable
spotless in Karaf.

Spotless is code style checker but also formatter.

The spotless profile I added in the PR check the style and the style can
be automatically fixed using mvn spotless:apply -Pspotless.

I think it would be great to have this in Karaf and subprojects to have
a consistency in our code style.

In combination with rat, it gives us a much cleaner code.

On the other hand, I was planning to add findbugs maven plugin as well.

Thoughts ?

Thanks,
Regards
JB









Re: [PROPOSAL] Add spotless to Karaf and subprojects

2018-12-01 Thread Robert Varga
On 30/11/2018 15:50, Jean-Baptiste Onofré wrote:
> Hi Lukasz,
> 
> I tried to use the "standard" style supported by spotless. It's also
> possible to use a custom eclipse formatter.

FWIW, in ODL we started off with Google formatting (if I remember
correctly, it's 5+ years now), but decided to tweak it:

- max columns = 120
- indent = 4
- imports: groups only for static/non-static, alpha-sorted
- curly braces are never standalone (to save vertical space)

The resulting (checkstyle) rules are at
https://github.com/opendaylight/odlparent/blob/master/checkstyle/src/main/resources/odl_checks.xml

Regards,
Robert


> 
> Does it what you are proposing ?
> 
> I can do that if you think it's a better way.
> 
> Thanks
> Regards
> JB
> 
> On 30/11/2018 14:26, Łukasz Dywicki wrote:
>> I'm not entirely sure if style which gets promoted is not too "wide". I
>> love approach as it reduces to bare minimum fights between IDEs and
>> their way of ordering imports and so on and makes PR review process just
>> simpler.
>>
>> Some points for formatter and verbosity of some elements:
>> 1. Two extra tabs after field doesn't make 80-100 margin:
>> private static final EventImpl STOP_EVENT =
>> new EventImpl(new Event("stop", Collections.emptyMap()));
>>
>>
>> 2. Extra tabs for lambdas which are just taking space:
>> return () ->
>> new Iterator() {
>>
>> 3. Double indention for case statements:
>>
>> case Event.TYPE_LOGIN:
>> {
>> append(event, "username");
>> break;
>> }
>>
>>
>> Not sure how former standard java formatting rules or Sun style was
>> made, however its a minor thing.
>> Similar approach is used within Eclipse Smarthome and its fine. At
>> beginning its a pain when maven reports you - add comment here, add
>> comment there, but once you get used to it it pays off.
>>
>> Cheers,
>> Lukasz
>>
>>
>> On 23.11.2018 06:19, Jean-Baptiste Onofré wrote:
>>> Hi guys,
>>>
>>> Thoughts about spotless ?
>>>
>>> https://github.com/apache/karaf/pull/648
>>>
>>> I will update the PR today.
>>>
>>> Agree to apply spotless or we just avoid this for now ? Shall I start a
>>> formal vote ?
>>>
>>> Thanks !
>>> Regards
>>> JB
>>>
>>> On 07/11/2018 05:43, Jean-Baptiste Onofré wrote:
 Hi team,

 I created a PR (https://github.com/apache/karaf/pull/648) to enable
 spotless in Karaf.

 Spotless is code style checker but also formatter.

 The spotless profile I added in the PR check the style and the style can
 be automatically fixed using mvn spotless:apply -Pspotless.

 I think it would be great to have this in Karaf and subprojects to have
 a consistency in our code style.

 In combination with rat, it gives us a much cleaner code.

 On the other hand, I was planning to add findbugs maven plugin as well.

 Thoughts ?

 Thanks,
 Regards
 JB

>>>
> 



signature.asc
Description: OpenPGP digital signature


Re: [PROPOSAL] Add spotless to Karaf and subprojects

2018-11-30 Thread Jean-Baptiste Onofré
Hi Lukasz,

I tried to use the "standard" style supported by spotless. It's also
possible to use a custom eclipse formatter.

Does it what you are proposing ?

I can do that if you think it's a better way.

Thanks
Regards
JB

On 30/11/2018 14:26, Łukasz Dywicki wrote:
> I'm not entirely sure if style which gets promoted is not too "wide". I
> love approach as it reduces to bare minimum fights between IDEs and
> their way of ordering imports and so on and makes PR review process just
> simpler.
> 
> Some points for formatter and verbosity of some elements:
> 1. Two extra tabs after field doesn't make 80-100 margin:
> private static final EventImpl STOP_EVENT =
> new EventImpl(new Event("stop", Collections.emptyMap()));
> 
> 
> 2. Extra tabs for lambdas which are just taking space:
> return () ->
> new Iterator() {
> 
> 3. Double indention for case statements:
> 
> case Event.TYPE_LOGIN:
> {
> append(event, "username");
> break;
> }
> 
> 
> Not sure how former standard java formatting rules or Sun style was
> made, however its a minor thing.
> Similar approach is used within Eclipse Smarthome and its fine. At
> beginning its a pain when maven reports you - add comment here, add
> comment there, but once you get used to it it pays off.
> 
> Cheers,
> Lukasz
> 
> 
> On 23.11.2018 06:19, Jean-Baptiste Onofré wrote:
>> Hi guys,
>>
>> Thoughts about spotless ?
>>
>> https://github.com/apache/karaf/pull/648
>>
>> I will update the PR today.
>>
>> Agree to apply spotless or we just avoid this for now ? Shall I start a
>> formal vote ?
>>
>> Thanks !
>> Regards
>> JB
>>
>> On 07/11/2018 05:43, Jean-Baptiste Onofré wrote:
>>> Hi team,
>>>
>>> I created a PR (https://github.com/apache/karaf/pull/648) to enable
>>> spotless in Karaf.
>>>
>>> Spotless is code style checker but also formatter.
>>>
>>> The spotless profile I added in the PR check the style and the style can
>>> be automatically fixed using mvn spotless:apply -Pspotless.
>>>
>>> I think it would be great to have this in Karaf and subprojects to have
>>> a consistency in our code style.
>>>
>>> In combination with rat, it gives us a much cleaner code.
>>>
>>> On the other hand, I was planning to add findbugs maven plugin as well.
>>>
>>> Thoughts ?
>>>
>>> Thanks,
>>> Regards
>>> JB
>>>
>>

-- 
Jean-Baptiste Onofré
jbono...@apache.org
http://blog.nanthrax.net
Talend - http://www.talend.com


Re: [PROPOSAL] Add spotless to Karaf and subprojects

2018-11-30 Thread Łukasz Dywicki
I'm not entirely sure if style which gets promoted is not too "wide". I
love approach as it reduces to bare minimum fights between IDEs and
their way of ordering imports and so on and makes PR review process just
simpler.

Some points for formatter and verbosity of some elements:
1. Two extra tabs after field doesn't make 80-100 margin:
private static final EventImpl STOP_EVENT =
new EventImpl(new Event("stop", Collections.emptyMap()));


2. Extra tabs for lambdas which are just taking space:
return () ->
new Iterator() {

3. Double indention for case statements:

case Event.TYPE_LOGIN:
{
append(event, "username");
break;
}


Not sure how former standard java formatting rules or Sun style was
made, however its a minor thing.
Similar approach is used within Eclipse Smarthome and its fine. At
beginning its a pain when maven reports you - add comment here, add
comment there, but once you get used to it it pays off.

Cheers,
Lukasz


On 23.11.2018 06:19, Jean-Baptiste Onofré wrote:
> Hi guys,
> 
> Thoughts about spotless ?
> 
> https://github.com/apache/karaf/pull/648
> 
> I will update the PR today.
> 
> Agree to apply spotless or we just avoid this for now ? Shall I start a
> formal vote ?
> 
> Thanks !
> Regards
> JB
> 
> On 07/11/2018 05:43, Jean-Baptiste Onofré wrote:
>> Hi team,
>>
>> I created a PR (https://github.com/apache/karaf/pull/648) to enable
>> spotless in Karaf.
>>
>> Spotless is code style checker but also formatter.
>>
>> The spotless profile I added in the PR check the style and the style can
>> be automatically fixed using mvn spotless:apply -Pspotless.
>>
>> I think it would be great to have this in Karaf and subprojects to have
>> a consistency in our code style.
>>
>> In combination with rat, it gives us a much cleaner code.
>>
>> On the other hand, I was planning to add findbugs maven plugin as well.
>>
>> Thoughts ?
>>
>> Thanks,
>> Regards
>> JB
>>
> 


Re: [PROPOSAL] Add spotless to Karaf and subprojects

2018-11-22 Thread Francois Papon
Hi JB,

It's good for me, I think we could apply it now.

regards,

François Papon
fpa...@apache.org

Le 23/11/2018 à 09:19, Jean-Baptiste Onofré a écrit :
> Hi guys,
>
> Thoughts about spotless ?
>
> https://github.com/apache/karaf/pull/648
>
> I will update the PR today.
>
> Agree to apply spotless or we just avoid this for now ? Shall I start a
> formal vote ?
>
> Thanks !
> Regards
> JB
>
> On 07/11/2018 05:43, Jean-Baptiste Onofré wrote:
>> Hi team,
>>
>> I created a PR (https://github.com/apache/karaf/pull/648) to enable
>> spotless in Karaf.
>>
>> Spotless is code style checker but also formatter.
>>
>> The spotless profile I added in the PR check the style and the style can
>> be automatically fixed using mvn spotless:apply -Pspotless.
>>
>> I think it would be great to have this in Karaf and subprojects to have
>> a consistency in our code style.
>>
>> In combination with rat, it gives us a much cleaner code.
>>
>> On the other hand, I was planning to add findbugs maven plugin as well.
>>
>> Thoughts ?
>>
>> Thanks,
>> Regards
>> JB
>>



Re: [PROPOSAL] Add spotless to Karaf and subprojects

2018-11-22 Thread Jean-Baptiste Onofré
Hi guys,

Thoughts about spotless ?

https://github.com/apache/karaf/pull/648

I will update the PR today.

Agree to apply spotless or we just avoid this for now ? Shall I start a
formal vote ?

Thanks !
Regards
JB

On 07/11/2018 05:43, Jean-Baptiste Onofré wrote:
> Hi team,
> 
> I created a PR (https://github.com/apache/karaf/pull/648) to enable
> spotless in Karaf.
> 
> Spotless is code style checker but also formatter.
> 
> The spotless profile I added in the PR check the style and the style can
> be automatically fixed using mvn spotless:apply -Pspotless.
> 
> I think it would be great to have this in Karaf and subprojects to have
> a consistency in our code style.
> 
> In combination with rat, it gives us a much cleaner code.
> 
> On the other hand, I was planning to add findbugs maven plugin as well.
> 
> Thoughts ?
> 
> Thanks,
> Regards
> JB
> 

-- 
Jean-Baptiste Onofré
jbono...@apache.org
http://blog.nanthrax.net
Talend - http://www.talend.com


Re: [PROPOSAL] Add spotless to Karaf and subprojects

2018-11-08 Thread Grzegorz Grzybek
Hello



czw., 8 lis 2018 o 20:31 Francois Papon 
napisał(a):

> Hi JB,
>
> The plugins works well (just tested on Vineyard) and I can see that we
> can add the license header in the plugin configuration :
>
> 
>
>/* Licensed under Apache-2.0 */
>${basedir}/license-header
>  
>
> Should we add this ?
>

Nice! Is it as powerful as e.g., com.mycila:license-maven-plugin? This one
can be configured for different kinds of files, with exceptions and special
mappings.

regards
Grzegorz Grzybek


> regards,
>
> François Papon
> fpa...@apache.org
>
> Le 08/11/2018 à 08:54, Jean-Baptiste Onofré a écrit :
> > Hi guys,
> >
> > I updated the PR to use a 4 spaces indent style.
> >
> > Regards
> > JB
> >
> > On 07/11/2018 05:43, Jean-Baptiste Onofré wrote:
> >> Hi team,
> >>
> >> I created a PR (https://github.com/apache/karaf/pull/648) to enable
> >> spotless in Karaf.
> >>
> >> Spotless is code style checker but also formatter.
> >>
> >> The spotless profile I added in the PR check the style and the style can
> >> be automatically fixed using mvn spotless:apply -Pspotless.
> >>
> >> I think it would be great to have this in Karaf and subprojects to have
> >> a consistency in our code style.
> >>
> >> In combination with rat, it gives us a much cleaner code.
> >>
> >> On the other hand, I was planning to add findbugs maven plugin as well.
> >>
> >> Thoughts ?
> >>
> >> Thanks,
> >> Regards
> >> JB
> >>
>
>


Re: [PROPOSAL] Add spotless to Karaf and subprojects

2018-11-08 Thread Jean-Baptiste Onofré
Hi,

yes, I also planned to test XML formatting.

For license header, it's one or another (content or file). I will do
with content, using the complete content we should (with all ASF legal
stuff).

Regards
JB

On 08/11/2018 12:19, Francois Papon wrote:
> Hi JB,
> 
> The plugins works well (just tested on Vineyard) and I can see that we
> can add the license header in the plugin configuration :
> 
> 
>
>/* Licensed under Apache-2.0 */
>${basedir}/license-header
>  
> 
> Should we add this ?
> 
> regards,
> 
> François Papon
> fpa...@apache.org
> 
> Le 08/11/2018 à 08:54, Jean-Baptiste Onofré a écrit :
>> Hi guys,
>>
>> I updated the PR to use a 4 spaces indent style.
>>
>> Regards
>> JB
>>
>> On 07/11/2018 05:43, Jean-Baptiste Onofré wrote:
>>> Hi team,
>>>
>>> I created a PR (https://github.com/apache/karaf/pull/648) to enable
>>> spotless in Karaf.
>>>
>>> Spotless is code style checker but also formatter.
>>>
>>> The spotless profile I added in the PR check the style and the style can
>>> be automatically fixed using mvn spotless:apply -Pspotless.
>>>
>>> I think it would be great to have this in Karaf and subprojects to have
>>> a consistency in our code style.
>>>
>>> In combination with rat, it gives us a much cleaner code.
>>>
>>> On the other hand, I was planning to add findbugs maven plugin as well.
>>>
>>> Thoughts ?
>>>
>>> Thanks,
>>> Regards
>>> JB
>>>
> 
> 

-- 
Jean-Baptiste Onofré
jbono...@apache.org
http://blog.nanthrax.net
Talend - http://www.talend.com


Re: [PROPOSAL] Add spotless to Karaf and subprojects

2018-11-08 Thread Achim Nierbeck
Hi,

why not?
it's worth a try.

regards, achim

Am Do., 8. Nov. 2018 um 20:31 Uhr schrieb Francois Papon <
francois.pa...@openobject.fr>:

> Hi JB,
>
> The plugins works well (just tested on Vineyard) and I can see that we
> can add the license header in the plugin configuration :
>
> 
>
>/* Licensed under Apache-2.0 */
>${basedir}/license-header
>  
>
> Should we add this ?
>
> regards,
>
> François Papon
> fpa...@apache.org
>
> Le 08/11/2018 à 08:54, Jean-Baptiste Onofré a écrit :
> > Hi guys,
> >
> > I updated the PR to use a 4 spaces indent style.
> >
> > Regards
> > JB
> >
> > On 07/11/2018 05:43, Jean-Baptiste Onofré wrote:
> >> Hi team,
> >>
> >> I created a PR (https://github.com/apache/karaf/pull/648) to enable
> >> spotless in Karaf.
> >>
> >> Spotless is code style checker but also formatter.
> >>
> >> The spotless profile I added in the PR check the style and the style can
> >> be automatically fixed using mvn spotless:apply -Pspotless.
> >>
> >> I think it would be great to have this in Karaf and subprojects to have
> >> a consistency in our code style.
> >>
> >> In combination with rat, it gives us a much cleaner code.
> >>
> >> On the other hand, I was planning to add findbugs maven plugin as well.
> >>
> >> Thoughts ?
> >>
> >> Thanks,
> >> Regards
> >> JB
> >>
>
>

-- 

Apache Member
Apache Karaf  Committer & PMC
OPS4J Pax Web  Committer &
Project Lead
blog 
Co-Author of Apache Karaf Cookbook 

Software Architect / Project Manager / Scrum Master


Re: [PROPOSAL] Add spotless to Karaf and subprojects

2018-11-08 Thread Grzegorz Grzybek
Thank you! :)

regards
Grzegorz Grzybek

czw., 8 lis 2018 o 08:45 Jean-Baptiste Onofré  napisał(a):

> Hi guys,
>
> I updated the PR to use a 4 spaces indent style.
>
> Regards
> JB
>
> On 07/11/2018 05:43, Jean-Baptiste Onofré wrote:
> > Hi team,
> >
> > I created a PR (https://github.com/apache/karaf/pull/648) to enable
> > spotless in Karaf.
> >
> > Spotless is code style checker but also formatter.
> >
> > The spotless profile I added in the PR check the style and the style can
> > be automatically fixed using mvn spotless:apply -Pspotless.
> >
> > I think it would be great to have this in Karaf and subprojects to have
> > a consistency in our code style.
> >
> > In combination with rat, it gives us a much cleaner code.
> >
> > On the other hand, I was planning to add findbugs maven plugin as well.
> >
> > Thoughts ?
> >
> > Thanks,
> > Regards
> > JB
> >
>
> --
> Jean-Baptiste Onofré
> jbono...@apache.org
> http://blog.nanthrax.net
> Talend - http://www.talend.com
>


Re: [PROPOSAL] Add spotless to Karaf and subprojects

2018-11-08 Thread Francois Papon
Hi JB,

The plugins works well (just tested on Vineyard) and I can see that we
can add the license header in the plugin configuration :


   
   /* Licensed under Apache-2.0 */
   ${basedir}/license-header
 

Should we add this ?

regards,

François Papon
fpa...@apache.org

Le 08/11/2018 à 08:54, Jean-Baptiste Onofré a écrit :
> Hi guys,
>
> I updated the PR to use a 4 spaces indent style.
>
> Regards
> JB
>
> On 07/11/2018 05:43, Jean-Baptiste Onofré wrote:
>> Hi team,
>>
>> I created a PR (https://github.com/apache/karaf/pull/648) to enable
>> spotless in Karaf.
>>
>> Spotless is code style checker but also formatter.
>>
>> The spotless profile I added in the PR check the style and the style can
>> be automatically fixed using mvn spotless:apply -Pspotless.
>>
>> I think it would be great to have this in Karaf and subprojects to have
>> a consistency in our code style.
>>
>> In combination with rat, it gives us a much cleaner code.
>>
>> On the other hand, I was planning to add findbugs maven plugin as well.
>>
>> Thoughts ?
>>
>> Thanks,
>> Regards
>> JB
>>



Re: [PROPOSAL] Add spotless to Karaf and subprojects

2018-11-07 Thread Jean-Baptiste Onofré
Hi guys,

I updated the PR to use a 4 spaces indent style.

Regards
JB

On 07/11/2018 05:43, Jean-Baptiste Onofré wrote:
> Hi team,
> 
> I created a PR (https://github.com/apache/karaf/pull/648) to enable
> spotless in Karaf.
> 
> Spotless is code style checker but also formatter.
> 
> The spotless profile I added in the PR check the style and the style can
> be automatically fixed using mvn spotless:apply -Pspotless.
> 
> I think it would be great to have this in Karaf and subprojects to have
> a consistency in our code style.
> 
> In combination with rat, it gives us a much cleaner code.
> 
> On the other hand, I was planning to add findbugs maven plugin as well.
> 
> Thoughts ?
> 
> Thanks,
> Regards
> JB
> 

-- 
Jean-Baptiste Onofré
jbono...@apache.org
http://blog.nanthrax.net
Talend - http://www.talend.com


Re: [PROPOSAL] Add spotless to Karaf and subprojects

2018-11-07 Thread Achim Nierbeck
Hi,

the overall idea sounds, good. I'd also would like to have at least 4
spaces for a tab for the indention :)

regards, Achim

Am Mi., 7. Nov. 2018 um 08:46 Uhr schrieb Jean-Baptiste Onofré <
j...@nanthrax.net>:

> Thanks for the update Robert.
>
> That's why I postponed a bit findbugs/spotbugs ;) I'm not super
> confidant in the generated reports ;)
>
> Let's start with spotless first ;)
>
> Regards
> JB
>
> On 07/11/2018 08:00, Robert Varga wrote:
> > On 07/11/2018 05:43, Jean-Baptiste Onofré wrote:
> >> Hi team,
> >
> > Hello JB,
> >
> > [...]
> >
> >> On the other hand, I was planning to add findbugs maven plugin as well.
> >
> > findbugs is dead, spotbugs is its replacement. A word of caution: it's
> > null analysis leaves quite a bit to be desired, as it simply does not
> > grok TYPE_USE annotations (
> https://github.com/spotbugs/spotbugs/issues/643).
> >
> > Regards,
> > Robert
> >
>
> --
> Jean-Baptiste Onofré
> jbono...@apache.org
> http://blog.nanthrax.net
> Talend - http://www.talend.com
>


-- 

Apache Member
Apache Karaf  Committer & PMC
OPS4J Pax Web  Committer &
Project Lead
blog 
Co-Author of Apache Karaf Cookbook 

Software Architect / Project Manager / Scrum Master


Re: [PROPOSAL] Add spotless to Karaf and subprojects

2018-11-06 Thread Jean-Baptiste Onofré
Thanks for the update Robert.

That's why I postponed a bit findbugs/spotbugs ;) I'm not super
confidant in the generated reports ;)

Let's start with spotless first ;)

Regards
JB

On 07/11/2018 08:00, Robert Varga wrote:
> On 07/11/2018 05:43, Jean-Baptiste Onofré wrote:
>> Hi team,
> 
> Hello JB,
> 
> [...]
> 
>> On the other hand, I was planning to add findbugs maven plugin as well.
> 
> findbugs is dead, spotbugs is its replacement. A word of caution: it's
> null analysis leaves quite a bit to be desired, as it simply does not
> grok TYPE_USE annotations (https://github.com/spotbugs/spotbugs/issues/643).
> 
> Regards,
> Robert
> 

-- 
Jean-Baptiste Onofré
jbono...@apache.org
http://blog.nanthrax.net
Talend - http://www.talend.com


Re: [PROPOSAL] Add spotless to Karaf and subprojects

2018-11-06 Thread Robert Varga
On 07/11/2018 05:43, Jean-Baptiste Onofré wrote:
> Hi team,

Hello JB,

[...]

> On the other hand, I was planning to add findbugs maven plugin as well.

findbugs is dead, spotbugs is its replacement. A word of caution: it's
null analysis leaves quite a bit to be desired, as it simply does not
grok TYPE_USE annotations (https://github.com/spotbugs/spotbugs/issues/643).

Regards,
Robert



signature.asc
Description: OpenPGP digital signature


Re: [PROPOSAL] Add spotless to Karaf and subprojects

2018-11-06 Thread Jean-Baptiste Onofré
Hi Greg,

Yes it's fully configurable.

In the PR I'm using the default Google format, which use 2 spaces by
default. I can use a different formatter (eclipse, or google with the
same style we have today).

Let me update the PR.

Regards
JB

On 07/11/2018 06:48, Grzegorz Grzybek wrote:
> Hello
> 
> Wait - 2 spaces? -1 for that. Is this configurable?
> I've never seen project using two spaces (maybe in some
> JavaScript/TypeScript ones). I'm generally +1 for this kind of
> checker/formatter, but such huge one-time change breaks "diffability". I
> would like to have this profile available, but with more common
> configuration - like 4 spaces we had before.
> 
> Also:
> 
>     switch (event.type()) {
>   case Event.TYPE_SHELL:
>     {
> 
> ?
> 
> I know:
> 
> 
> 
> image.png
> But let's review the configuration of this plugin please ;) Also, is
> there Eclipse/IDEA configuration/plugin available?
> 
> regards
> Grzegorz Grzybek
> 

-- 
Jean-Baptiste Onofré
jbono...@apache.org
http://blog.nanthrax.net
Talend - http://www.talend.com


Re: [PROPOSAL] Add spotless to Karaf and subprojects

2018-11-06 Thread Grzegorz Grzybek
Hello

Wait - 2 spaces? -1 for that. Is this configurable?
I've never seen project using two spaces (maybe in some
JavaScript/TypeScript ones). I'm generally +1 for this kind of
checker/formatter, but such huge one-time change breaks "diffability". I
would like to have this profile available, but with more common
configuration - like 4 spaces we had before.

Also:

switch (event.type()) {
  case Event.TYPE_SHELL:
{

?

I know:



[image: image.png]
But let's review the configuration of this plugin please ;) Also, is there
Eclipse/IDEA configuration/plugin available?

regards
Grzegorz Grzybek


Re: [PROPOSAL] Add spotless to Karaf and subprojects

2018-11-06 Thread Francois Papon
Hi JB,

It sounds very good for me :)

thanks!

François Papon
fpa...@apache.org

Le 07/11/2018 à 08:43, Jean-Baptiste Onofré a écrit :
> Hi team,
>
> I created a PR (https://github.com/apache/karaf/pull/648) to enable
> spotless in Karaf.
>
> Spotless is code style checker but also formatter.
>
> The spotless profile I added in the PR check the style and the style can
> be automatically fixed using mvn spotless:apply -Pspotless.
>
> I think it would be great to have this in Karaf and subprojects to have
> a consistency in our code style.
>
> In combination with rat, it gives us a much cleaner code.
>
> On the other hand, I was planning to add findbugs maven plugin as well.
>
> Thoughts ?
>
> Thanks,
> Regards
> JB



[PROPOSAL] Add spotless to Karaf and subprojects

2018-11-06 Thread Jean-Baptiste Onofré
Hi team,

I created a PR (https://github.com/apache/karaf/pull/648) to enable
spotless in Karaf.

Spotless is code style checker but also formatter.

The spotless profile I added in the PR check the style and the style can
be automatically fixed using mvn spotless:apply -Pspotless.

I think it would be great to have this in Karaf and subprojects to have
a consistency in our code style.

In combination with rat, it gives us a much cleaner code.

On the other hand, I was planning to add findbugs maven plugin as well.

Thoughts ?

Thanks,
Regards
JB
-- 
Jean-Baptiste Onofré
jbono...@apache.org
http://blog.nanthrax.net
Talend - http://www.talend.com