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

Ensure line-break after last attribute. #25

Merged
merged 1 commit into from
Dec 17, 2015

Conversation

JakeWharton
Copy link
Collaborator

<FrameLayout
    android:layout_width="match_parent"
    android:layout_height="match_parent"/>

becomes

<FrameLayout
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    />

which is much better for diffs and moving attributes up/down.

@edenman

@edenman
Copy link

edenman commented Dec 17, 2015

:shipit:

JakeWharton added a commit that referenced this pull request Dec 17, 2015
@JakeWharton JakeWharton merged commit 0dcc97d into master Dec 17, 2015
@JakeWharton JakeWharton deleted the jw/line-break-after-last-element branch December 17, 2015 19:36
@johnjohndoe
Copy link

One thought: One could argue that ...

<LinearLayout
    android:layout_width="match_parent"
    android:layout_height="match_parent">

</LinearLayout>

... is even better since it allows adding child nodes.

@JakeWharton
Copy link
Collaborator Author

The > should still be on a newline in that case, which this PR enforces.

@johnjohndoe
Copy link

Yes:

<LinearLayout
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    >

</LinearLayout>

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