Skip to content

[Feature Request] Expose shellcheck and shfmt as vscode code actions #1395

Open

Description

@lonix1

What is the problem this feature will solve?

Currently: shellcheck is run automatically on document changes, while shfmt is exposed through formatting.

That makes it difficult to control when they are run, and one cannot control their order.

What is the feature you are proposing to solve the problem?

Bash IDE should expose both as vscode "Code Actions".

Using array syntax, which preserves ordering:

"[shellscript]": {
  "editor.codeActionsOnSave": [
    "source.fixAll.bashide-format",
    "source.fixAll.bashide-lint"
  ]
}

Or using object syntax, which exposes fine-grained policies:

"[shellscript]": {
  "editor.codeActionsOnSave": {
    "source.fixAll.bashide-format": "explicit",
    "source.fixAll.bashide-lint": "explicit"
  }
}

Code actions are the modern approach for this behaviour. Other formatting/linting extensions already work this way, and could be used for guidance (e.g. ESLint extension, Prettier extension, ShellCheck extension).

Implications:

  • Control lint/format-on-save behaviour from vscode settings
  • Control each operation independently, enforce ordering
  • Follow modern approach of letting the editor control save-time behaviour rather than hard-coding triggers in extension logic

I've noticed there are many issues related to settings and overlap between various extensions and tools. This approach would probably address many of them, as it's the recommended modern on-save behaviour in vscode.

References:

What alternatives have you considered?

Multiple extensions, multiple tools, using prettier for formatting, complex vscode settings... a mess.

Thank you!

Activity

  1. added
    enhancement
    on Sep 6, 2026
  2. lonix1 commented on Sep 14, 2026

    @lonix1
    Author

    There is a workaround using the generic quickfix CodeActionKind:

    "[shellscript]": {
      "editor.codeActionsOnSave": { "quickfix": "explicit" }
    }

    That works but is not ideal: quickfix is generic and includes code actions from all extensions targeting shellscript.

    It therefore does not provide the control discussed above (i.e. two dedicated source actions, such as source.fixAll.bashide-format and source.fixAll.bashide-lint).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancement

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions