{"id":38955394,"url":"https://github.com/levelrin/dart-stylerin","last_synced_at":"2026-01-17T16:15:24.122Z","repository":{"id":153310844,"uuid":"223436291","full_name":"levelrin/dart-stylerin","owner":"levelrin","description":"An alternative Dart code formatter","archived":false,"fork":false,"pushed_at":"2025-06-14T12:06:15.000Z","size":355,"stargazers_count":3,"open_issues_count":2,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-06-14T13:19:53.660Z","etag":null,"topics":["dart","formatter"],"latest_commit_sha":null,"homepage":"","language":"Java","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/levelrin.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,"zenodo":null}},"created_at":"2019-11-22T15:50:56.000Z","updated_at":"2025-06-14T12:06:18.000Z","dependencies_parsed_at":null,"dependency_job_id":"0f27f4f4-1b89-4bcf-b462-2e1cc7abcf82","html_url":"https://github.com/levelrin/dart-stylerin","commit_stats":null,"previous_names":["levelrin/dart-stylerin"],"tags_count":2,"template":false,"template_full_name":null,"purl":"pkg:github/levelrin/dart-stylerin","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/levelrin%2Fdart-stylerin","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/levelrin%2Fdart-stylerin/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/levelrin%2Fdart-stylerin/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/levelrin%2Fdart-stylerin/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/levelrin","download_url":"https://codeload.github.com/levelrin/dart-stylerin/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/levelrin%2Fdart-stylerin/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28511853,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-17T13:38:16.342Z","status":"ssl_error","status_checked_at":"2026-01-17T13:37:44.060Z","response_time":85,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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":["dart","formatter"],"created_at":"2026-01-17T16:15:23.275Z","updated_at":"2026-01-17T16:15:24.114Z","avatar_url":"https://github.com/levelrin.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"[![Build](https://github.com/levelrin/dart-stylerin/actions/workflows/build.yml/badge.svg?branch=main)](https://github.com/levelrin/dart-stylerin/actions/workflows/build.yml?query=branch%3Amain)\n[![codecov](https://codecov.io/gh/levelrin/dart-stylerin/graph/badge.svg?token=noW3yHdtQq)](https://codecov.io/gh/levelrin/dart-stylerin)\n[![](https://tokei.rs/b1/github/levelrin/dart-stylerin?category=code)](https://github.com/levelrin/dart-stylerin)\n[![License](https://img.shields.io/badge/license-MIT-green.svg)](https://github.com/levelrin/dart-stylerin/blob/main/LICENSE)\n\n## About\n\nIt's a code formatter for [Dart](https://dart.dev/).\n\nYes, we have [the official formatter](https://dart.dev/tools/dart-format) already, but it's not good enough.\n\nFor example, we have the following code:\n```dart\nvoid main(){\n  final RussianDoll doll=RussianDoll('Rin',RussianDoll('Revomin',RussianDoll('Ian',RussianDoll('Rajitha'))));\n  doll.unwrap();\n}\nclass RussianDoll{\n  final String _name;\n  final RussianDoll? _child;\n  const RussianDoll(this._name,[this._child]);\n  RussianDoll? child(){return this._child;}\n  void unwrap(){print(this._name);if(this._child!=null){this._child.unwrap();}}\n}\n```\n\nThe official formatter formats the code like this:\n```dart\nvoid main() {\n  final RussianDoll doll = RussianDoll('Rin',\n      RussianDoll('Revomin', RussianDoll('Ian', RussianDoll('Rajitha'))));\n  doll.unwrap();\n}\n```\n\nOur formatter formats the code like this:\n```dart\nvoid main() {\n  final RussianDoll doll = RussianDoll(\n    'Rin',\n    RussianDoll(\n      'Revomin',\n      RussianDoll(\n        'Ian',\n        RussianDoll('Rajitha')\n      )\n    )\n  );\n  doll.unwrap();\n}\n```\n\nOur format shows the composition better.\n\n## Quick Start\n\nPlease install Java 11+ if you haven't already.\n\n1. [Download](https://github.com/levelrin/dart-stylerin/releases) the zip file that matches with your Java version and unzip it to get the jar file.\n2. Run the command `java -jar dart-stylerin-{app-version}-{java-version}.jar path/to/target.dart`\n\n## Command Options\n\n```\nusage: java -jar dart-stylerin-{app-version}-{java-version}.jar [options]\n -h,--help              Show help messages.\n -q,--quiet             Do not print debug logs.\n -r,--recursive \u003carg\u003e   Format files in the directory recursively.\n -v,--version           Print the version.\n```\n\n## Disclaimer\n\nNot all [grammar rules](https://github.com/antlr/grammars-v4/blob/master/dart2/Dart2Parser.g4) are supported yet.\n\nPlease always be ready to recover the file and use our formatter at your own risk.\n\nIf you find a bug or have a suggestion, please create a new [issue](https://github.com/levelrin/dart-stylerin/issues).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flevelrin%2Fdart-stylerin","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flevelrin%2Fdart-stylerin","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flevelrin%2Fdart-stylerin/lists"}