{"id":17093053,"url":"https://github.com/peter-murray/setup-detekt","last_synced_at":"2025-04-12T22:45:06.644Z","repository":{"id":38843487,"uuid":"323169108","full_name":"peter-murray/setup-detekt","owner":"peter-murray","description":"GitHub Action for resolving and installing a specific version of detekt on a GitHub Actions Runner.","archived":false,"fork":false,"pushed_at":"2022-09-01T09:34:29.000Z","size":309,"stargazers_count":7,"open_issues_count":0,"forks_count":0,"subscribers_count":3,"default_branch":"main","last_synced_at":"2024-03-14T21:20:46.268Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"JavaScript","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/peter-murray.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}},"created_at":"2020-12-20T21:33:35.000Z","updated_at":"2023-03-16T10:39:03.000Z","dependencies_parsed_at":"2023-01-11T17:21:42.322Z","dependency_job_id":null,"html_url":"https://github.com/peter-murray/setup-detekt","commit_stats":{"total_commits":19,"total_committers":2,"mean_commits":9.5,"dds":"0.10526315789473684","last_synced_commit":"0b43f17288ecd07eb959696d4302b73bb5659b44"},"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/peter-murray%2Fsetup-detekt","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/peter-murray%2Fsetup-detekt/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/peter-murray%2Fsetup-detekt/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/peter-murray%2Fsetup-detekt/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/peter-murray","download_url":"https://codeload.github.com/peter-murray/setup-detekt/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248643047,"owners_count":21138353,"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-14T14:04:24.162Z","updated_at":"2025-04-12T22:45:06.623Z","avatar_url":"https://github.com/peter-murray.png","language":"JavaScript","funding_links":[],"categories":["JavaScript"],"sub_categories":[],"readme":"# setup-detekt\n\nThis is a GitHub Action that will resolve and install a specific version of detekt on to a GitHub Actions Runner if\nnot already present in the tool cache.\n\nIt will provide an output of the path to the tool, as well as optionally add it to the PATH for you.\n\nThe action supports and is tested on Windows, Ubuntu and MacOS.\n\n## Implementation\n\nThis action utilizes the GitHub Actions tool cache functionality so that when downloading version of detekt from https://github.com/detekt/detekt\nthey are cached for re-use to prevent unnecessary downloading if already retrieved in another job.\n\nThe Action will process the releases from the https://github.com/detekt/detekt repository, showing only versions that provide \nthe `detekt` file asset in the releases.\n\n\n## Change in command line v0.17+\n\nSince version 0.17 and greater the release bundles for detekt were changed to move to a CLI provided zip file instead of a completely self-contained binary.\n\nWhen using versions `0.17+` of detekt, this action will download and wire the CLI bundle in to the PATH via the GitHub Actions tool-cache and as such the\nexecutable that you need to call is `detekt-cli` and not `detekt` as is was in previous versions.\n\n\n## Parameters\n\n* `detekt_version`: The version of detekt to download, defaults to `1.18`, will be changed match the the latest version in the future\n* `add_to_path`: A boolean flag indicating whether or not to add detekt to the PATH, defaults to `true`\n\n\n## Outputs\n\n* `detekt`: The path to the detekt executable that was resolved, downloaded and installed into the tool cache\n\n\n## Examples\n\nSetup detekt version `1.20` and then invoke it.\n\n```yml\nname: Install detekt\n\non:\n  workflow_dispatch:\n\njobs:\n  detekt:\n    runs-on: ubuntu-latest\n\n    steps:\n      - name: Setup detekt\n        uses: peter-murray/setup-detekt@v2\n        with:\n          detekt_version: 1.20\n\n      - name: Run detekt\n        run: detekt-cli --version\n```\n\nSetup detekt version `1.18` but not put it on the PATH, and then invoke it.\n\n```yml\nname: Install detekt\n\non:\n  workflow_dispatch:\n\njobs:\n  detekt:\n    runs-on: ubuntu-latest\n\n    steps:\n      - name: Setup detekt\n        uses: peter-murray/setup-detekt@v2\n        with:\n          detekt_version: 1.18\n          add_to_path: false\n\n      - name: Run detekt\n        run: ${{ steps.setup_detekt.outputs.detekt }}/detekt-cli --version\n```\n\nNote, on Windows runners you would need to use `detekt-cli.bat` instead of `detekt-cli` above.\n\n\nSetup detekt version `1.15`, not installing it on the PATH and then invoking it via reference (this is an executable release version)\n\n```yml\nname: Install detekt\n\non:\n  workflow_dispatch:\n\njobs:\n  detekt:\n    runs-on: ubuntu-latest\n\n    steps:\n      - name: Setup detekt\n        id: setup_detekt\n        uses: peter-murray/setup-detekt@v2\n        with:\n          detekt_version: v0.15\n          add_to_path: false\n\n      - name: Run detekt\n        run: ${{ steps.setup_detekt.outputs.detekt }} --version\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpeter-murray%2Fsetup-detekt","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpeter-murray%2Fsetup-detekt","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpeter-murray%2Fsetup-detekt/lists"}