Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Provide .editorconfig in project to ensure consistent formatting #485

Closed
Oliver-Loeffler opened this issue Jan 23, 2022 · 2 comments · Fixed by #571
Closed

Provide .editorconfig in project to ensure consistent formatting #485

Oliver-Loeffler opened this issue Jan 23, 2022 · 2 comments · Fixed by #571
Labels
enhancement New feature or request

Comments

@Oliver-Loeffler
Copy link
Collaborator

Oliver-Loeffler commented Jan 23, 2022

Scene Builder code follows a certain formatting style. E.g. spaces are preferred over tabs.
Add a notice either to README.md or to CONTRIBUTING.md, that Netbeans, Eclipse and VSCode require a plugin and IntelliJ does not. Add a link to https://editorconfig.org/.

Expected Behavior

When Scene Builder project is opened in IDE, code formatting rules and styles are imported from .editorconfig.
Let Maven run the required checks (additionally to check style) editorconfig-maven-plugin.

Setup to start with setup:

  • no tabs, just spaces, 4 spaces indent, default line break to \n for *.java, *.css and *.properties
  • add or complement README.md or CONTRIBUTING.md with a section on how to properly setup development environment

Current Behavior

When Scene Builder project is opened in IDE, existing formatting conventions in IDE may break existing format in files.

Context

Code formatting and use of spaces/tabs is a recurring issue in PRs and is time consuming and annoying for contributors and reviewers.

@Oliver-Loeffler Oliver-Loeffler added the enhancement New feature or request label Jan 23, 2022
@abhinayagarwal
Copy link
Collaborator

@Oliver-Loeffler does editorconfig-maven-plugin automatically overwrite files to make the necessary changes?

@Oliver-Loeffler
Copy link
Collaborator Author

@abhinayagarwal Yes, indeed it does, this is the beauty of this tool.

In order to format the code, one needs to run:

mvn editorconfig:format

Its described here: https://ec4j.github.io/editorconfig-maven-plugin/

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants