{"id":20092354,"url":"https://github.com/rubixdev/ktlint-ruleset-mc-preprocessor","last_synced_at":"2025-07-09T19:40:36.981Z","repository":{"id":225638365,"uuid":"766462098","full_name":"RubixDev/ktlint-ruleset-mc-preprocessor","owner":"RubixDev","description":"A custom ktlint rule set containing customized rules from the standard set tweaked for Minecraft mods using preprocessing","archived":false,"fork":false,"pushed_at":"2025-05-29T15:13:03.000Z","size":97,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-05-29T15:55:49.909Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Kotlin","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/RubixDev.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-03-03T10:38:47.000Z","updated_at":"2025-05-29T15:13:07.000Z","dependencies_parsed_at":"2024-11-13T16:39:15.142Z","dependency_job_id":null,"html_url":"https://github.com/RubixDev/ktlint-ruleset-mc-preprocessor","commit_stats":null,"previous_names":["rubixdev/ktlint-ruleset-mc-preprocessor"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/RubixDev/ktlint-ruleset-mc-preprocessor","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/RubixDev%2Fktlint-ruleset-mc-preprocessor","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/RubixDev%2Fktlint-ruleset-mc-preprocessor/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/RubixDev%2Fktlint-ruleset-mc-preprocessor/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/RubixDev%2Fktlint-ruleset-mc-preprocessor/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/RubixDev","download_url":"https://codeload.github.com/RubixDev/ktlint-ruleset-mc-preprocessor/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/RubixDev%2Fktlint-ruleset-mc-preprocessor/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":264502494,"owners_count":23618619,"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-13T16:36:45.186Z","updated_at":"2025-07-09T19:40:36.902Z","avatar_url":"https://github.com/RubixDev.png","language":"Kotlin","readme":"# Custom ktlint Rule Set for Minecraft Preprocessor Mods\n\nThis is a custom rule set for [ktlint](https://ktlint.github.io/) which modifies\nsome standard rules to better work with Kotlin code that makes use of\n[preprocessor](https://github.com/ReplayMod/preprocessor).\n\n## Usage\n\nThe exact usage is dependent on your ktlint setup and you should refer to your\nintegration's documentation, but here is how you would do it for\n[Spotless](https://github.com/diffplug/spotless/tree/main/plugin-gradle#applying-ktlint-to-kotlin-files)\nin a `build.gradle.kts` file:\n\n```kts\nrepositories {\n    maven(\"https://jitpack.io\")\n}\n\nspotless {\n    kotlin {\n        ktlint().customRuleSets(listOf(\"com.github.RubixDev:ktlint-ruleset-mc-preprocessor:01fbcf09be\"))\n    }\n}\n```\n\nReplace the commit hash with the latest hash\n[on JitPack](https://jitpack.io/#RubixDev/ktlint-ruleset-mc-preprocessor).\n\n## Included Rules\n\n- [`mc-preprocessor:chain-wrapping`](./src/main/kotlin/de/rubixdev/ktlint/mc/preprocessor/ChainWrappingRule.kt)\n  - based on\n    [`standard:chain-wrapping`](https://github.com/pinterest/ktlint/blob/c4788a5f581f0d9f85ca47296b6b576fd6b5d594/ktlint-ruleset-standard/src/main/kotlin/com/pinterest/ktlint/ruleset/standard/rules/ChainWrappingRule.kt)\n  - modified to move the operators `*`, `/`, `%`, `\u0026\u0026`, and `||` on the start of\n    the next line instead of at the end of the current line\n  - `+` and `-` operators are kept at the end of lines because\n    [Kotlin's parsing is a bit annoying there](https://github.com/pinterest/ktlint/issues/163#issuecomment-369418775)\n  - this is just my preference and has nothing to do with the preprocessor\n\n- [`mc-preprocessor:comment-spacing`](./src/main/kotlin/de/rubixdev/ktlint/mc/preprocessor/CommentSpacingRule.kt)\n  - based on\n    [`standard:comment-spacing`](https://github.com/pinterest/ktlint/blob/c4788a5f581f0d9f85ca47296b6b576fd6b5d594/ktlint-ruleset-standard/src/main/kotlin/com/pinterest/ktlint/ruleset/standard/rules/CommentSpacingRule.kt)\n  - modified to allow comments starting with `//#`, `//$` or `///` to not have\n    spaces after them\n\n- [`mc-preprocessor:import-ordering`](./src/main/kotlin/de/rubixdev/ktlint/mc/preprocessor/ImportOrderingRule.kt)\n  - based on\n    [`standard:import-ordering`](https://github.com/pinterest/ktlint/blob/c4788a5f581f0d9f85ca47296b6b576fd6b5d594/ktlint-ruleset-standard/src/main/kotlin/com/pinterest/ktlint/ruleset/standard/rules/ImportOrderingRule.kt)\n  - modified to sort imports alphabetically, but respects preprocessor comments\n    for version-specific imports and puts those separately at the end\n    [as specified in their docs](https://github.com/ReplayMod/preprocessor#the-preprocessor)\n  - sorts the preprocessor import blocks based on their Minecraft version and\n    the comparison operator they use\n  - custom import ordering patterns cannot be specified with this version of the\n    rule\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frubixdev%2Fktlint-ruleset-mc-preprocessor","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frubixdev%2Fktlint-ruleset-mc-preprocessor","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frubixdev%2Fktlint-ruleset-mc-preprocessor/lists"}