Shopify / theme-check

The Ultimate Shopify Theme Linter
Other
333 stars 96 forks source link

Theme Check requires a new release when new filters are created #706

Closed karreiro closed 1 year ago

karreiro commented 1 year ago

Is your feature request related to a problem? Please describe.

When Theme Check is released, the most updated version of Shopify/theme-liquid-docs is embedded. Also, when some new filter is released, local Theme Check instances get auto upgraded asynchronously (so documentation is always updated on developers machines).

However, at CI environments, Theme Check uses the embedded documentation from the latest release, which makes the build of some CI-users fail.

Describe the solution you'd like

Describe alternatives you've considered

karreiro commented 1 year ago

@charlespwd What do you think about that solution?

charlespwd commented 1 year ago

Do we not have a command to load the updated docs? Can we run it in theme-check-action before linting?

If not, then we can add a new flag that does this compound work, but it feels unnecessary.

karreiro commented 1 year ago

Good catch! We have a rake task, but I don't think we currently can execute it from the theme-check-action. Still, running the following script would do the job:

require 'theme_check'

ThemeCheck::ShopifyLiquid::SourceManager.download

Alternatively, we could expose the download_theme_liquid_docs rake task, to avoid changes in the SourceManager breaking the theme-check-action.

charlespwd commented 1 year ago

There I go mixing shopify and theme-check. Forgot that theme-check doesn't take a command. Only a root argument.

A new flag seems perfect. I think the behaviour should be atomic though (instead of update then check).

karreiro commented 1 year ago

Fixed by https://github.com/Shopify/theme-check-action/pull/19.