Skip to content

Inconsistent annotation formatting #360

@talios

Description

@talios

I was wondering if anyone could explain the inconsistent formatting of annotations I see here between an abstract class member and a private field:

-    @Value.Parameter
-    abstract int page();
+  @Value.Parameter
+  abstract int page();

and

-  @Reference
-  private SomeService someService;
+  @Reference private SomeService someService;

The style guide mentions that multiple annotations may go on a single line - but my reading would be that it could imply "the annotations remain on a separate line to the field, but the annotations may be wrapped onto one line".

It further says there's no specific rules about types, parameters and local variables.

For a measure of consistency - I think sticking to separate lines would be better, except for parameters - which already often wrap to their own line.

Thoughts? What are the rules which the formatter currently uses?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions