This repository has been archived by the owner on Jul 27, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 95
Error when running auto-correct #439
Comments
I think I do. I noticed a flaw in our Thanks for flagging! I'm jumping on this. |
charlespwd
added a commit
that referenced
this issue
Sep 9, 2021
Fixes #439 Fixes major flaws of corrector: 1. insert_before/insert_after/replace/wrap could all mess with the indexes when applied multiple times. 2. the template.excerpt logic in Corrector didn't work well when you had multiline tags 3. template.exceprt and template.source_exceprt were confusing. Along with minor flaws in Template: 1. The mutable @lines thing was confusing 2. The difference between excerpt and source_excerpt was confusing => (excerpt was only used in tests, not the other. So I removed excerpt in favour of the other. If we really want one we can always template.write to commit the changes.) Introduces Parser::Source::TreeRewriter to handle the correct rewrite of the files for us. This is what RuboCop uses under the hood so why not do the same, eh?
Merged
charlespwd
added a commit
that referenced
this issue
Sep 9, 2021
Fixes #439 Fixes major flaws of corrector: 1. insert_before/insert_after/replace/wrap could all mess with the indexes when applied multiple times. 2. the template.excerpt logic in Corrector didn't work well when you had multiline tags 3. template.exceprt and template.source_exceprt were confusing. Along with minor flaws in Template: 1. The mutable @lines thing was confusing 2. The difference between excerpt and source_excerpt was confusing => (excerpt was only used in tests, not the other. So I removed excerpt in favour of the other. If we really want one we can always template.write to commit the changes.) Introduces Parser::Source::TreeRewriter to handle the correct rewrite of the files for us. This is what RuboCop uses under the hood so why not do the same, eh?
charlespwd
added a commit
that referenced
this issue
Sep 9, 2021
Fixes #439 Fixes major flaws of corrector: 1. insert_before/insert_after/replace/wrap could all mess with the indexes when applied multiple times. 2. the template.excerpt logic in Corrector didn't work well when you had multiline tags 3. template.exceprt and template.source_exceprt were confusing. Along with minor flaws in Template: 1. The mutable @lines thing was confusing 2. The difference between excerpt and source_excerpt was confusing => (excerpt was only used in tests, not the other. So I removed excerpt in favour of the other. If we really want one we can always template.write to commit the changes.) Introduces Parser::Source::TreeRewriter to handle the correct rewrite of the files for us. This is what RuboCop uses under the hood so why not do the same, eh?
charlespwd
added a commit
that referenced
this issue
Sep 9, 2021
Fixes #439 Fixes major flaws of corrector: 1. insert_before/insert_after/replace/wrap could all mess with the indexes when applied multiple times. 2. the template.excerpt logic in Corrector didn't work well when you had multiline tags 3. template.exceprt and template.source_exceprt were confusing. Along with minor flaws in Template: 1. The mutable @lines thing was confusing 2. The difference between excerpt and source_excerpt was confusing => (excerpt was only used in tests, not the other. So I removed excerpt in favour of the other. If we really want one we can always template.write to commit the changes.) Introduces Parser::Source::TreeRewriter to handle the correct rewrite of the files for us. This is what RuboCop uses under the hood so why not do the same, eh?
charlespwd
added a commit
that referenced
this issue
Sep 10, 2021
Fixes #439 Fixes major flaws of corrector: 1. insert_before/insert_after/replace/wrap could all mess with the indexes when applied multiple times. 2. the template.excerpt logic in Corrector didn't work well when you had multiline tags 3. template.exceprt and template.source_exceprt were confusing. Along with minor flaws in Template: 1. The mutable @lines thing was confusing 2. The difference between excerpt and source_excerpt was confusing => (excerpt was only used in tests, not the other. So I removed excerpt in favour of the other. If we really want one we can always template.write to commit the changes.) Introduces Parser::Source::TreeRewriter to handle the correct rewrite of the files for us. This is what RuboCop uses under the hood so why not do the same, eh?
charlespwd
added a commit
that referenced
this issue
Sep 10, 2021
Fixes #439 Fixes major flaws of corrector: 1. insert_before/insert_after/replace/wrap could all mess with the indexes when applied multiple times. 2. the template.excerpt logic in Corrector didn't work well when you had multiline tags 3. template.exceprt and template.source_exceprt were confusing. Along with minor flaws in Template: 1. The mutable @lines thing was confusing 2. The difference between excerpt and source_excerpt was confusing => (excerpt was only used in tests, not the other. So I removed excerpt in favour of the other. If we really want one we can always template.write to commit the changes.) Introduces Parser::Source::TreeRewriter to handle the correct rewrite of the files for us. This is what RuboCop uses under the hood so why not do the same, eh?
charlespwd
added a commit
that referenced
this issue
Sep 13, 2021
Fixes #439 Fixes major flaws of corrector: 1. insert_before/insert_after/replace/wrap could all mess with the indexes when applied multiple times. 2. the template.excerpt logic in Corrector didn't work well when you had multiline tags 3. template.exceprt and template.source_exceprt were confusing. Along with minor flaws in Template: 1. The mutable @lines thing was confusing 2. The difference between excerpt and source_excerpt was confusing => (excerpt was only used in tests, not the other. So I removed excerpt in favour of the other. If we really want one we can always template.write to commit the changes.) Introduces Parser::Source::TreeRewriter to handle the correct rewrite of the files for us. This is what RuboCop uses under the hood so why not do the same, eh?
charlespwd
added a commit
that referenced
this issue
Sep 14, 2021
Fixes #439 Fixes major flaws of corrector: 1. insert_before/insert_after/replace/wrap could all mess with the indexes when applied multiple times. 2. the template.excerpt logic in Corrector didn't work well when you had multiline tags 3. template.exceprt and template.source_exceprt were confusing. Along with minor flaws in Template: 1. The mutable @lines thing was confusing 2. The difference between excerpt and source_excerpt was confusing => (excerpt was only used in tests, not the other. So I removed excerpt in favour of the other. If we really want one we can always template.write to commit the changes.) Introduces Parser::Source::TreeRewriter to handle the correct rewrite of the files for us. This is what RuboCop uses under the hood so why not do the same, eh?
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
As the title states, I'm getting an error when running the auto-correct flag. The command run was
shopify theme check -a
and the error details are:
Any ideas? Happy to give more details if required.
Thanks
The text was updated successfully, but these errors were encountered: