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

[MSHARED-1033] Add resources required for automatic formatting and import sorting #1

Merged
merged 1 commit into from
Oct 14, 2022

Conversation

gnodet
Copy link
Contributor

@gnodet gnodet commented Jan 31, 2022

Proposal to incorporate the eclipse xml formatter config into maven-shared-resources so that we can use it with auto-formatting plugins (see apache/maven-resolver#147 and apache/maven#824).
This file would become the reference and the site should be updated to reflect that with apache/maven-site#329).

@slawekjaranowski
Copy link
Member

There is also references to IDE formaters on site:
https://maven.apache.org/developers/conventions/code.html

Do we need some synchronization for its?

File is diferent:
https://maven.apache.org/developers/maven-eclipse-codestyle.xml

@gnodet
Copy link
Contributor Author

gnodet commented Feb 3, 2022

IIRC, I've had to modify some rules in order to comply with checkstyle, but I'll do a diff and get back.

@gnodet
Copy link
Contributor Author

gnodet commented Feb 3, 2022

There is also references to IDE formaters on site: https://maven.apache.org/developers/conventions/code.html

Do we need some synchronization for its?

File is diferent: https://maven.apache.org/developers/maven-eclipse-codestyle.xml

@slawekjaranowski

Yes, I would suggest that the web page should point to the GitHub file once it has been included, but I can raise a different PR for the website later.

As for the differences, those are really changes to make sure the automatic formatting complies with the checkstyle rules that are defined in the maven_checks.xml file. This fixes alignment for various use cases to 16 (so not unsplit lines, alignment on the left...) so that long lines can be automatically reformatted. I did try with the settings on the web site, but some lines can not be automatically formatted and comply with the checkstyle rules. There are also missing settings from recent JDK (lambda...)

@gnodet
Copy link
Contributor Author

gnodet commented Oct 13, 2022

I've reworked this small commit to include the 3 files from maven-site, with an additional plain header file that should be useful.

Those are the files directly copied from the maven-site, with the addition of the raw header file
@gnodet gnodet merged commit f9f3527 into apache:master Oct 14, 2022
@gnodet gnodet added this to the 5 milestone Oct 25, 2022
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.

3 participants