Skip to content

Formatting of generic discrete type disagrees with GNAT warning #4

@pyjarrett

Description

@pyjarrett

Noticed in this code snippet, autoformat in VS Code (with GNATformat) results in this:

generic
   type My_Enum is(<>);
package Example is
   My_Values : array (My_Enum) of Boolean;
end Example;

GNATformat removed the space between is and (<>) and building with GNAT then gives a (style) space required warning between is and (<>).

This is also duplicated when running GNATformat directly, like with gnatformat --project my_example.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions