Skip to content

build: Spotless formatter #2638

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

Draft
wants to merge 8 commits into
base: compose-dev
Choose a base branch
from
Draft

build: Spotless formatter #2638

wants to merge 8 commits into from

Conversation

validcube
Copy link
Member

@validcube validcube commented Jul 5, 2025

Fix #2423

Caution

DO NOT MERGE

This PR will basically make tons of merge conflicts. (indirectly)

@validcube validcube added the ReVanced Manager Compose Regarding the Compose rewrite of ReVanced Manager label Jul 5, 2025
@validcube validcube linked an issue Jul 5, 2025 that may be closed by this pull request
@validcube
Copy link
Member Author

A consensus agreement about code styling has to be discussed first.

As of right now, I've set it to Google style.

@oSumAtrIX
Copy link
Member

Use ktlint only. Also, if this is added, this should be added to all eligible repos. In general any change to ci or build system should be applied to all applicable repos

@validcube
Copy link
Member Author

validcube commented Jul 5, 2025

Use ktlint only. Also, if this is added, this should be added to all eligible repos. In general any change to ci or build system should be applied to all applicable repos

Resolved, switched from ktfmt to ktlint, the configuration is based on Android Studio
(or well, that's what the ktlint told me after running .\ktlint.bat generateEditorConfig --code-style android_studio)

@validcube validcube marked this pull request as ready for review July 5, 2025 19:38
@validcube validcube marked this pull request as draft July 5, 2025 19:38
.editorconfig Outdated
Comment on lines 12 to 23
ktlint_annotation_handle_annotations_with_parameters_same_as_annotations_without_parameters = [unset]
ktlint_argument_list_wrapping_ignore_when_parameter_count_greater_or_equal_than = 8
ktlint_chain_method_rule_force_multiline_when_chain_operator_count_greater_or_equal_than = 4
ktlint_class_signature_rule_force_multiline_when_parameter_count_greater_or_equal_than = unset
ktlint_code_style = android_studio
ktlint_enum_entry_name_casing = upper_or_camel_cases
ktlint_function_naming_ignore_when_annotated_with = [unset]
ktlint_function_signature_body_expression_wrapping = default
ktlint_function_signature_rule_force_multiline_when_parameter_count_greater_or_equal_than = unset
ktlint_ignore_back_ticked_identifier = false
ktlint_property_naming_constant_naming = screaming_snake_case
max_line_length = 100
Copy link
Member

Choose a reason for hiding this comment

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

The spacing here looks cursed.

Copy link
Member Author

@validcube validcube Jul 6, 2025

Choose a reason for hiding this comment

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

I agree, I pasted the configuration from ktlint generator and android studio wrongly formatted it to this abomination.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ReVanced Manager Compose Regarding the Compose rewrite of ReVanced Manager
Projects
None yet
Development

Successfully merging this pull request may close these issues.

build: Code analysis, styling enforcement
3 participants