You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@stanbol.apache.org by Reto Bachmann-Gmür <re...@apache.org> on 2013/02/26 06:29:17 UTC

Coding style and project reports (maven sites)

Hello

After netbeans pointed me to some "style violations" I've noticed that
checkstyle:checkstyle find several thousand such violations. Ha anyone
experience with chekstyle? Could we create rules to configure the plugin to
be in line with our eclipse-xml coding conventions?

Also, could we publish the maven generated reports/sites somewhere? More
useful than the checkstyle reports would be the javadocs.

Cheers,
Reto

Re: Coding style and project reports (maven sites)

Posted by Reto Bachmann-Gmür <re...@apache.org>.
On Wed, Feb 27, 2013 at 9:14 AM, Fabian Christ <christ.fabian@googlemail.com
> wrote:

> 2013/2/27 Reto Bachmann-Gmür <re...@wymiwyg.com>:
> > I'm also in favour of a relaxed approach.
>
> Also fine with me. And what benefit will checkstyle bring to the
> project if it is okay to have a relaxed approach? What do we want to
> check then?
>

I know checkstyle only from netbeans fixing stuff to comply with the
checkstyle rules. Because of this I thought the stanbol pom would define or
inherit checkstyle rules, but on closer examination I didn't find them. I'm
glad that if I enter stuff this gets formatted in a similar way as the code
around as its otherwise harder to read. And then I'm glad that I don't have
to manually change settings on different project I'm working on. This is an
argument to stick with the most commonly accepted standard and be relaxed
if someone "optimizes" his code in one way or another.

Reto

Re: Coding style and project reports (maven sites)

Posted by Fabian Christ <ch...@googlemail.com>.
2013/2/27 Reto Bachmann-Gmür <re...@wymiwyg.com>:
> I'm also in favour of a relaxed approach.

Also fine with me. And what benefit will checkstyle bring to the
project if it is okay to have a relaxed approach? What do we want to
check then?


-- 
Fabian
http://twitter.com/fctwitt

Re: Coding style and project reports (maven sites)

Posted by Reto Bachmann-Gmür <re...@wymiwyg.com>.
On Tue, Feb 26, 2013 at 1:13 PM, Bertrand Delacretaz <bdelacretaz@apache.org
> wrote:

> On Tue, Feb 26, 2013 at 1:24 AM, Rupert Westenthaler
> <ru...@gmail.com> wrote:
> > ...this reminds me that I would like to modify the Stanbol code
> > conventions to avoid all things like
> >
> >     public void testMethod(String param1
> >                                       String param2
> > and use
> >     public void testMethod(String param1
> >             String param2
> > instead....
>
> you mean just changing the indentation? Does anyone really care about
> this? I don't.
>
I'm also in favour of a relaxed approach. To have some coding guidelines to
configure the IDE is fine but at the end it's the programmer to decide how
the code is best readable.

What I like about checkstyle is that it's tied to maven and allows thus the
rules to be set on a per-project basis so netbeans may have other styling
rules depending on the project.

Cheers,
Reto

Re: Coding style and project reports (maven sites)

Posted by Bertrand Delacretaz <bd...@apache.org>.
On Tue, Feb 26, 2013 at 1:24 AM, Rupert Westenthaler
<ru...@gmail.com> wrote:
> ...this reminds me that I would like to modify the Stanbol code
> conventions to avoid all things like
>
>     public void testMethod(String param1
>                                       String param2
> and use
>     public void testMethod(String param1
>             String param2
> instead....

you mean just changing the indentation? Does anyone really care about
this? I don't.

-Bertrand

Re: Coding style and project reports (maven sites)

Posted by Rupert Westenthaler <ru...@gmail.com>.
Hi


this reminds me that I would like to modify the Stanbol code
conventions to avoid all things like

    public void testMethod(String param1
                                      String param2

and use

    public void testMethod(String param1
            String param2

instead.

AFAIK this would affect method declarations, @Annotations(..) and new
Stirng[]{..}

Reto have you seen that the convention folder contains rules for Sonar [1]

best
Rupert

[1] http://www.sonarsource.org/


On Tue, Feb 26, 2013 at 6:29 AM, Reto Bachmann-Gmür <re...@apache.org> wrote:
> Hello
>
> After netbeans pointed me to some "style violations" I've noticed that
> checkstyle:checkstyle find several thousand such violations. Ha anyone
> experience with chekstyle? Could we create rules to configure the plugin to
> be in line with our eclipse-xml coding conventions?
>
> Also, could we publish the maven generated reports/sites somewhere? More
> useful than the checkstyle reports would be the javadocs.
>
> Cheers,
> Reto



--
| Rupert Westenthaler             rupert.westenthaler@gmail.com
| Bodenlehenstraße 11                             ++43-699-11108907
| A-5500 Bischofshofen