{"id":19773199,"url":"https://github.com/mbarbin/file-rewriter","last_synced_at":"2025-02-28T05:16:40.348Z","repository":{"id":255525399,"uuid":"851531381","full_name":"mbarbin/file-rewriter","owner":"mbarbin","description":"Apply small rewrites to tweak or refactor your files","archived":false,"fork":false,"pushed_at":"2025-01-10T10:53:10.000Z","size":97,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-01-10T11:43:48.091Z","etag":null,"topics":["codemods"],"latest_commit_sha":null,"homepage":"","language":"OCaml","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/mbarbin.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGES.md","contributing":null,"funding":null,"license":"COPYING.HEADER","code_of_conduct":"CODE_OF_CONDUCT.md","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-09-03T09:10:09.000Z","updated_at":"2025-01-10T10:53:13.000Z","dependencies_parsed_at":"2024-09-05T23:25:24.203Z","dependency_job_id":"3dd4f728-d9e1-42e5-9fc8-4aba19eafa4b","html_url":"https://github.com/mbarbin/file-rewriter","commit_stats":null,"previous_names":["mbarbin/file-rewriter"],"tags_count":3,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mbarbin%2Ffile-rewriter","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mbarbin%2Ffile-rewriter/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mbarbin%2Ffile-rewriter/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mbarbin%2Ffile-rewriter/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mbarbin","download_url":"https://codeload.github.com/mbarbin/file-rewriter/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":241104153,"owners_count":19910382,"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":["codemods"],"created_at":"2024-11-12T05:08:56.042Z","updated_at":"2025-02-28T05:16:40.329Z","avatar_url":"https://github.com/mbarbin.png","language":"OCaml","funding_links":[],"categories":[],"sub_categories":[],"readme":"# file-rewriter\n\n[![CI Status](https://github.com/mbarbin/file-rewriter/workflows/ci/badge.svg)](https://github.com/mbarbin/file-rewriter/actions/workflows/ci.yml)\n[![Coverage Status](https://coveralls.io/repos/github/mbarbin/file-rewriter/badge.svg?branch=main)](https://coveralls.io/github/mbarbin/file-rewriter?branch=main)\n\nFile-rewriter is an OCaml library for applying small rewrites to tweak or refactor your files. It provides a convenient interface to apply surgical textual substitutions on the fly, while navigating the contents of a file through an abstract representation containing code locations.\n\n## Other libraries\n\nThe repository also contain `sexps_rewriter`, a specialized version of the main library dedicated to rewriting sexp files.\n\n## Motivation\n\nWe created these libraries as part of an ongoing work to create linting and refactoring tools for the many `dune` files found in big monorepos (see [dunolint](https://github.com/mbarbin/dunolint)).\n\n## Acknowledgments\n\nWe've been inspired by this [blog post](https://blog.janestreet.com/converting-a-code-base-from-camlp4-to-ppx/).\n\nIn particular, we've reused the idea of registering substitutions while itering through the locations of an AST. While we didn't reuse any particular project or existing code for our libraries, we're thankful to Jeremie Dimino and Jane Street for the work and technics discussed in their blog post.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmbarbin%2Ffile-rewriter","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmbarbin%2Ffile-rewriter","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmbarbin%2Ffile-rewriter/lists"}