theme-check icon indicating copy to clipboard operation
theme-check copied to clipboard

Add a way to disable the fixer without disabling the check

Open johndugan opened this issue 2 years ago • 3 comments

Is there a configuration setting to prevent the extension from passing the --auto-correct flag when a file is saved?

johndugan avatar Jul 09 '22 19:07 johndugan

Yes!

  "[liquid]": {
    "editor.defaultFormatter": "Shopify.theme-check-vscode",
    "editor.formatOnSave": false
  },

charlespwd avatar Jul 11 '22 13:07 charlespwd

That doesn't appear to be the correct configuration.

Take this block for instance:

image

  1. I'd still like theme-check to warn me that img_url is deprecated.
  2. I'd still like it to format on save.
  3. I don't want img_url to automatically be changed to image_url on save.

It's my understanding from the docs that --auto-correct is changing img_url to image_url.

How do I configure the extension to:

  1. Prevent automatic code changes on save (except formatting).
  2. Retain the error, suggestion, and style severity indicatons.

johndugan avatar Jul 11 '22 23:07 johndugan

Oh gotcha. This is different indeed. I interpret it as the following feature request:

As a dev, I want the ability to keep a check turned on but do not want to fix it automatically

It's kind of like the theme-check ignore setting, but without turning the check off entirely.

We unfortunately do not have a solution for this yet. You can only ignore the check entirely (either by disabling it globally, or wrapping it in the disabling comment).

I'll reopen this as a feature request in the theme-check repo.

charlespwd avatar Jul 12 '22 18:07 charlespwd