{"id":13648124,"url":"https://github.com/johnmcfarlane/unformat","last_synced_at":"2026-01-18T16:06:03.304Z","repository":{"id":46913092,"uuid":"100817026","full_name":"johnmcfarlane/unformat","owner":"johnmcfarlane","description":"generates .clang-format file from example codebase","archived":false,"fork":false,"pushed_at":"2024-12-02T10:25:27.000Z","size":32,"stargazers_count":317,"open_issues_count":8,"forks_count":23,"subscribers_count":14,"default_branch":"master","last_synced_at":"2025-04-22T07:02:43.040Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Python","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/johnmcfarlane.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}},"created_at":"2017-08-19T19:33:04.000Z","updated_at":"2025-04-14T06:31:12.000Z","dependencies_parsed_at":"2024-01-14T11:07:59.748Z","dependency_job_id":null,"html_url":"https://github.com/johnmcfarlane/unformat","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/johnmcfarlane/unformat","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/johnmcfarlane%2Funformat","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/johnmcfarlane%2Funformat/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/johnmcfarlane%2Funformat/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/johnmcfarlane%2Funformat/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/johnmcfarlane","download_url":"https://codeload.github.com/johnmcfarlane/unformat/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/johnmcfarlane%2Funformat/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28541068,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-18T14:59:57.589Z","status":"ssl_error","status_checked_at":"2026-01-18T14:59:46.540Z","response_time":98,"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":[],"created_at":"2024-08-02T01:03:59.243Z","updated_at":"2026-01-18T16:06:03.285Z","avatar_url":"https://github.com/johnmcfarlane.png","language":"Python","funding_links":[],"categories":["Python"],"sub_categories":[],"readme":"# [Unformat](https://github.com/johnmcfarlane/unformat)\n\nPython3 utility to generate a *.clang-format* file from example code-base.\n\n## Description\n\nGiven the path to a C, C++ or Objective-C project, attempts to generate the perfect *.clang-format* file. \nIt does this by producing configuration files with random variations and measuring how much code they would change. \nFinally the configuration file with the least change is output.\n\n## Dependencies\n\nTested under Python 3.5 using *clang-format 3.9* and *clang-format 3.8*.\n\nPython modules you'll need to install:\n\n* [PyYAML](http://pyyaml.org/)\n* [python-Levenshtein](https://pypi.python.org/pypi/python-Levenshtein)\n\nTo add dependencies to a Ubuntu or Debian system:\n\n```sh\nsudo apt install clang-format python3-levenshtein python3-yaml\n```\n\n## Examples\n\nIf Unformat is cloned into */home/abc/unformat* and C++ source code is in */home/abc/my_project*,\n\n```sh\npython3 /home/abc/unformat --root /home/abc/my_project /home/abc/my_project/**/*.h /home/abc/my_project/**/*.cpp\n```\n\nwill search for the best *.clang-format* file. \nIt will start searching from */home/abc/my_project/.clang-format*\nand will write new configurations to that location as they are found.\n(Note you must have \n[globstar enabled](https://www.shellrunner.com/posts/better-simpler-searching-and-scripting-with-bash-globstar/)\nto make use of recursive (`**`) wildcards.)\n\nThe search may continue indefinitely.\nPress Ctrl-C to stop early. \nAny intermediate results will be written out.\n\n## Links\n\nTo submit feedback and bug reports, please file an [issue](https://github.com/johnmcfarlane/unformat/issues).  \nFor another solution to this problem, check out [whatstyle](https://github.com/mikr/whatstyle).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjohnmcfarlane%2Funformat","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjohnmcfarlane%2Funformat","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjohnmcfarlane%2Funformat/lists"}