Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [hono-dev] Code style - alignment of fields

Hi,

to me it always was kind of error prone to depend on IDE settings to get a consistent formatting for a project.

Would it may be an idea to introduce some maven based approach to enforce styling e.g. checkstyle. This also could be used to enforce the eclipse settings. In addition it would address the issue of already nonstandard formatted code in the project and can be later used as build breaker.

 

Just an idea…

 

Greetings!

 

 

Markus Till

 

Bosch Software Innovations GmbH

Schöneberger Ufer 89-91

10785 Berlin

GERMANY

Von: hono-dev-bounces@xxxxxxxxxxx [mailto:hono-dev-bounces@xxxxxxxxxxx] Im Auftrag von Lohmann Carsten (INST/ECS4)
Gesendet: Montag, 13.
März 2017 09:45
An: hono-dev@xxxxxxxxxxx
Betreff: [hono-dev] Code style - alignment of fields

 

Hi,

when formatting the code using the checked-in eclipse code style settings, the alignment of fields looks odd;
e.g. VertxBasedRestProtocolAdapter:

    private HttpServer                                              server;
    private HonoClient                                              hono;
    private HonoConfigProperties                                    config;

    private BiConsumer<String, Handler<AsyncResult<MessageSender>>> eventSenderSupplier;
    private BiConsumer<String, Handler<AsyncResult<MessageSender>>> telemetrySenderSupplier;



With the additional eclipse formatter setting "Blank lines separating independent groups: 1", it would look better:

    private HttpServer           server;
    private HonoClient           hono;
    private HonoConfigProperties config;

    private BiConsumer<String, Handler<AsyncResult<MessageSender>>> eventSenderSupplier;
    private BiConsumer<String, Handler<AsyncResult<MessageSender>>> telemetrySenderSupplier;


Or can the field alignment setting be disabled altogether?
Many classes are currently not formatted according to this setting anyway (also
VertxBasedRestProtocolAdapter).

--
Best regards

Carsten Lohmann

Bosch Software Innovations GmbH
Schöneberger Ufer 89-91
10785 Berlin
GERMANY


Back to the top