Skip to content

Parinfer is confused when functions are indirectly referenced #2027

@simongray

Description

@simongray

In our organisation's code base we have code taking the form:

(('foo bar) :foobar)

where the first form ('foo bar) is an indirect reference that resolves to a function and the second form :foobar is an argument to that function.

If we try to insert a newline (= press enter) between the first form and the second form, the parinfer implementation will move the parenthesis:

(('foo bar 
  :foobar))

Suddenly, :foobar is made a part of the first form.

If we then manually correct it to this (the only way possible without parinfer moving it inside the first form)

(('foo bar) 
 :foobar)

then using the automatic code formatting will put it back in the erroneous state again.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugMarks issues describing bugsreleasedMarks issues which have had the fixes released in a stable build

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions