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

build: Added .editorconfig to project #571

Merged
merged 11 commits into from
Mar 20, 2024

Conversation

Oliver-Loeffler
Copy link
Collaborator

@Oliver-Loeffler Oliver-Loeffler commented Oct 2, 2022

Issue

Fixes #485

Adds a very basic .editorconfig to the project and the related Maven plug-in to automatically format files on demand.
README.md has been updated accordingly on how to make use of EditorConfig and where to get the plug-in's for the IDEs.

Progress

Remark 2024-03-19:

The Maven plugin has been removed as the setup did actually not work as expected. However, the .editorconfig works well in IntelliJ IDEA and Eclipse (when equipped with the plugin).

@abhinayagarwal
Copy link
Collaborator

@AlmasB should this be PR be marked as build or feat ?

@AlmasB
Copy link
Collaborator

AlmasB commented Sep 25, 2023

@abhinayagarwal yeah looks like a build PR

@AlmasB AlmasB changed the title feat: Added .editorconfig to project, including Maven plug-in. build: Added .editorconfig to project, including Maven plug-in. Sep 25, 2023
@abhinayagarwal abhinayagarwal added this to the 22 milestone Sep 25, 2023
@abhinayagarwal
Copy link
Collaborator

I added TABs in 2 files: one .java and another pom.xml. Then I ran mvn editorconfig:format, it only fixed the pom.xml file and ignored the java file.

Also, is there a way to make the maven build fail if the check fails?

@Oliver-Loeffler Oliver-Loeffler changed the title build: Added .editorconfig to project, including Maven plug-in. build: Added .editorconfig to project Mar 19, 2024
@Oliver-Loeffler
Copy link
Collaborator Author

Well, the Maven Plugin is not really working as expected. Hence my proposal is to remove it. However, I'll contact the author and will ask for help there.

Nevertheless, we can keep the .editorconfig file as this is directly supported by IntelliJ IDEA and (via plugin) by Eclipse. Having this file and a suitable IDE will nevertheless make life easier as the IDE uses the format settings as defined in there.

For now, I've removed the Maven plugin. If we want to reformat, we could still apply checkstyle. Checkstyle works.

This reverts commit 77acf7c.
@abhinayagarwal
Copy link
Collaborator

Yes, checkstyle is a good option. Let's take it up as a separate issue.

@abhinayagarwal abhinayagarwal merged commit 16e0503 into gluonhq:master Mar 20, 2024
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Provide .editorconfig in project to ensure consistent formatting
3 participants