Skip to content

Spotless messes up @snippet #591

Open

Description

@Zabuzard

Seems spotless doesnt like the @snippet tag for Javadoc. This would have been a nice way to fix the issue with #195 .

Before spotless:

before

After spotless:

after

Also renders badly then:

render

Activity

  1. added
    bug
    documentation
    on Sep 30, 2022
  2. github-actions commented on Oct 31, 2022

    @github-actions

    This issue is stale because it has been open 30 days with no activity. Remove stale label, comment or add the valid label or this will be closed in 5 days.

  3. github-actions commented on Dec 4, 2022

    @github-actions

    This issue is stale because it has been open 30 days with no activity. Remove stale label, comment or add the valid label or this will be closed in 5 days.

  4. added
    valid
    on Dec 5, 2022
  5. self-assigned this
    on Feb 25, 2023
  6. removed their assignment
    on Mar 15, 2023
  7. removed
    valid
    on May 18, 2024
  8. suryatejess commented on Nov 21, 2025

    @suryatejess
    Contributor

    I would like to work on this issue

  9. Zabuzard commented on Nov 21, 2025

    @Zabuzard
    MemberAuthor

    Cool, enjoy! :)

  10. suryatejess commented on Nov 25, 2025

    @suryatejess
    Contributor

    I have set up the project locally on my machine and ran ./gradlew spotlessApply. I cannot reproduce. It is working as expected.
    It's possible this was fixed by upgrades to Spotless or in code changes in the project elsewhere.

    Can you confirm whether there is a still known way to reproduce the bug?

    Talking about #195 , ( @ -> @ which is still happening now )
    As per my research, the reason "@" are turning out into "@" is HTML entities.

    Spotless has nothing do with why it is getting converted. It is because we are using eclipse("4.31").
    Eclipse escapes @ inside the <pre> tag i.e. convert @ -> &#64;

  11. Zabuzard commented on Nov 26, 2025

    @Zabuzard
    MemberAuthor

    @suryatejess
    The problem is still there. See the class SlashCommandAdapter.

    issue

    The idiomatic way to write code in Javadoc is by using {@snippet : ... } and if you use that here, it also works:

    works

    But then spotless messes it up when executed. So we temporarily went for the alternative with <pre>...</pre> which is worse but at least spotless only messes it up partially. But there it also messes up @.

    Ideally we want {@snippet : ...} to work as shown in this issue.

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

Metadata

Metadata

Assignees

Labels

bugdocumentationpriority: low

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions