{"id":17770096,"url":"https://github.com/j3rn/analyzer","last_synced_at":"2025-04-01T14:24:44.232Z","repository":{"id":78296517,"uuid":"589635598","full_name":"J3RN/analyzer","owner":"J3RN","description":null,"archived":false,"fork":false,"pushed_at":"2023-10-11T21:48:01.000Z","size":27,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-02-07T09:13:11.495Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Haskell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/J3RN.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","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":"2023-01-16T15:26:56.000Z","updated_at":"2023-01-17T23:10:13.000Z","dependencies_parsed_at":"2024-10-27T01:04:30.601Z","dependency_job_id":null,"html_url":"https://github.com/J3RN/analyzer","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/J3RN%2Fanalyzer","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/J3RN%2Fanalyzer/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/J3RN%2Fanalyzer/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/J3RN%2Fanalyzer/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/J3RN","download_url":"https://codeload.github.com/J3RN/analyzer/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246652738,"owners_count":20812178,"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-10-26T21:20:33.438Z","updated_at":"2025-04-01T14:24:44.212Z","avatar_url":"https://github.com/J3RN.png","language":"Haskell","funding_links":[],"categories":[],"sub_categories":[],"readme":"# analyzer\n\nA tool that allows you to query a call-graph.\n\n## Usage\n\nThis tool accepts the call-graph as a CSV (e.g. generated by [viz](https://github.com/j3rn/viz)) with just a `source` and `target` column.\n\n### Commands\n\n#### dot\n\n```\n$ analyzer dot INPUTFILE [-o|--out FILE] [--sink SINK] [--source SOURCE]\n```\n\nCreates a visualization of the call graph in GraphViz DOT format.\n\nThe `--sink` flag specifies a filter that limits paths shown in the graph to those that terminate in the specified function.  For instance, if you wanted to generate a call graph of all paths that terminate in `MyApp.Repo.all/1` from an `out.csv` file, you would write:\n```\n$ analyzer dot out.csv --sink MyApp.all/1\n```\n\nMultiple `--sink`s can be specified and are permitted and are \"OR\"ed together.  For instance if you wanted to generate a call graph of all paths that terminate in `MyApp.Repo.all/1` or `MyApp.Repo.get/2`, you would write:\n```\n$ analyzer dot out.csv --sink MyApp.all/1 --sink MyApp.Repo.get/2\n```\n\nThe `--source` flag specifies a filter that limits paths shown in the graph to those that begin with the specified function.  For instance if you wanted to generate a call graph of all paths beginning at `MyApp.Feature.do_thing/2`, you would write:\n```\n$ analyzer dot out.csv --source MyApp.Feature.do_thing/2\n```\n\nMultiple `--source`s can be specified; multiple of the same or \"OR\"ed together.\n\nThe `--source` and `--sink` flags can be combined to limit the output to paths from sources to sinks.  For instance, if you wanted to generate a call graph of all paths from `MyApp.Feature.do_thing/2` to `MyApp.Repo.all/1`, you would write:\n\n```\n$ analyzer dot out.csv --source MyApp.Feature.do_thing/2 --sink MyApp.Repo.all/1\n```\n\nOrder of the flags does not matter.\n\n#### paths\n\n```\n$ analyzer paths INPUTFILE SOURCE SINK\n```\n\nLists all of the code paths from `SOURCE` to `SINK`.  Each list is specified by a series of lines, each line containing the name of a single function, starting at `SOURCE` and ending at `SINK`.\n\n#### callers\n\n```\n$ analyzer callers INPUTFILE CALLEE.\n```\n\nLists all of the functions that call `CALLEE`.\n\n#### dependents\n\n```\n$ analyzer dependents INPUTFILE DEPENDENCY\n```\n\nLists all of the functions that call `DEPENDENCY`, recursively.\n\n#### callees\n\n```\n$ analyzer callees INPUTFILE CALLER\n```\n\nLists all of the functions that `CALLER` calls.\n\n\n#### dependencies\n\n```\n$ analyzer dependencies INPUTFILE DEPENDENT\n```\n\nLists all of the functions `DEPENDENT` calls, recursively.\n\n## Building\n\nThis project is written in Haskell and uses [Stack](https://docs.haskellstack.org/en/stable/).  Once you have Stack installed and the project cloned to your machine, you should be able to build the project by running `stack build` in the project directory.  To install the project to your `~/.local/bin`, run `stack install`.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fj3rn%2Fanalyzer","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fj3rn%2Fanalyzer","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fj3rn%2Fanalyzer/lists"}