{"id":19009942,"url":"https://github.com/editorconfig/editorconfig-core-java","last_synced_at":"2025-04-22T22:51:55.646Z","repository":{"id":16633017,"uuid":"19388173","full_name":"editorconfig/editorconfig-core-java","owner":"editorconfig","description":"Clone of EditorConfig core written in Java","archived":false,"fork":false,"pushed_at":"2019-09-30T13:58:42.000Z","size":61,"stargazers_count":64,"open_issues_count":7,"forks_count":26,"subscribers_count":13,"default_branch":"master","last_synced_at":"2025-04-17T14:37:50.002Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/editorconfig.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2014-05-02T20:47:46.000Z","updated_at":"2025-03-16T19:45:40.000Z","dependencies_parsed_at":"2022-08-04T10:15:11.610Z","dependency_job_id":null,"html_url":"https://github.com/editorconfig/editorconfig-core-java","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/editorconfig%2Feditorconfig-core-java","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/editorconfig%2Feditorconfig-core-java/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/editorconfig%2Feditorconfig-core-java/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/editorconfig%2Feditorconfig-core-java/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/editorconfig","download_url":"https://codeload.github.com/editorconfig/editorconfig-core-java/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":250337933,"owners_count":21414102,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-08T19:09:21.074Z","updated_at":"2025-04-22T22:51:55.624Z","avatar_url":"https://github.com/editorconfig.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"# EditorConfig Java Binding\n\nThis directory is for [EditorConfig][] Core Java Binding.\n\n## EditorConfig Project\n\nEditorConfig makes it easy to maintain the correct coding style when switching\nbetween different text editors and between different projects.  The\nEditorConfig project maintains a file format and plugins for various text\neditors which allow this file format to be read and used by those editors.  For\ninformation on the file format and supported text editors, see the\n[EditorConfig website][EditorConfig].\n\n## How to use EditorConfig Core in Java\n\nAdd the `editorconfig-core` dependency to your `pom.xml` file:\n\n```xml\n  ...\n  \u003cdependencies\u003e\n    \u003cdependency\u003e\n      \u003cgroupId\u003eorg.editorconfig\u003c/groupId\u003e\n      \u003cartifactId\u003eeditorconfig-core\u003c/artifactId\u003e\n      \u003cversion\u003e\u003c!-- lookup the newest version on http://mvnrepository.com/artifact/org.editorconfig/editorconfig-core --\u003e\u003c/version\u003e\n    \u003c/dependency\u003e\n  \u003c/dependencies\u003e\n```\n\nA basic example:\n\n```java\nEditorConfig ec = new EditorConfig();\nList\u003cEditorConfig.OutPair\u003e l = null;\ntry {\n    l = ec.getProperties(\"/home/user/src/editorconfig-core-py/a.py\");\n} catch(EditorConfigException e) {\n    System.out.println(e);\n    System.exit(1);\n}\n\nfor(int i = 0; i \u003c l.size(); ++i) {\n    System.out.println(l.get(i).getKey() + \"=\" + l.get(i).getVal());\n}\n```\nThere is an [online documentation][] for API details.\n\n## Build EditorConfig Core Java librarary\n\nPrerequisistes: Java 6, [Maven][], Git, cmake 2.6+ (optional for tests)\n\nCheckout the code\n\n    git clone https://github.com/editorconfig/editorconfig-core-java.git\n\nBuild the library with [Maven][]:\n\n    cd editorconfig-core-java\n    mvn clean install\n\nThe built jar file is in the `target` directory.\n\n## Run the testsuite\n\nFirst make sure that the submodule is initialized:\n\n    cd /path/to/editorconfig-core-java\n    git submodule init\n    git submodule update\n\nThen prepare and run the tests using `cmake`:\n\n    cmake .\n    ctest .\n\n## How to Contribute\n\nPull requests are welcome on [GitHub](https://github.com/editorconfig/editorconfig-core-java).\n\n\n## License\n\nAll source files of the Java binding are distributed under the Apache license. See\nLICENSE for details.\n\nCopyright (C) 2012-2013, EditorConfig Team\n\n[Maven]: https://maven.apache.org\n[EditorConfig]: http://editorconfig.org\n[online documentation]: http://javadocs.editorconfig.org\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Feditorconfig%2Feditorconfig-core-java","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Feditorconfig%2Feditorconfig-core-java","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Feditorconfig%2Feditorconfig-core-java/lists"}