Skip to content

removeSemicolons() should not be applied to multiline strings in groovy #2780

Open

Description

@AlexeyKuznetsov-DD

I have Groovy code like this:

        '''
          function (doc, meta) {
             if (doc._class == "springdata.Doc") {
               emit(meta.id, null);
             }
          }
        '''.stripIndent()

and when I use removeSemicolons() with my spotless Gradle plugin it removes ; for emit(meta.id, null);

That is not expected. Is that possible to fix?

Activity

  1. added theissue type on Dec 5, 2025
  2. Goooler commented on Dec 5, 2025

    @Goooler
    Member

    Yeah, this should be fixed.

  3. AlexeyKuznetsov-DD commented on Dec 5, 2025

    @AlexeyKuznetsov-DD
    Author

    It also remove ; from comments :)
    kind of not expected too...

  4. Pankraz76 commented on Dec 17, 2025

    @Pankraz76

    Thanks for the detailed report given.


    This seems to fix the issue:

  5. AlexeyKuznetsov-DD commented on Dec 17, 2025

    @AlexeyKuznetsov-DD
    Author

    Thanks! Will test once it will be released.

  6. Pankraz76 commented on Jan 2, 2026

    @Pankraz76

    it seems this project is abandoned by maintainer not answering anymore, therefore closing.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions