Skip to content
This repository was archived by the owner on Jul 27, 2024. It is now read-only.

Autocorrection MissingRequiredTemplateFiles#385

Merged
hannakebedom merged 1 commit intomainfrom
auto_correct_missing_required_template_files
Sep 9, 2021
Merged

Autocorrection MissingRequiredTemplateFiles#385
hannakebedom merged 1 commit intomainfrom
auto_correct_missing_required_template_files

Conversation

@hannakebedom
Copy link
Contributor

@hannakebedom hannakebedom commented Aug 11, 2021

What does this do?

Makes sure all of the required template files in a theme are present.

How does it do it?

Automatically creates required template files if they don't already exist.

Why did you pick this approach over other options?

This approach uses methods on the corrector class to create the template files that are missing

@hannakebedom hannakebedom changed the title WIP Autocorrection MissingRequiredTemplateFiles WIP Autocorrection MissingRequiredTemplateFiles Aug 11, 2021
@hannakebedom hannakebedom changed the title WIP Autocorrection MissingRequiredTemplateFiles Autocorrection MissingRequiredTemplateFiles Aug 11, 2021
@hannakebedom hannakebedom force-pushed the auto_correct_missing_required_template_files branch from 5cc2e94 to faa0e6a Compare August 11, 2021 18:53
@hannakebedom hannakebedom marked this pull request as ready for review August 11, 2021 21:04
Copy link
Contributor

@macournoyer macournoyer left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Awesome, you're on 🔥 !

I think it's missing for the same reason I mentioned in #388 (comment)

@hannakebedom hannakebedom force-pushed the auto_correct_missing_required_template_files branch 3 times, most recently from 218a285 to 2602680 Compare September 9, 2021 12:54
@hannakebedom hannakebedom force-pushed the auto_correct_missing_required_template_files branch from 2602680 to 99a624f Compare September 9, 2021 15:31
(REQUIRED_TEMPLATE_FILES - (theme.liquid + theme.json).map(&:name)).each do |file|
add_offense("'#{file}.liquid' or '#{file}.json' is missing")
add_offense("'#{file}.liquid' or '#{file}.json' is missing") do |corrector|
if REQUIRED_LIQUID_TEMPLATE_FILES.include?(file)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🙌

Copy link
Contributor

@charlespwd charlespwd left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

:shipit:

@hannakebedom hannakebedom merged commit ca0dd5d into main Sep 9, 2021
@hannakebedom hannakebedom deleted the auto_correct_missing_required_template_files branch September 9, 2021 19:07
@shopify-shipit shopify-shipit bot temporarily deployed to rubygems September 14, 2021 20:30 Inactive
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants