Skip to content

indentation fails at multiple subroutine definitions in preprocessor directives #156

Open
@LukasvdWiel

Description

@LukasvdWiel

Let me have unformatted code:

#ifdef foo
subroutine bla(x)
#else
subroutine bla(x,y)
#endif

[do something]

end subroutine

subroutine bar

I would expect [do something] to be indented once, and both subroutine calls to be equally indented:

#ifdef foo
subroutine bla(x)
#else
subroutine bla(x,y)
#endif

    [do something]

end subroutine

subroutine bar

but what happens is that the second subroutine definition of bla is already indented.
Worse then that, all code below takes the extra indent level, and subsequent subroutines, such as bar in this example, is indented more than it should.

#ifdef foo
subroutine bla(x)
#else
    subroutine bla(x,y)
#endif

        [do something]

    end subroutine

    subroutine bar

I hope you could find time to fix this.

Have an excellent day!

Lukas

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