Skip to content

Bug with formatting when updating to 1.9 from 1.7 #247

@vasspilka

Description

@vasspilka

Hello, encountered this bug where formatting breaks the code if you have a 1 case statement like:

module =
  case provider.type do
    :microsoft -> __MODULE__.Microsoft
  end

It will format it into code that does not behave the same:

    module = :microsoft = provider.type
    __MODULE__.Microsoft
Image

Yeah, having a single case statement like this does not make much sense, but we've done this so that it's a bit more straightforward to add more later. For now I will write a private function instead of case statement to fix this. But thought it may be worth to open an issue here

Updating from:

  "styler": {:hex, :styler, "1.7.0", "3336e7547b5edaa3c5f7c861d8a45e1a450f9ed4db7d8f27ad54c12ab791bb66", [:mix], [], "hexpm", "ede783606fcd9bf06edfddbbedc36cc3a3af7b042cf0df8503aec0f82e016437"},

Updating to:

  "styler": {:hex, :styler, "1.9.0", "fb65f399a758d23909bb00df6651db552a4fd4926682faccf6c0c1d16d54f17d", [:mix], [], "hexpm", "eb7cfc311a2cdd962705986d4f26c35aa1d2fd74d1f84c17333649a4f8dbc479"},

Cheers

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