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

Apply ktlint formatting #279

Merged
merged 4 commits into from
Oct 9, 2023
Merged

Conversation

zigavehovec
Copy link
Contributor

Description

Kotlin code isn't properly formatted.

Changes

This PR applies ktlint formatting introduced in #276.

Checklist

  • 🗒 CHANGELOG entry

@zigavehovec zigavehovec mentioned this pull request Oct 9, 2023
1 task
@zigavehovec zigavehovec self-assigned this Oct 9, 2023
@zigavehovec zigavehovec marked this pull request as ready for review October 9, 2023 09:21
Copy link
Contributor

@rolandkakonyi rolandkakonyi left a comment

Choose a reason for hiding this comment

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

I see the check passed so approving.
I can't say much about the actual changes :)

Copy link
Contributor

@matamegger matamegger left a comment

Choose a reason for hiding this comment

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

Well it is an automation, so there shouldn't be a lot to add.
From my side this is fine to be merged as it is right. See my comment's as NITs. At least one of them is probably not "fixable" anyway.

Comment on lines +126 to +127
OfflineOptionEntryState.Failed,
-> {
Copy link
Contributor

Choose a reason for hiding this comment

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

That looks odd 🤔

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I agree. I guess this is because of trailing commas rule: https://pinterest.github.io/ktlint/0.49.1/rules/configuration-ktlint/#trailing-comma-on-call-site

In the newest version of ktlint you either have the option to always have trailing commas or never. I decided to go with always, since it makes sense 99% of the time.

I'm not sure we can improve on that.

Comment on lines 284 to 285
private fun drmModule(): DrmModule? =
context.getNativeModule(DrmModule::class.java)
context.getNativeModule(DrmModule::class.java)
Copy link
Contributor

Choose a reason for hiding this comment

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

NIT: Would fit into one line I think.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Good point, I missed that.
bc9fa39

Comment on lines 290 to 291
private fun uiManager(): UIManagerModule? =
context.getNativeModule(UIManagerModule::class.java)
context.getNativeModule(UIManagerModule::class.java)
Copy link
Contributor

Choose a reason for hiding this comment

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

NIT: Would fit into one line I think.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Good point, I missed that.
bc9fa39

Base automatically changed from PRN-48/add-lint-to-kotlin-code to development October 9, 2023 12:42
@zigavehovec zigavehovec merged commit 1802917 into development Oct 9, 2023
@zigavehovec zigavehovec deleted the PRN-48/apply-ktlint-formatting branch October 9, 2023 12: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