theme-check 1.6.1 → 1.6.2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (43) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +6 -0
  3. data/docs/api/html_check.md +7 -7
  4. data/docs/api/liquid_check.md +10 -10
  5. data/docs/checks/convert_include_to_render.md +1 -1
  6. data/docs/checks/missing_enable_comment.md +1 -1
  7. data/lib/theme_check/analyzer.rb +15 -15
  8. data/lib/theme_check/asset_file.rb +1 -1
  9. data/lib/theme_check/check.rb +2 -2
  10. data/lib/theme_check/checks/html_parsing_error.rb +2 -2
  11. data/lib/theme_check/checks/matching_translations.rb +1 -1
  12. data/lib/theme_check/checks/missing_template.rb +6 -6
  13. data/lib/theme_check/checks/nested_snippet.rb +2 -2
  14. data/lib/theme_check/checks/required_layout_theme_object.rb +2 -2
  15. data/lib/theme_check/checks/syntax_error.rb +5 -5
  16. data/lib/theme_check/checks/template_length.rb +2 -2
  17. data/lib/theme_check/checks/undefined_object.rb +7 -7
  18. data/lib/theme_check/checks/unused_assign.rb +4 -4
  19. data/lib/theme_check/checks/unused_snippet.rb +7 -7
  20. data/lib/theme_check/checks/valid_json.rb +1 -1
  21. data/lib/theme_check/checks.rb +2 -2
  22. data/lib/theme_check/cli.rb +1 -1
  23. data/lib/theme_check/corrector.rb +6 -6
  24. data/lib/theme_check/disabled_check.rb +3 -3
  25. data/lib/theme_check/disabled_checks.rb +9 -9
  26. data/lib/theme_check/html_node.rb +36 -28
  27. data/lib/theme_check/html_visitor.rb +6 -6
  28. data/lib/theme_check/in_memory_storage.rb +1 -1
  29. data/lib/theme_check/json_check.rb +2 -2
  30. data/lib/theme_check/language_server/diagnostics_tracker.rb +8 -8
  31. data/lib/theme_check/{template.rb → liquid_file.rb} +2 -2
  32. data/lib/theme_check/liquid_node.rb +291 -0
  33. data/lib/theme_check/{visitor.rb → liquid_visitor.rb} +4 -4
  34. data/lib/theme_check/locale_diff.rb +5 -5
  35. data/lib/theme_check/node.rb +12 -225
  36. data/lib/theme_check/offense.rb +15 -15
  37. data/lib/theme_check/position.rb +1 -1
  38. data/lib/theme_check/theme.rb +1 -1
  39. data/lib/theme_check/{template_rewriter.rb → theme_file_rewriter.rb} +1 -1
  40. data/lib/theme_check/version.rb +1 -1
  41. data/lib/theme_check.rb +11 -10
  42. data/theme-check.gemspec +1 -1
  43. metadata +8 -7
data/lib/theme_check.rb CHANGED
@@ -4,20 +4,23 @@ require "liquid"
4
4
  require_relative "theme_check/version"
5
5
  require_relative "theme_check/bug"
6
6
  require_relative "theme_check/exceptions"
7
+ require_relative "theme_check/theme_file_rewriter"
7
8
  require_relative "theme_check/theme_file"
9
+ require_relative "theme_check/liquid_file"
10
+ require_relative "theme_check/asset_file"
11
+ require_relative "theme_check/json_file"
8
12
  require_relative "theme_check/analyzer"
9
13
  require_relative "theme_check/check"
10
14
  require_relative "theme_check/checks_tracking"
15
+ require_relative "theme_check/liquid_check"
16
+ require_relative "theme_check/html_check"
17
+ require_relative "theme_check/json_check"
11
18
  require_relative "theme_check/cli"
12
19
  require_relative "theme_check/disabled_check"
13
20
  require_relative "theme_check/disabled_checks"
14
- require_relative "theme_check/liquid_check"
15
21
  require_relative "theme_check/locale_diff"
16
- require_relative "theme_check/asset_file"
17
22
  require_relative "theme_check/remote_asset_file"
18
23
  require_relative "theme_check/regex_helpers"
