Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: fix all issues on demand or on save #278

Merged
merged 1 commit into from
Aug 2, 2021
Merged

feat: fix all issues on demand or on save #278

merged 1 commit into from
Aug 2, 2021

Conversation

felipecrs
Copy link
Collaborator

@felipecrs felipecrs commented Aug 1, 2021

With this new feature, it's possible to fix all auto-fixable errors provided by ShellCheck at once.

On demand

Simply run the command Fix All in the command pallet (Ctrl+Shift+P or F1).

On save

Simply add the following to your .vscode/settings.json:

{
  "editor.codeActionsOnSave": {
    "source.fixAll.shellcheck": true,
  },
}

Example

hVa3IyqDoW

Fixes #273

@felipecrs
Copy link
Collaborator Author

@KnifeFed could you please help to verify? The .vsix is available here.

@KnifeFed
Copy link

KnifeFed commented Aug 2, 2021

@felipecrs I've tried it and it works great! Thank you very much for implementing the feature. Now let's hope the shellcheck team implements more auto-fixable rules :)

@felipecrs felipecrs changed the title feat: fix all on save feat: fix issues automatically on demand or on save Aug 2, 2021
@felipecrs felipecrs changed the title feat: fix issues automatically on demand or on save feat: fix all issues on demand or on save Aug 2, 2021
@felipecrs felipecrs merged commit bea1bda into master Aug 2, 2021
@felipecrs felipecrs deleted the fix-all branch August 2, 2021 14:09
timonwong pushed a commit that referenced this pull request Aug 2, 2021
## [0.15.0](v0.14.4...v0.15.0) (2021-08-02)

### Features

* fix all issues on demand or on save ([#278](#278)) ([bea1bda](bea1bda)), closes [#273](#273)
@felipecrs
Copy link
Collaborator Author

felipecrs commented Aug 2, 2021

🎉 This PR is included in version 0.15.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

@felipecrs
Copy link
Collaborator Author

Now let's hope the shellcheck team implements more auto-fixable rules :)

It handles the following optional rule:

# shellcheck enable=require-variable-braces

And I could not be more grateful for this feature, it allows me to refactor old scripts very quickly!

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

Successfully merging this pull request may close these issues.

Autofix on save?
2 participants