{"id":13562090,"url":"https://github.com/tmknom/shfmt","last_synced_at":"2025-04-03T04:37:23.684Z","repository":{"id":78277739,"uuid":"150083642","full_name":"tmknom/shfmt","owner":"tmknom","description":"Dockernized shfmt. This formats shell script.","archived":false,"fork":false,"pushed_at":"2019-05-03T15:42:57.000Z","size":15,"stargazers_count":29,"open_issues_count":0,"forks_count":5,"subscribers_count":3,"default_branch":"master","last_synced_at":"2024-11-04T14:42:57.216Z","etag":null,"topics":["docker","docker-image","dockerfile","formatter","shell-script"],"latest_commit_sha":null,"homepage":"https://github.com/mvdan/sh","language":"Makefile","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/tmknom.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}},"created_at":"2018-09-24T10:01:35.000Z","updated_at":"2024-10-17T21:32:37.000Z","dependencies_parsed_at":"2023-02-28T03:46:26.753Z","dependency_job_id":null,"html_url":"https://github.com/tmknom/shfmt","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/tmknom%2Fshfmt","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tmknom%2Fshfmt/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tmknom%2Fshfmt/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tmknom%2Fshfmt/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/tmknom","download_url":"https://codeload.github.com/tmknom/shfmt/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246939174,"owners_count":20857916,"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":["docker","docker-image","dockerfile","formatter","shell-script"],"created_at":"2024-08-01T13:01:04.441Z","updated_at":"2025-04-03T04:37:23.661Z","avatar_url":"https://github.com/tmknom.png","language":"Makefile","funding_links":[],"categories":["Makefile"],"sub_categories":[],"readme":"# shfmt\n\n[![CircleCI](https://circleci.com/gh/tmknom/shfmt.svg?style=svg)](https://circleci.com/gh/tmknom/shfmt)\n[![Docker Build Status](https://img.shields.io/docker/cloud/build/tmknom/shfmt.svg)](https://hub.docker.com/r/tmknom/shfmt/builds/)\n[![Docker Automated build](https://img.shields.io/docker/cloud/automated/tmknom/shfmt.svg)](https://hub.docker.com/r/tmknom/shfmt/)\n[![MicroBadger Size](https://img.shields.io/microbadger/image-size/tmknom/shfmt.svg)](https://microbadger.com/images/tmknom/shfmt)\n[![MicroBadger Layers](https://img.shields.io/microbadger/layers/tmknom/shfmt.svg)](https://microbadger.com/images/tmknom/shfmt)\n[![License](https://img.shields.io/github/license/tmknom/shfmt.svg)](https://opensource.org/licenses/Apache-2.0)\n\nFormat shell script based on Docker.\n\nThis is [shfmt](https://github.com/mvdan/sh) wrapper.\n\n## Requirements\n\n- [Docker](https://www.docker.com/)\n\n## Usage\n\n### Format a file\n\n```sh\ndocker run --rm -v $PWD:/work tmknom/shfmt foo.sh\n```\n\n### Format all .sh extension\n\nUse `-w` to write result to file instead of stdout.\n\n```sh\ndocker run --rm -v $PWD:/work tmknom/shfmt -w **/*.sh\n```\n\n### Format Google's Shell Style Guide\n\nUse `-i N` to indent with a number of spaces instead of tabs.\nGet the formatting appropriate for [Google's Shell Style Guide](https://google.github.io/styleguide/shell.xml).\n\n```sh\ndocker run --rm -v $PWD:/work tmknom/shfmt -i 2 -ci -w **/*.sh\n```\n\n### Help\n\nFor details, refer to [mvdan/sh](https://github.com/mvdan/sh).\n\n```sh\ndocker run --rm -v $PWD:/work tmknom/shfmt\n```\n\n## Makefile targets\n\n```text\nbuild                          Build docker image\nformat                         Format code\nhelp                           Show help\ninstall                        Install requirements\nlint                           Lint code\n```\n\n## Development\n\n### Installation\n\n```shell\ngit clone git@github.com:tmknom/shfmt.git\ncd shfmt\nmake install\n```\n\n### Deployment\n\nAutomatically deployed by \"[DockerHub Automated Build](https://docs.docker.com/docker-hub/builds/)\" after merge.\n\n### Deployment Pipeline\n\n1. GitHub - Version Control System\n   - \u003chttps://github.com/tmknom/shfmt\u003e\n2. CircleCI - Continuous Integration\n   - \u003chttps://circleci.com/gh/tmknom/shfmt\u003e\n3. Docker Hub - Docker Registry\n   - \u003chttps://hub.docker.com/r/tmknom/shfmt\u003e\n4. MicroBadger - Docker Inspection\n   - \u003chttps://microbadger.com/images/tmknom/shfmt\u003e\n\n## License\n\nApache 2 Licensed. See LICENSE for full details.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftmknom%2Fshfmt","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftmknom%2Fshfmt","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftmknom%2Fshfmt/lists"}