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

Java Code Formatter #3166

Closed
Leo6Leo opened this issue Jun 23, 2023 · 3 comments · Fixed by #3171 or #3203
Closed

Java Code Formatter #3166

Leo6Leo opened this issue Jun 23, 2023 · 3 comments · Fixed by #3171 or #3203
Assignees
Labels
kind/feature-request triage/accepted Issues which should be fixed (post-triage)

Comments

@Leo6Leo
Copy link
Contributor

Leo6Leo commented Jun 23, 2023

Problem
I was working on a Java ticket these days, and found that the format of our java codebase sometime is not consistent.
Therefore, I am trying to propose a Java formatter for the team.

Persona:
Which persona is this feature for?
Knative developers

Exit Criteria
A measurable (binary) test that would indicate that the problem has been resolved.

Time Estimate (optional):
1

Additional context (optional)
The fotmatter I am proposing is called Spotless.

The Pros for choosing Spotless:

  • Just run mvn spotless:apply does magic
  • It is widely used, and actively been maintained!
  • Can be integrated with CI testing
  • It supports many different formatting policy (google java style, eclipse jdt...)
  • Support with IntelliJ IDEA and VSCode
@Leo6Leo
Copy link
Contributor Author

Leo6Leo commented Jun 23, 2023

/assign

@pierDipi pierDipi added the triage/accepted Issues which should be fixed (post-triage) label Jun 26, 2023
@pierDipi
Copy link
Member

@debasishbsws this will help us for formatting Java code, if you have got opinions and thoughts on this, feel free to comment, like if the proposed tool would work for you, etc

@debasishbsws
Copy link
Member

I think it will be a good idea to have a formatter.
I know about checkstyle that is a linting tool for java, but it doesn't work as a formatter ig.
Spotless looks like a cool to work with.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/feature-request triage/accepted Issues which should be fixed (post-triage)
Projects
None yet
3 participants