{"id":16592421,"url":"https://github.com/hauleth/mix_machine","last_synced_at":"2025-08-11T18:08:46.083Z","repository":{"id":45892019,"uuid":"411277855","full_name":"hauleth/mix_machine","owner":"hauleth","description":"Machine output for Mix tasks","archived":false,"fork":false,"pushed_at":"2023-03-23T11:49:07.000Z","size":71,"stargazers_count":16,"open_issues_count":7,"forks_count":2,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-08-02T20:24:24.925Z","etag":null,"topics":["code-quality","codeclimate","elixir","elixir-lang","hacktoberfest","mix","sarif","sarif-report"],"latest_commit_sha":null,"homepage":"","language":"Elixir","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/hauleth.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.md","funding":".github/FUNDING.yml","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},"funding":{"github":["hauleth"]}},"created_at":"2021-09-28T12:45:16.000Z","updated_at":"2023-06-04T08:24:19.000Z","dependencies_parsed_at":"2024-10-28T10:27:26.061Z","dependency_job_id":"dd97172c-49c6-4c0c-af44-d2ed0123c1eb","html_url":"https://github.com/hauleth/mix_machine","commit_stats":{"total_commits":38,"total_committers":3,"mean_commits":"12.666666666666666","dds":"0.10526315789473684","last_synced_commit":"f5fd9e3444aa262406f9b0bce7662a7f248c93bb"},"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"purl":"pkg:github/hauleth/mix_machine","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hauleth%2Fmix_machine","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hauleth%2Fmix_machine/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hauleth%2Fmix_machine/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hauleth%2Fmix_machine/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/hauleth","download_url":"https://codeload.github.com/hauleth/mix_machine/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hauleth%2Fmix_machine/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":269931473,"owners_count":24498722,"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","status":"online","status_checked_at":"2025-08-11T02:00:10.019Z","response_time":75,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"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":["code-quality","codeclimate","elixir","elixir-lang","hacktoberfest","mix","sarif","sarif-report"],"created_at":"2024-10-11T23:20:51.928Z","updated_at":"2025-08-11T18:08:46.061Z","avatar_url":"https://github.com/hauleth.png","language":"Elixir","funding_links":["https://github.com/sponsors/hauleth"],"categories":[],"sub_categories":[],"readme":"# MixMachine\n\nMake Mix compilation produce report that is machine-readable.\n\nCurrently supported formats:\n\n- [SARIF][] used by [GitHub Code Scanning][gha]\n- [CodeClimate][cc] used by [GitLab Code Quality][gl-cq]\n\n[SARIF]: https://sarifweb.azurewebsites.net\n[gha]: https://docs.github.com/en/code-security/code-scanning/integrating-with-code-scanning/sarif-support-for-code-scanning\n[cc]: https://codeclimate.com/customers/\n[gl-cq]: https://docs.gitlab.com/ee/user/project/merge_requests/code_quality.html\n\n## Usage\n\nAdd it to list of your dependencies:\n\n```elixir\ndef deps do\n  [\n    {:mix_machine, \"~\u003e 0.1.0\"}\n  ]\nend\n```\n\nAnd now you can use:\n\n```\n$ mix compile.machine\n```\n\nThat will produce `report.json` with SARIF format.\n\n## Configration\n\nCurrent behaviour can be controlled by few flags:\n\n + `--format \u003cformat\u003e` (`-f`) - output format, currently supported values are\n   `sarif` and `code_climate`, defaults to `sarif`.\n + `--output \u003cpath\u003e` (`-o`) - output file, defaults to `report.json`.\n + `--pretty` - pretty print output.\n\nIn addition to CLI flags these options can be set in `project/0` function in\n`mix.exs` in `:machine` keyword list (it has lower precedence than CLI flags):\n\n + `:format` - atom `:sarif` or `:code_climate` that describes default format.\n + `:output` - default filename to produce output.\n + `:pretty` - boolean flag whether the output should be pretty printed.\n + `:root` - relative path to root directory, defaults to current working\n   directory. It can be useful in situations when you have multirepo where\n   the Elixir application isn't mounted at root of the repository.\n\n### Example\n\n```elixir\ndef project do\n  [\n    # …\n    machine: [\n      format: :code_climate,\n      output: \"codeclimate.json\",\n      pretty: true,\n      root: \"..\"\n    ]\n  ]\n```\n\n### Usage in GitHub Actions\n\nIn your github `.yml` file, after you download Elixir deps, compile your project\nwith `mix mix_machine.compile`.\n\n``` yaml\n    - name: Compile Deps\n      run: mix deps.compile\n    - name: Compile Project\n      run: mix compile.machine\n```\n\nNote: This must come before any other lines that would inadvertently compile\nyour code such as `mix test`!\n\nNote: the `mix deps.compile` in a separate step is not required but it can be\nhelpful to separate any compilation warnings in your project from any\ncompilation warnings in your deps.\n\nThen later in the `.yml` file add this to upload your Sarif file to your GitHub repository:\n``` yaml\n    - name: Upload Sarif\n      uses: github/codeql-action/upload-sarif@v1\n      with:\n        sarif_file: report.json\n```\n\n## License\n\nSee [LICENSE](LICENSE).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhauleth%2Fmix_machine","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fhauleth%2Fmix_machine","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhauleth%2Fmix_machine/lists"}