{"id":13531966,"url":"https://github.com/reviewdog/action-shellcheck","last_synced_at":"2025-04-01T20:31:08.338Z","repository":{"id":35318337,"uuid":"211116201","full_name":"reviewdog/action-shellcheck","owner":"reviewdog","description":"Run shellcheck with reviewdog","archived":false,"fork":false,"pushed_at":"2025-03-18T18:25:29.000Z","size":97,"stargazers_count":104,"open_issues_count":7,"forks_count":23,"subscribers_count":32,"default_branch":"master","last_synced_at":"2025-03-28T16:04:26.896Z","etag":null,"topics":["reviewdog","shellcheck"],"latest_commit_sha":null,"homepage":"https://github.com/marketplace?type=actions\u0026query=reviewdog","language":"Shell","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/reviewdog.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,"dei":null,"publiccode":null,"codemeta":null},"funding":{"github":["reviewdog"],"open_collective":"reviewdog","patreon":null,"ko_fi":null,"tidelift":null,"community_bridge":null,"liberapay":null,"issuehunt":null,"otechie":null,"custom":null}},"created_at":"2019-09-26T15:00:28.000Z","updated_at":"2025-03-18T18:25:35.000Z","dependencies_parsed_at":"2024-01-11T00:03:57.603Z","dependency_job_id":"71544b77-69d2-412f-ab6a-9713710e79f9","html_url":"https://github.com/reviewdog/action-shellcheck","commit_stats":{"total_commits":77,"total_committers":12,"mean_commits":6.416666666666667,"dds":0.5714285714285714,"last_synced_commit":"ccaafec556ffa154f112bfcb7b9c9574190b7091"},"previous_names":[],"tags_count":72,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/reviewdog%2Faction-shellcheck","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/reviewdog%2Faction-shellcheck/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/reviewdog%2Faction-shellcheck/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/reviewdog%2Faction-shellcheck/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/reviewdog","download_url":"https://codeload.github.com/reviewdog/action-shellcheck/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246709923,"owners_count":20821297,"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":["reviewdog","shellcheck"],"created_at":"2024-08-01T07:01:07.252Z","updated_at":"2025-04-01T20:31:03.326Z","avatar_url":"https://github.com/reviewdog.png","language":"Shell","funding_links":["https://github.com/sponsors/reviewdog","https://opencollective.com/reviewdog"],"categories":["Community Resources"],"sub_categories":["Static Analysis"],"readme":"# GitHub Action: Run shellcheck with reviewdog\n\n[![Docker Image CI](https://github.com/reviewdog/action-shellcheck/workflows/Docker%20Image%20CI/badge.svg)](https://github.com/reviewdog/action-shellcheck/actions)\n[![depup](https://github.com/reviewdog/action-shellcheck/workflows/depup/badge.svg)](https://github.com/reviewdog/action-shellcheck/actions?query=workflow%3Adepup)\n[![release](https://github.com/reviewdog/action-shellcheck/workflows/release/badge.svg)](https://github.com/reviewdog/action-shellcheck/actions?query=workflow%3Arelease)\n[![GitHub release (latest SemVer)](https://img.shields.io/github/v/release/reviewdog/action-shellcheck?logo=github\u0026sort=semver)](https://github.com/reviewdog/action-shellcheck/releases)\n[![action-bumpr supported](https://img.shields.io/badge/bumpr-supported-ff69b4?logo=github\u0026link=https://github.com/haya14busa/action-bumpr)](https://github.com/haya14busa/action-bumpr)\n\nThis action runs [shellcheck](https://github.com/koalaman/shellcheck) with\n[reviewdog](https://github.com/reviewdog/reviewdog) on pull requests to improve\ncode review experience.\n\n[![github-pr-check sample](https://user-images.githubusercontent.com/3797062/65701219-e828b980-e0bb-11e9-9051-2a1f400fe5e5.png)](https://github.com/reviewdog/action-shellcheck/pull/1)\n[![github-pr-review sample](https://user-images.githubusercontent.com/3797062/65700741-1c4faa80-e0bb-11e9-8cbd-9a99aeb38594.png)](https://github.com/reviewdog/action-shellcheck/pull/1)\n\n## Inputs\n\n### `github_token`\n\nOptional. `${{ github.token }}` is used by default.\n\n### `level`\n\nOptional. Report level for reviewdog [info,warning,error].\nIt's same as `-level` flag of reviewdog.\n\n### `reporter`\n\nReporter of reviewdog command [github-pr-check,github-pr-review,github-check].\nDefault is github-pr-check.\ngithub-pr-review can use Markdown and add a link to rule page in reviewdog reports.\n\n### `filter_mode`\n\nOptional. Filtering mode for the reviewdog command [added,diff_context,file,nofilter].\nDefault is `file`.\n\n### `fail_on_error`\n\nOptional.  Exit code for reviewdog when errors are found [true,false]\nDefault is `false`.\n\n### `reviewdog_flags`\n\nOptional. Additional reviewdog flags\n\n### `path`\n\nOptional. Base directory to run shellcheck. Same as `[path]` of `find` command. Default: `.`\n\nDirectories are separated by lines. e.g.:\n\n```yml\npath: |\n  tools\n  src\n```\n\n### `pattern`\n\nOptional. File patterns of target files. Same as `-name [pattern]` of `find` command. Default: `*.sh`\n\nPatterns are separated by lines. e.g.:\n\n```yml\npattern: |\n  *.bash\n  *.sh\n```\n\n### `exclude`\n\nOptional. Exclude patterns of target files. Same as `-not -path [exclude]` of `find` command. Default: `*/.git/*`\n\nPatterns are separated by lines. e.g.:\n\n```yml\nexclude: |\n  */.git/*\n  ./.cache/*\n```\n\n### `check_all_files_with_shebangs`\n\nOptional. Checks all files with shebangs in the repository even if they do not match `pattern`.\nDefault is `false`.\n\n### `shellcheck_flags`\n\nOptional. Flags of shellcheck command. Default: `--external-sources`\n\n## Example usage\n\n### [.github/workflows/reviewdog.yml](.github/workflows/reviewdog.yml)\n\n```yml\nname: reviewdog\non: [pull_request]\njobs:\n  shellcheck:\n    name: runner / shellcheck\n    runs-on: ubuntu-latest\n    steps:\n      - uses: actions/checkout@v4\n      - name: shellcheck\n        uses: reviewdog/action-shellcheck@v1\n        with:\n          github_token: ${{ secrets.github_token }}\n          reporter: github-pr-review # Change reporter.\n          path: \".\" # Optional.\n          pattern: \"*.sh\" # Optional.\n          exclude: \"./.git/*\" # Optional.\n          check_all_files_with_shebangs: \"false\" # Optional.\n```\n\n## Known issue\n\nRunning `shellcheck.exe` on Windows might fail with the following error:\n\n`SC1017: Literal carriage return. Run script through tr -d '\\r'`\n\nThis is due to the presence of a carriage return character (`\\r`) in the script.\n\nTo fix this, you can simply create or edit the `.gitattributes` file in the root of your repository with the following contents:\n\n```\n*.sh text eol=lf\n```\nThis would ensure that the scripts are checked out with the correct line ending.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Freviewdog%2Faction-shellcheck","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Freviewdog%2Faction-shellcheck","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Freviewdog%2Faction-shellcheck/lists"}