-
Notifications
You must be signed in to change notification settings - Fork 739
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
Formats project with new code style #5805
Conversation
if (isTracking) { | ||
val translationY = event.y - startY | ||
swipeView.translationY = translationY | ||
onSwipeViewMove(translationY, translationLimit) | ||
} | ||
return true | ||
} | ||
else -> { | ||
else -> { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I do not understand why we have so many changes.
The plan was to change the rules one by one.
So:
- create the .editorconfig with the current rules, eventually format the whole code base to fix existing issues.
- Change the rules one by one, in .editorconfig and then format, so for instance, change the rule for
arrow alignment
and see in the PR only changes about the arrows.
WDYT?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The format here is actually without any rule changes. The problem we're facing is the app doesn't consistently abide by our currently set rules and breaks many basic lint rules in lots of places.
Update: By not using editor config (i.e. using android studio format settings), I was able to massively reduce the diff. This is the smallest autoformat I can do on the whole project so that the code style (reflecting the current) is consistent all around
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The current rule is to align the arrows in a when
block vertically and here it is changing, so I do not understand.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
(Updated the PR fixing this. This file no longer has any diffs)
03aa7f7
to
de899bb
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
OK, with this changes
Type of change
Content
Autoformats project
Motivation and context
Aligns project with new editorconfig standards
This is to prepare for incremental code style changes, and should be the only PR in the code style subproject with a massive diff, thus the greatest challenge.
I tested conflicts for this by merging this branch into the Tchap fork and this seemed to introduce only a few more easy-to-resolve conflicts than there would be when merging with develop
See also #5644
Screenshots / GIFs
N/A
Tests
You will see that there are a lot of conflicts, but most of these conflicts come from changes that are on our repo's develop and not the changes on this branch specifically. If you repeat the steps above but instead merge upstream/develop into origin/develop, you will see that most of those conflicts are still present and this branch adds only few.
Tested devices
Checklist