Skip to content

Comments are not always rendered at the right position #76

@DReigada

Description

@DReigada

When using recode as a mix format plugin, running mix format multiple times on a file like the following will always format the file differently:

defmodule RecodeTest do
  defstruct [
    :field_1,

    #######################################################
    ### A comment
    #######################################################

    :field_2
  ]
end

It seems that the problem is related to having a "multiline" comment between list elements, or at least this is the only place where I was able to reproduce the problem.

I've create a simple project to reproduce the issue: https://github.com/DReigada/recode_format_problem.git
Notice that no recode tasks are enable in recode's config file, but the problem happens independently of the configuration.

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