19
- require_relative "theme_check/json_check"
20
- require_relative "theme_check/json_file"
21
24
  require_relative "theme_check/json_helpers"
22
25
  require_relative "theme_check/position_helper"
23
26
  require_relative "theme_check/position"
@@ -25,23 +28,21 @@ require_relative "theme_check/language_server"
25
28
  require_relative "theme_check/checks"
26
29
  require_relative "theme_check/config"
27
30
  require_relative "theme_check/node"
31
+ require_relative "theme_check/liquid_node"
32
+ require_relative "theme_check/html_node"
28
33
  require_relative "theme_check/offense"
29
34
  require_relative "theme_check/printer"
30
35
  require_relative "theme_check/json_printer"
31
36
  require_relative "theme_check/shopify_liquid"
32
- require_relative "theme_check/storage"
33
37
  require_relative "theme_check/string_helpers"
38
+ require_relative "theme_check/storage"
34
39
  require_relative "theme_check/file_system_storage"
35
40
  require_relative "theme_check/in_memory_storage"
36
41
  require_relative "theme_check/tags"
37
- require_relative "theme_check/template_rewriter"
38
- require_relative "theme_check/template"
39
42
  require_relative "theme_check/theme"
40
- require_relative "theme_check/visitor"
41
43
  require_relative "theme_check/corrector"
42
- require_relative "theme_check/html_node"
44
+ require_relative "theme_check/liquid_visitor"
43
45
  require_relative "theme_check/html_visitor"
44
- require_relative "theme_check/html_check"
45
46
 
46
47
  Dir[__dir__ + "/theme_check/checks/*.rb"].each { |file| require file }
47
48
 
data/theme-check.gemspec CHANGED
@@ -24,7 +24,7 @@ Gem::Specification.new do |spec|
24
24
  spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
25
25
  spec.require_paths = ["lib"]
26
26
 
27
- spec.add_dependency('liquid', '>= 5.0.1')
27
+ spec.add_dependency('liquid', '>= 5.1.0')
28
28
  spec.add_dependency('nokogiri', '>= 1.12')
29
29
  spec.add_dependency('parser', '~> 3')
30
30
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: theme-check
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.6.1
4
+ version: 1.6.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Marc-André Cournoyer
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2021-09-15 00:00:00.000000000 Z
11
+ date: 2021-09-16 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: liquid
@@ -16,14 +16,14 @@ dependencies:
16
16
  requirements:
17
17
  - - ">="
18
18
  - !ruby/object:Gem::Version
19
- version: 5.0.1
19
+ version: 5.1.0
20
20
  type: :runtime
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
24
  - - ">="
25
25
  - !ruby/object:Gem::Version
26
- version: 5.0.1
26
+ version: 5.1.0
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: nokogiri
29
29
  requirement: !ruby/object:Gem::Requirement
@@ -223,6 +223,9 @@ files:
223
223
  - lib/theme_check/language_server/uri_helper.rb
224
224
  - lib/theme_check/language_server/variable_lookup_finder.rb
225
225
  - lib/theme_check/liquid_check.rb
226
+ - lib/theme_check/liquid_file.rb
227
+ - lib/theme_check/liquid_node.rb
228
+ - lib/theme_check/liquid_visitor.rb
226
229
  - lib/theme_check/locale_diff.rb
227
230
  - lib/theme_check/node.rb
228
231
  - lib/theme_check/offense.rb
@@ -242,12 +245,10 @@ files:
242
245
  - lib/theme_check/storage.rb
243
246
  - lib/theme_check/string_helpers.rb
244
247
  - lib/theme_check/tags.rb
245
- - lib/theme_check/template.rb
246
- - lib/theme_check/template_rewriter.rb
247
248
  - lib/theme_check/theme.rb
248
249
  - lib/theme_check/theme_file.rb
250
+ - lib/theme_check/theme_file_rewriter.rb
249
251
  - lib/theme_check/version.rb
250
- - lib/theme_check/visitor.rb
251
252
  - packaging/homebrew/theme_check.base.rb
252
253
  - theme-check.gemspec
253
254
  homepage: https://github.com/Shopify/theme-check