Git Product home page Git Product logo

Comments (9)

hpham avatar hpham commented on July 29, 2024 1

Hi Svante,

perhaps https://editorconfig.org/ can help. Here are some editor support .editorconfig:

https://editorconfig.org/#download

Regards
Hanh

from odftoolkit.

svanteschubert avatar svanteschubert commented on July 29, 2024

That is very interesting, GitHub has native support for editconfig, it runs out-of-the-box in various editors (like IntelliJ) and with Plugin for editors such VisualStudioCode, Eclipse, Sublime, etc.
And there is even a Maven Plugin - https://ec4j.github.io/editorconfig-maven-plugin/

Would you like to come up with an exampe for it for our project? Even a patch perhaps?
I am still stuck with updating the documentation..

Cheers,
Svante

from odftoolkit.

svanteschubert avatar svanteschubert commented on July 29, 2024

I was curious and I have started a branch issue-15 with a new config file ".editorconfig" and a new Maven plugin in a new branch: https://github.com/tdf/odftoolkit/compare/issue-15
So far I only added the changed pom.xml itself so we can now discuss on the configuration instead being polluted by noise of changed spaces ;-)

For configuration details see:
https://github.com/editorconfig/editorconfig/wiki/EditorConfig-Properties

You simply run from command line:
mvn editorconfig:format
Within the ODFDOM project I would roll it out for all projects, but let's start simple.

I used the following Maven plugin: https://ec4j.github.io/editorconfig-maven-plugin/
Also I do not apply it to all files, but only I have included a handful, see odfdom/pom.xml

pom.xml
src/codegen/resources/config.xml
src/codegen/resources/pkg/config.xml
src/codegen/resources/pkg/javacodetemplate.xml
src/main/java/org/odftoolkit/odfdom/doc/OdfChartDocument.java

Does this configuration suit you? Later for all Java and XML files and all projects?
Any Pro/Cons on the configuration?

PS: Somehow I have hoped that the branch would automaticalle align with this issue, any idea what I have missed?

from odftoolkit.

svanteschubert avatar svanteschubert commented on July 29, 2024

As the tavis test failed (likely due to the build in support of .editorconfig of GitHub) I have changed my mind and transformed all files (see subset in config) of the ODFDOM project.
If you like the configuration I would add the same configuration for all other ODF Toolkit projects.

NOTE: For review, fokus on the odfdom/pom.xml and odfdom/.editorconfig file, otherwise it is a review of whitespace adoption ;-)

from odftoolkit.

hpham avatar hpham commented on July 29, 2024

Hi
.editorconfig looks fine. But do you really want indent_style as tab? I think in Java project the indent_style is space as standard.

Regards
Hanh

from odftoolkit.

svanteschubert avatar svanteschubert commented on July 29, 2024

from odftoolkit.

hpham avatar hpham commented on July 29, 2024

That is fine.

from odftoolkit.

svanteschubert avatar svanteschubert commented on July 29, 2024

I have added a new pull request for review:
#18

from odftoolkit.

svanteschubert avatar svanteschubert commented on July 29, 2024

Merged the according pull request: #18

from odftoolkit.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.