{"id":13602878,"url":"https://github.com/vscode-shellcheck/vscode-shellcheck","last_synced_at":"2025-05-15T02:09:22.709Z","repository":{"id":37794210,"uuid":"70320385","full_name":"vscode-shellcheck/vscode-shellcheck","owner":"vscode-shellcheck","description":"Integrates ShellCheck into VS Code, a linter for Shell scripts.","archived":false,"fork":false,"pushed_at":"2025-05-12T18:26:28.000Z","size":6534,"stargazers_count":845,"open_issues_count":26,"forks_count":45,"subscribers_count":11,"default_branch":"master","last_synced_at":"2025-05-13T09:08:25.607Z","etag":null,"topics":["bash","hacktoberfest","linter","shell","visual-studio-code","vscode","vscode-extension"],"latest_commit_sha":null,"homepage":"https://marketplace.visualstudio.com/items?itemName=timonwong.shellcheck","language":"TypeScript","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/vscode-shellcheck.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"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,"zenodo":null},"funding":{"github":["felipecrs"],"patreon":"timonwong"}},"created_at":"2016-10-08T09:29:11.000Z","updated_at":"2025-05-12T12:11:21.000Z","dependencies_parsed_at":"2023-10-14T17:36:10.394Z","dependency_job_id":"e7813956-55bf-4e20-a2f7-02a4a8fa53bd","html_url":"https://github.com/vscode-shellcheck/vscode-shellcheck","commit_stats":{"total_commits":1121,"total_committers":21,"mean_commits":53.38095238095238,"dds":0.2988403211418377,"last_synced_commit":"d5ec2fcc4ba077583ba94e991cde09329bb07c21"},"previous_names":["timonwong/vscode-shellcheck"],"tags_count":105,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vscode-shellcheck%2Fvscode-shellcheck","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vscode-shellcheck%2Fvscode-shellcheck/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vscode-shellcheck%2Fvscode-shellcheck/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vscode-shellcheck%2Fvscode-shellcheck/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/vscode-shellcheck","download_url":"https://codeload.github.com/vscode-shellcheck/vscode-shellcheck/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":254259384,"owners_count":22040820,"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":["bash","hacktoberfest","linter","shell","visual-studio-code","vscode","vscode-extension"],"created_at":"2024-08-01T18:01:41.401Z","updated_at":"2025-05-15T02:09:22.648Z","avatar_url":"https://github.com/vscode-shellcheck.png","language":"TypeScript","readme":"# ShellCheck for Visual Studio Code\n\nIntegrates [ShellCheck](https://github.com/koalaman/shellcheck) into VS Code, a linter for Shell scripts.\n\n[![Latest version](https://badgen.net/github/release/vscode-shellcheck/vscode-shellcheck?label=Latest%20version)](https://github.com/vscode-shellcheck/vscode-shellcheck/releases/latest)\n[![VS Marketplace installs](https://badgen.net/vs-marketplace/i/timonwong.shellcheck?label=VS%20Marketplace%20installs)](https://marketplace.visualstudio.com/items?itemName=timonwong.shellcheck)\n[![VS Marketplace downloads](https://badgen.net/vs-marketplace/d/timonwong.shellcheck?label=VS%20Marketplace%20downloads)](https://marketplace.visualstudio.com/items?itemName=timonwong.shellcheck)\n[![Open VSX downloads](https://badgen.net/open-vsx/d/timonwong/shellcheck?color=purple\u0026label=Open%20VSX%20downloads)](https://open-vsx.org/extension/timonwong/shellcheck)\n\n## Quick start\n\n![Extension GIF](https://user-images.githubusercontent.com/29582865/106907134-c299c000-66b2-11eb-8d8b-ea1bd898cb3a.gif)\n\n## Disclaimer\n\nThis VS Code extension requires [shellcheck] (the awesome static analysis tool for shell scripts) to work, but precompiled [shellcheck] binaries are bundled in this extension for these platforms:\n\n- Linux (`x86_64`, `arm64`, `arm`)\n- macOS (`x86_64`, `arm64`)\n- Windows (`x86_64`, `arm64` with the `x86_64` binary)\n\n## Requirements\n\n1. Run [`Install Extension`](https://code.visualstudio.com/docs/editor/extension-gallery#_install-an-extension) command from [Command Palette](https://code.visualstudio.com/Docs/editor/codebasics#_command-palette).\n2. Search and choose `shellcheck`.\n\n## Troubleshooting\n\nIf shellcheck seems not working, a helper command `ShellCheck: ShellCheck: Collect Diagnostics For Current Document` from the [Command Palette](https://code.visualstudio.com/Docs/editor/codebasics#_command-palette) is provided to help troubleshooting.\n\n## Options\n\nThere are various options that can be configured by making changes to your user or workspace preferences.\n\nDefault options are:\n\n```jsonc\n{\n  \"shellcheck.enable\": true,\n  \"shellcheck.enableQuickFix\": true,\n  \"shellcheck.run\": \"onType\",\n  \"shellcheck.executablePath\": \"\", // Priority: user defined \u003e bundled shellcheck binary \u003e \"shellcheck\"\n  \"shellcheck.exclude\": [],\n  \"shellcheck.customArgs\": [],\n  \"shellcheck.ignorePatterns\": {\n    \"**/*.csh\": true,\n    \"**/*.cshrc\": true,\n    \"**/*.fish\": true,\n    \"**/*.login\": true,\n    \"**/*.logout\": true,\n    \"**/*.tcsh\": true,\n    \"**/*.tcshrc\": true,\n    \"**/*.xonshrc\": true,\n    \"**/*.xsh\": true,\n    \"**/*.zsh\": true,\n    \"**/*.zshrc\": true,\n    \"**/zshrc\": true,\n    \"**/*.zprofile\": true,\n    \"**/zprofile\": true,\n    \"**/*.zlogin\": true,\n    \"**/zlogin\": true,\n    \"**/*.zlogout\": true,\n    \"**/zlogout\": true,\n    \"**/*.zshenv\": true,\n    \"**/zshenv\": true,\n    \"**/*.zsh-theme\": true\n  },\n  \"shellcheck.ignoreFileSchemes\": [\"git\", \"gitfs\", \"output\"]\n}\n```\n\n### `shellcheck.ignorePatterns`\n\nThe `shellcheck.ignorePatterns` works exactly the same as `search.exclude`, read more about glob patterns [here](https://code.visualstudio.com/docs/editor/codebasics#_advanced-search-options)\n\nFor example:\n\n```jsonc\n{\n  \"shellcheck.ignorePatterns\": {\n    \"**/*.zsh\": true,\n    \"**/*.zsh*\": true,\n    \"**/.git/*.sh\": true,\n    \"**/folder/**/*.sh\": true\n  }\n}\n```\n\nTo add additional ignore patterns atop the default patterns, you have to copy the default ignore patterns and then add yours to the end of the list ([#1196](https://github.com/vscode-shellcheck/vscode-shellcheck/issues/1196)).\n\n### Fix all errors on save\n\nThe auto-fixable errors can be fixed automatically on save by using the following configuration:\n\n```jsonc\n{\n  \"editor.codeActionsOnSave\": {\n    \"source.fixAll.shellcheck\": \"explicit\"\n  }\n}\n```\n\nAlternatively, you can fix all errors on demand by running the command _Fix All_ in the VS Code Command Palette.\n\n### Lint `onType` or `onSave`\n\nBy default the linter will lint as you type. Alternatively, set `shellcheck.run` to `onSave` if you want to lint only when the file is saved (works best if auto-save is on).\n\n```jsonc\n{\n  \"shellcheck.run\": \"onType\" // also: \"onSave\"\n}\n```\n\n### Excluding Checks\n\nBy default all shellcheck checks are performed and reported on as necessary. To globally ignore certain checks in all files, you can use a `.shellcheckrc` at the workspace root. For example, to exclude [SC1017](https://github.com/koalaman/shellcheck/wiki/SC1017):\n\n```ini\n# .shellcheckrc\n\ndisable=SC1017\n```\n\nAs last resort, you can also add the \"SC identifiers\" to `shellcheck.exclude` extension setting. For example, to exclude [SC1017](https://github.com/koalaman/shellcheck/wiki/SC1017):\n\n```jsonc\n{\n  \"shellcheck.exclude\": [\"1017\"]\n}\n```\n\n### Using Docker version of shellcheck\n\nIn order to get it to work, you need a \"shim\" script. Just remember not to try to construct command line arguments for shellcheck yourself.\n\nHere is a simple \"shim\" script to get started with (see discussion: [#24](https://github.com/vscode-shellcheck/vscode-shellcheck/issues/24)):\n\n```shell\n#!/bin/bash\n\nexec docker run --rm --interactive --volume \"${PWD}:/mnt:ro\" koalaman/shellcheck:latest \"$@\"\n```\n\nFor example, you can place it at `shellcheck.sh` in the root of your workspace with execution permission (`chmod +x shellcheck.sh`).\n\nYou can can then configure the extension to use it with:\n\n```jsonc\n// .vscode/settings.json\n{\n  // use the shim as shellcheck executable\n  \"shellcheck.executablePath\": \"${workspaceFolder}/shellcheck.sh\",\n\n  // you may also need to turn this option on, so shellcheck in the container\n  // can access all the files in the workspace and not only the directory\n  // where the file being linted is.\n  \"shellcheck.useWorkspaceRootAsCwd\": true\n}\n```\n\nJust have in mind that this should come with a performance hit, as booting up a docker container is slower than just invoking the binary.\n\n## Advanced usage\n\n### Integrating other VS Code extensions\n\nThis extension provides a small API, which allows other VS Code extensions to interact with the ShellCheck extension. For details, see [API.md](./doc/API.md).\n\n## Acknowledgements\n\nThis extension was originally based on @hoovercj's [Haskell Linter](https://github.com/hoovercj/vscode-haskell-linter).\n\n## LICENSE\n\nThis extension is licensed under the [MIT license](./LICENSE).\n\nBundled [shellcheck] binaries are licensed under [GPLv3](https://github.com/koalaman/shellcheck/blob/master/LICENSE).\n\n[shellcheck]: https://github.com/koalaman/shellcheck\n","funding_links":["https://github.com/sponsors/felipecrs","https://patreon.com/timonwong"],"categories":["TypeScript","bash","visual-studio-code"],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvscode-shellcheck%2Fvscode-shellcheck","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fvscode-shellcheck%2Fvscode-shellcheck","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvscode-shellcheck%2Fvscode-shellcheck/lists"}