{"id":17684361,"url":"https://github.com/luizm/action-sh-checker","last_synced_at":"2026-01-04T19:15:41.028Z","repository":{"id":36409725,"uuid":"221947796","full_name":"luizm/action-sh-checker","owner":"luizm","description":"A GitHub action that performs static analysis for shell scripts using shellcheck, shfmt and checkbashisms.","archived":false,"fork":false,"pushed_at":"2025-01-23T21:42:43.000Z","size":113,"stargazers_count":134,"open_issues_count":5,"forks_count":13,"subscribers_count":4,"default_branch":"master","last_synced_at":"2025-05-07T10:02:00.955Z","etag":null,"topics":["checkbashisms","github-actions","shell-script","shellcheck","shftm"],"latest_commit_sha":null,"homepage":"","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/luizm.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,"zenodo":null}},"created_at":"2019-11-15T15:09:52.000Z","updated_at":"2025-05-06T12:26:41.000Z","dependencies_parsed_at":"2025-04-14T14:03:07.373Z","dependency_job_id":null,"html_url":"https://github.com/luizm/action-sh-checker","commit_stats":{"total_commits":113,"total_committers":15,"mean_commits":7.533333333333333,"dds":0.5929203539823009,"last_synced_commit":"17bd25a6ee188d2b91f677060038f4ba37ba14b2"},"previous_names":[],"tags_count":24,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/luizm%2Faction-sh-checker","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/luizm%2Faction-sh-checker/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/luizm%2Faction-sh-checker/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/luizm%2Faction-sh-checker/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/luizm","download_url":"https://codeload.github.com/luizm/action-sh-checker/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":253850279,"owners_count":21973661,"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":["checkbashisms","github-actions","shell-script","shellcheck","shftm"],"created_at":"2024-10-24T10:05:09.114Z","updated_at":"2026-01-04T19:15:35.986Z","avatar_url":"https://github.com/luizm.png","language":"Shell","funding_links":[],"categories":["others","Shell"],"sub_categories":[],"readme":"# sh-checker\n\n[![Build](https://github.com/luizm/action-sh-checker/actions/workflows/ci.yml/badge.svg)](https://github.com/luizm/action-sh-checker/actions/workflows/ci.yml)\n\nA [GitHub action](https://docs.github.com/en/free-pro-team@latest/actions) that performs static analysis of shell scripts using [shellcheck](https://github.com/koalaman/shellcheck), [shfmt](https://github.com/mvdan/sh) and [checkbashisms](https://linux.die.net/man/1/checkbashisms)\n\n![Screen Shot 2020-04-01 at 12 18 59](https://user-images.githubusercontent.com/6004689/78155536-f9a8a080-7413-11ea-8b5c-2c96484feb61.png)\n\n## Usage\n\nJob example to check all sh files but ignore the directory `.terraform` and file `dir/example.sh`\n\n```yaml\nname: example\non:\n  - pull_request\njobs:\n  sh-checker:\n    runs-on: ubuntu-latest\n    steps:\n      - uses: actions/checkout@v3\n      - name: Run the sh-checker\n        uses: luizm/action-sh-checker@master\n        env:\n          GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}\n          SHELLCHECK_OPTS: -e SC1004 # exclude some shellcheck warnings.\n          SHFMT_OPTS: -s # arguments to shfmt.\n        with:\n          sh_checker_comment: true\n          sh_checker_exclude: \".terraform ^dir/example.sh\"\n```\n\n### Environment Variables\n\n`SHELLCHECK_OPTS`: Used to specify shellcheck arguments.\n\n`SHFMT_OPTS`: Used to specify shfmt arguments.\n\n### Inputs\n\n`sh_checker_only_diff`: (optional) Only check the files that were changed in the pull request. Default is to check all files in the repo.\n\n`sh_checker_exclude`: (optional) Directory or file name that doesn't need to be checked.\n\n`sh_checker_comment`: (optional) If true, it will show the errors as commentaries in the pull requests. Default is false.\n\n`sh_checker_shfmt_disable`: (optional) If true, it will skip shfmt. Default is false.\n\n`sh_checker_shellcheck_disable`: (optional) If true, it will skip shellcheck. Default is false.\n\n`sh_checker_checkbashisms_enable`: (optional) If true, run checkbashisms tool against scripts. Default is false.\n\n### Secrets\n\n`GITHUB_TOKEN`: The GitHub API token used to post comments to pull requests. Required only if `sh_checker_only_diff` or `sh_checker_comment` is set to true.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fluizm%2Faction-sh-checker","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fluizm%2Faction-sh-checker","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fluizm%2Faction-sh-checker/lists"}