Skip to content

Add rule to align assignment statements in a hashtable #753

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

Merged
merged 20 commits into from
Apr 22, 2017

Conversation

kapilmb
Copy link

@kapilmb kapilmb commented Apr 21, 2017

No description provided.

Copy link
Contributor

@daviwil daviwil left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice man! Jeffrey will be really happy :)

@daviwil
Copy link
Contributor

daviwil commented Apr 21, 2017

By the way, does this handle nested hashtables? I'm guessing yes but wasn't sure :)

@kapilmb
Copy link
Author

kapilmb commented Apr 22, 2017

Yeah, it does. Here is an example.

unformatted hashtable:

hashtable1 = @{
    longPropertyName = "value"
    hashtable2 = @{
    someRandomProperty = "someRandomValue"
        hashtable3 = @{
            property = "value"
            anotherLongPropertyName = "anotherValue"
        }
    }
}

formatted hashtable:

hashtable1 = @{
    longPropertyName = "value"
    hashtable2       = @{
        someRandomProperty = "someRandomValue"
        hashtable3         = @{
            property                = "value"
            anotherLongPropertyName = "anotherValue"
        }
    }
}

@daviwil
Copy link
Contributor

daviwil commented Apr 22, 2017

Fantastic, thanks for confirming!

@kapilmb
Copy link
Author

kapilmb commented Apr 22, 2017

Thanks @daviwil

@kapilmb kapilmb merged commit cca9a2d into development Apr 22, 2017
@kapilmb kapilmb deleted the kapilmb/align-assignments-rule branch April 22, 2017 00:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants