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

Feature: Make use of spotless maven plugin #22734

Closed
1 task done
spotlesscoder opened this issue Jul 1, 2023 · 0 comments · Fixed by #22744
Closed
1 task done

Feature: Make use of spotless maven plugin #22734

spotlesscoder opened this issue Jul 1, 2023 · 0 comments · Fixed by #22744

Comments

@spotlesscoder
Copy link
Contributor

Overview of the feature request

For Java, I have made good experience with spotless. I saw in issue #6379 there was already a discussion about it.

@PierreBesson: I read your comment from December 12, 2017 in that discussion. The build does not necessarily have to fail when the formatting is not correct because spotless can apply the correct formatting, too.

Motivation for or Use Case

Ensure clean source code files by using a formatted for all source files.
Introducing automated code formatting as early as possible in a project has some great benefits:

  • Better readability of source code because only necessary code parts are in the file (no unused imports, spotless can remove them). Also, the code will look more equal across different parts that might be written by different developers
  • Less whitespace / reformatting noise when someone touches existing code. When automated formatting is used, the formatting should always look the same no matter who edited the code. This keeps the git diff clean because no unnecessary whitespace changes etc. should be present there when formatting is done automatically.
Related issues or PR

#6379

  • Checking this box is mandatory (this is just to show you read everything)
spotlesscoder added a commit to spotlesscoder/generator-jhipster that referenced this issue Jul 2, 2023
automatically remove unused imports

Fixes jhipster#22734
@spotlesscoder spotlesscoder changed the title Make use of spotless maven plugin Feature: Make use of spotless maven plugin Jul 2, 2023
spotlesscoder added a commit to spotlesscoder/generator-jhipster that referenced this issue Jul 2, 2023
automatically remove unused imports

Fixes jhipster#22734
spotlesscoder added a commit to spotlesscoder/generator-jhipster that referenced this issue Jul 2, 2023
automatically remove unused imports

Fixes jhipster#22734
spotlesscoder added a commit to spotlesscoder/generator-jhipster that referenced this issue Jul 3, 2023
automatically remove unused imports

Fixes jhipster#22734
@DanielFran DanielFran added this to the 8.0.0-beta.2 milestone Jul 7, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants