Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Add rule ModifierListSpacingRule #1361

Merged

Conversation

paul-dingemans
Copy link
Collaborator

@paul-dingemans paul-dingemans commented Feb 5, 2022

This rule lints and format the spacing between modifier in and after the last modifier
in a modifier list.

Examples of code which will be fixed:

            // Too many space between or after modifiers
            abstract  class Foo {
                @Throws(RuntimeException::class)
                protected  abstract  suspend  fun execute()
            }

            // Unexpected newlines between or after modifiers
            abstract
            class Foo {
                @Throws(RuntimeException::class)
                protected
                abstract
                suspend
                fun execute()
            }

This rule is required to create a rule which can rewrite the function signature
automatically as is described in #1341

Checklist

  • tests are added
  • CHANGELOG.md is updated

Paul Dingemans and others added 5 commits February 5, 2022 20:29
This rule lints and format the spacing between modifier in and after the last modifier
in a modifier list.

This rule is required to create a rule which can rewrite the function signature
automatically as is described in pinterest#1341
@paul-dingemans paul-dingemans merged commit f7f7900 into pinterest:master Mar 9, 2022
@paul-dingemans paul-dingemans deleted the 1341-modifer-list-spacing-rule branch March 9, 2022 18:41
@paul-dingemans paul-dingemans added this to the 0.45.0 milestone Mar 9, 2022
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant