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

Reformats project based on editorconfig #5953

Merged
merged 4 commits into from
May 6, 2022

Conversation

ericdecanini
Copy link
Contributor

@ericdecanini ericdecanini commented May 5, 2022

Type of change

  • Feature
  • Bugfix
  • Technical
  • Other :

Content

Reformats project based on editorconfig

Motivation and context

The project was previously reformatted using AS settings (from preferences) that mimiced our current editorconfig. The reason for this approach at the time was to reduce the initial impact of the reformat.

After doing this, we encountered some annoyances that when we reformat the code in our own PRs, we incur additional formatting changes. This PR reformats the project once more based on the current editorconfig to finalise the formatting with the current code style and so that we don't incur such annoyances.

For context, we did discuss changing ij_kotlin_code_style_defaults to KOTLIN_OLD_DEFAULTS but we know that we are going to change that in the future anyway so we decided we might as well do it now.

Screenshots / GIFs

N/A

Tests

Smoke test app still works. No changes should incur as changes are purely code formatting

Tested devices

  • Physical
  • Emulator
  • OS version(s): Android 11

Checklist

@ericdecanini ericdecanini marked this pull request as ready for review May 5, 2022 17:34
@ericdecanini ericdecanini requested review from bmarty and ouchadam and removed request for bmarty May 5, 2022 17:34
@github-actions
Copy link

github-actions bot commented May 5, 2022

Unit Test Results

122 files  ±0  122 suites  ±0   1m 56s ⏱️ -42s
205 tests ±0  205 ✔️ ±0  0 💤 ±0  0 ±0 
690 runs  ±0  690 ✔️ ±0  0 💤 ±0  0 ±0 

Results for commit be0be69. ± Comparison against base commit 59ab166.

♻️ This comment has been updated with latest results.

Copy link
Member

@bmarty bmarty left a comment

Choose a reason for hiding this comment

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

One small remark about a change in VectorBaseActivity.
Else LGTM, we should not wait too much before merging this PR.

@@ -83,7 +83,8 @@ class ExportEncryptionTest {
@Test
fun checkExportDecrypt1() {
val password = "password"
val input = "-----BEGIN MEGOLM SESSION DATA-----\nAXNhbHRzYWx0c2FsdHNhbHSIiIiIiIiIiIiIiIiIiIiIAAAACmIRUW2OjZ3L2l6j9h0lHlV3M2dx\n" + "cissyYBxjsfsAndErh065A8=\n-----END MEGOLM SESSION DATA-----"
val input =
"-----BEGIN MEGOLM SESSION DATA-----\nAXNhbHRzYWx0c2FsdHNhbHSIiIiIiIiIiIiIiIiIiIiIAAAACmIRUW2OjZ3L2l6j9h0lHlV3M2dx\n" + "cissyYBxjsfsAndErh065A8=\n-----END MEGOLM SESSION DATA-----"
Copy link
Member

Choose a reason for hiding this comment

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

This change is not ideal but ok

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Must be because of long line wrapping (even though it still exceeds like this). Updated to put it on the same line anyway

)
is GlobalError.CertificateError ->
consentNotGivenHelper.displayDialog(globalError.consentUri,
activeSessionHolder.getActiveSession().sessionParams.homeServerHost ?: "")
Copy link
Member

Choose a reason for hiding this comment

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

Looks like this change in the "revert" commit is not expected. Can you double check that this file is properly formatted?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Again caused by long line wrapping. Extracted it out into a private function to make it work with formatting and just generally look cleaner

Copy link
Member

Choose a reason for hiding this comment

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

I was not clear: there should be a line break after (, and another one before )

* limitations under the License.
*/

package org.matrix.android.sdk.api.auth
Copy link
Contributor

@ouchadam ouchadam May 6, 2022

Choose a reason for hiding this comment

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

wasn't expecting such a large diff for this file, I'm guessing the line separator character has been switched to the project defined one 🤔

Copy link
Contributor Author

Choose a reason for hiding this comment

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

It must be so!

Copy link
Contributor

@ouchadam ouchadam left a comment

Choose a reason for hiding this comment

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

LGTM! with this as our baseline we can start to make adjustments 💯

@ericdecanini ericdecanini merged commit 9f9c6fb into develop May 6, 2022
@ericdecanini ericdecanini deleted the task/eric/reformat-project branch May 6, 2022 09:43
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