Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Wrong indentation after multiline declarations #168

Closed
pablo-co opened this issue Aug 27, 2016 · 1 comment
Closed

Wrong indentation after multiline declarations #168

pablo-co opened this issue Aug 27, 2016 · 1 comment

Comments

@pablo-co
Copy link

pablo-co commented Aug 27, 2016

When declaring any type of structure (maps, structs, lists, etc...) or making a function call that span more than one line the indentation is off to the left.

defmodule App.ShipmentTest do
  use App.ModelCase

  @valid_attrs {depth: "120.5", goods: "goods", height: "120.5",
   packaging: "packaging", weight: "120.5", width: "120.5"}
 @invalid_attrs %{}

As you can see @invalid_attrs %{} is indented one space to the left less.

Here is how it looks for a function call, it indents the remaining lines in the block at the same level as the parameters minus 2 spaces.

 test "changeset with invalid attributes" do
   changeset = Shipment.changeset(%Shipment{},
                                  @invalid_attrs)

                                refute changeset.valid?
 end

The first case is a problem that I noticed a few weeks back, the second one appeared after updating to the latest release (I was a few releases back so not sure in which one it was introduced).

@kassio
Copy link
Member

kassio commented Sep 5, 2016

Already added a pending test to this, I'm working to fix all the indentation problems.

@kassio kassio closed this as completed in 3494a9d Sep 6, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants