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

[Bug] [style] maven-spotless plugin make some codes deleted #13564

Closed
2 of 3 tasks
George-zqq opened this issue Feb 14, 2023 · 4 comments
Closed
2 of 3 tasks

[Bug] [style] maven-spotless plugin make some codes deleted #13564

George-zqq opened this issue Feb 14, 2023 · 4 comments
Labels
question Further information is requested

Comments

@George-zqq
Copy link

Search before asking

  • I had searched in the issues and found no similar issues.

What happened

maven-spotless plugin make some codes deleted

What you expected to happen

when i build project , cause some error about spotless , and advice to run "mvn spotless:apply" first . The follow is some codes has been deleted

image

Then compare the source and after spotless format

image

How to reproduce

  1. download source code and decompress
  2. run command "./mvnw clean install -e -Prelease -Dzk-3.4"

Anything else

No response

Version

3.1.x

Are you willing to submit PR?

  • Yes I am willing to submit a PR!

Code of Conduct

@George-zqq George-zqq added bug Something isn't working Waiting for reply Waiting for reply labels Feb 14, 2023
@github-actions
Copy link

Thank you for your feedback, we have received your issue, Please wait patiently for a reply.

  • In order for us to understand your request as soon as possible, please provide detailed information, version or pictures.
  • If you haven't received a reply for a long time, you can join our slack and send your question to channel #troubleshooting

@fuchanghai
Copy link
Member

@EricGao888

@fuchanghai
Copy link
Member

spotless will delete codes that Non-standard

@EricGao888 EricGao888 added question Further information is requested and removed bug Something isn't working Waiting for reply Waiting for reply labels Feb 20, 2023
@EricGao888
Copy link
Member

@George-zqq This is expected behavior. For wildcard imports, powermock imports, junit4 imports, running mvn spotless:apply will directly remove related code. To avoid this, run mvn spotless:check ahead, fix wildcard imports with your IDE, then run mvn spotless:apply to fix the rest.

FYI: spotless#649

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

3 participants