platformos-check 0.3.1 → 0.4.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/CHANGELOG.md +15 -0
- data/data/platformos_liquid/documentation/objects.json +1 -1
- data/docs/checks/undefined_object.md +2 -3
- data/lib/platformos_check/checks/undefined_object.rb +9 -1
- data/lib/platformos_check/language_server/completion_providers/object_completion_provider.rb +5 -6
- data/lib/platformos_check/language_server/document_link_providers/theme_render_document_link_provider.rb +1 -0
- data/lib/platformos_check/tags/background.rb +5 -0
- data/lib/platformos_check/tags/graphql.rb +1 -1
- data/lib/platformos_check/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: b962e236b71ab785e3e566413ae86c64c6d767d26d8871606cc639b1eae7023e
|
|
4
|
+
data.tar.gz: 0df29d550f5779ebe29ac285809144998d49cd7a8d8049769ac023d65cdde3de
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: a8bcd3931092d2621dd74f174790ecc13213db17c56d11a9a174bdda6b5e7e22f8526b93553225fa6d884eb4af74e5249c2f78da2e88ad794f3b4064f935be33
|
|
7
|
+
data.tar.gz: ba1ca314fc5d0a154f2f74f52002204da03ce80edae7763e633b46fca31e56329f63f8e7343c52093c081c304c31e9462e5c8f52add1d328cf372e63005826fb
|
data/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,18 @@
|
|
|
1
|
+
v0.4.0 / 2023-09-17
|
|
2
|
+
==================
|
|
3
|
+
|
|
4
|
+
* Add unused attributes messages in render/function/background tags invocations
|
|
5
|
+
|
|
6
|
+
v0.3.3 / 2023-09-16
|
|
7
|
+
==================
|
|
8
|
+
|
|
9
|
+
* Fix issue with inline graphql tag old syntax
|
|
10
|
+
|
|
11
|
+
v0.3.2 / 2023-09-15
|
|
12
|
+
==================
|
|
13
|
+
|
|
14
|
+
* Allow nil prefix, which should be equivalent of ""
|
|
15
|
+
|
|
1
16
|
v0.3.1 / 2023-09-15
|
|
2
17
|
==================
|
|
3
18
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
|
|
2
2
|
|
|
3
3
|
|
|
4
|
-
[{"access":{"global":false,"parents":[],"template":[],"app_file_type":null},"deprecated":false,"deprecation_reason":"","description":"todo description","properties":[],"summary":"todo summary","name":"constants","examples":[],"json_data":{"path":"","handle":"context.constants","data_from_file":""},"return_type":[]},{"access":{"global":true,"parents":[],"template":[]},"deprecated":false,"deprecation_reason":"","description":"Include the `content_for_layout` object in your [layout files](/themes/architecture/layouts) between the `\u003cbody\u003e` and\n`\u003c/body\u003e` HTML tags.\n\n\u003e Note:\n\u003e The `content_for_layout` object is required in `theme.liquid`.","properties":[],"summary":"Dynamically returns content based on the current [template](/themes/architecture/templates).","name":"content_for_layout","examples":[],"json_data":{"path":"","handle":"","data_from_file":""},"return_type":[{"type":"string","name":"","description":"","array_value":""}]},{"access":{"global":true,"parents":[],"template":[],"app_file_type":null},"deprecated":false,"deprecation_reason":"","description":"todo description","properties":[{"deprecated":false,"deprecation_reason":"","description":"","examples":[],"return_type":[{"type":"string","name":"","description":"","array_value":""}],"summary":"todo property summary","name":"authenticity_token"},{"deprecated":false,"deprecation_reason":"","description":"","examples":[],"return_type":[{"type":"session","name":"","description":"","array_value":""}],"summary":"todo property summary","name":"session"},{"deprecated":false,"deprecation_reason":"","description":"","examples":[],"return_type":[{"type":"trueclass","name":"","description":"","array_value":""}],"summary":"todo property summary","name":"csrf_request_valid"},{"deprecated":false,"deprecation_reason":"","description":"","examples":[],"return_type":[{"type":"current_user","name":"","description":"","array_value":""}],"summary":"todo property summary","name":"current_user"},{"deprecated":false,"deprecation_reason":"","description":"","examples":[],"return_type":[{"type":"headers","name":"","description":"","array_value":""}],"summary":"todo property summary","name":"headers"},{"deprecated":false,"deprecation_reason":"","description":"","examples":[],"return_type":[{"type":"params","name":"","description":"","array_value":""}],"summary":"todo property summary","name":"params"},{"deprecated":false,"deprecation_reason":"","description":"","examples":[],"return_type":[{"type":"string","name":"","description":"","array_value":""}],"summary":"todo property summary","name":"language"},{"deprecated":false,"deprecation_reason":"","description":"","examples":[],"return_type":[{"type":"string","name":"","description":"","array_value":""}],"summary":"todo property summary","name":"environment"},{"deprecated":false,"deprecation_reason":"","description":"","examples":[],"return_type":[{"type":"falseclass","name":"","description":"","array_value":""}],"summary":"todo property summary","name":"is_xhr"},{"deprecated":false,"deprecation_reason":"","description":"","examples":[],"return_type":[{"type":"instance","name":"","description":"","array_value":""}],"summary":"todo property summary","name":"instance"},{"deprecated":false,"deprecation_reason":"","description":"","examples":[],"return_type":[{"type":"location","name":"","description":"","array_value":""}],"summary":"todo property summary","name":"location"},{"deprecated":false,"deprecation_reason":"","description":"","examples":[],"return_type":[{"type":"page","name":"","description":"","array_value":""}],"summary":"todo property summary","name":"page"},{"deprecated":false,"deprecation_reason":"","description":"","examples":[],"return_type":[{"type":"layout","name":"","description":"","array_value":""}],"summary":"todo property summary","name":"layout"},{"deprecated":false,"deprecation_reason":"","description":"","examples":[],"return_type":[{"type":"visitor","name":"","description":"","array_value":""}],"summary":"todo property summary","name":"visitor"},{"deprecated":false,"deprecation_reason":"","description":"","examples":[],"return_type":[{"type":"string","name":"","description":"","array_value":""}],"summary":"todo property summary","name":"useragent"},{"deprecated":false,"deprecation_reason":"","description":"","examples":[],"return_type":[{"type":"device","name":"","description":"","array_value":""}],"summary":"todo property summary","name":"device"},{"deprecated":false,"deprecation_reason":"","description":"","examples":[],"return_type":[{"type":"cookies","name":"","description":"","array_value":""}],"summary":"todo property summary","name":"cookies"},{"deprecated":false,"deprecation_reason":"","description":"","examples":[],"return_type":[{"type":"string","name":"","description":"","array_value":""}],"summary":"todo property summary","name":"version"},{"deprecated":false,"deprecation_reason":"","description":"","examples":[],"return_type":[{"type":"string","name":"","description":"","array_value":""}],"summary":"todo property summary","name":"post_params"},{"deprecated":false,"deprecation_reason":"","description":"","examples":[],"return_type":[{"type":"string","name":"","description":"","array_value":""}],"summary":"todo property summary","name":"hcaptcha_site_key"},{"deprecated":false,"deprecation_reason":"","description":"","examples":[],"return_type":[{"type":"globals","name":"","description":"","array_value":""}],"summary":"todo property summary","name":"globals"},{"deprecated":false,"deprecation_reason":"","description":"","examples":[],"return_type":[{"type":"modules","name":"","description":"","array_value":""}],"summary":"todo property summary","name":"modules"},{"deprecated":false,"deprecation_reason":"","description":"","examples":[],"return_type":[{"type":"constants","name":"","description":"","array_value":""}],"summary":"todo property summary","name":"constants"},{"deprecated":false,"deprecation_reason":"","description":"","examples":[],"return_type":[{"type":"flash","name":"","description":"","array_value":""}],"summary":"todo property summary","name":"flash"}],"summary":"todo summary","name":"context","examples":[],"json_data":{"path":"","handle":"context","data_from_file":""},"return_type":[]},{"access":{"global":false,"parents":[],"template":[],"app_file_type":null},"deprecated":false,"deprecation_reason":"","description":"todo description","properties":[{"deprecated":false,"deprecation_reason":"","description":"","examples":[],"return_type":[{"type":"string","name":"","description":"","array_value":""}],"summary":"todo property summary","name":"_pos_session"}],"summary":"todo summary","name":"cookies","examples":[],"json_data":{"path":"","handle":"context.cookies","data_from_file":""},"return_type":[]},{"access":{"global":false,"parents":[],"template":[],"app_file_type":null},"deprecated":false,"deprecation_reason":"","description":"todo description","properties":[{"deprecated":false,"deprecation_reason":"","description":"","examples":[],"return_type":[{"type":"string","name":"","description":"","array_value":""}],"summary":"todo property summary","name":"first_name"},{"deprecated":false,"deprecation_reason":"","description":"","examples":[],"return_type":[{"type":"string","name":"","description":"","array_value":""}],"summary":"todo property summary","name":"last_name"},{"deprecated":false,"deprecation_reason":"","description":"","examples":[],"return_type":[{"type":"string","name":"","description":"","array_value":""}],"summary":"todo property summary","name":"email"},{"deprecated":false,"deprecation_reason":"","description":"","examples":[],"return_type":[{"type":"string","name":"","description":"","array_value":""}],"summary":"todo property summary","name":"id"},{"deprecated":false,"deprecation_reason":"","description":"","examples":[],"return_type":[{"type":"string","name":"","description":"","array_value":""}],"summary":"todo property summary","name":"slug"}],"summary":"todo summary","name":"current_user","examples":[],"json_data":{"path":"","handle":"context.current_user","data_from_file":""},"return_type":[]},{"access":{"global":false,"parents":[],"template":[],"app_file_type":null},"deprecated":false,"deprecation_reason":"","description":"todo description","properties":[{"deprecated":false,"deprecation_reason":"","description":"","examples":[],"return_type":[{"type":"falseclass","name":"","description":"","array_value":""}],"summary":"todo property summary","name":"bot"},{"deprecated":false,"deprecation_reason":"","description":"","examples":[],"return_type":[{"type":"nilclass","name":"","description":"","array_value":""}],"summary":"todo property summary","name":"bot_name"},{"deprecated":false,"deprecation_reason":"","description":"","examples":[],"return_type":[{"type":"nilclass","name":"","description":"","array_value":""}],"summary":"todo property summary","name":"device_brand"},{"deprecated":false,"deprecation_reason":"","description":"","examples":[],"return_type":[{"type":"nilclass","name":"","description":"","array_value":""}],"summary":"todo property summary","name":"device_name"},{"deprecated":false,"deprecation_reason":"","description":"","examples":[],"return_type":[{"type":"string","name":"","description":"","array_value":""}],"summary":"todo property summary","name":"device_type"},{"deprecated":false,"deprecation_reason":"","description":"","examples":[],"return_type":[{"type":"string","name":"","description":"","array_value":""}],"summary":"todo property summary","name":"full_version"},{"deprecated":false,"deprecation_reason":"","description":"","examples":[],"return_type":[{"type":"trueclass","name":"","description":"","array_value":""}],"summary":"todo property summary","name":"known"},{"deprecated":false,"deprecation_reason":"","description":"","examples":[],"return_type":[{"type":"string","name":"","description":"","array_value":""}],"summary":"todo property summary","name":"name"},{"deprecated":false,"deprecation_reason":"","description":"","examples":[],"return_type":[{"type":"nilclass","name":"","description":"","array_value":""}],"summary":"todo property summary","name":"os_full_version"},{"deprecated":false,"deprecation_reason":"","description":"","examples":[],"return_type":[{"type":"string","name":"","description":"","array_value":""}],"summary":"todo property summary","name":"os_name"}],"summary":"todo summary","name":"device","examples":[],"json_data":{"path":"","handle":"context.device","data_from_file":""},"return_type":[]},{"access":{"global":false,"parents":[],"template":[],"app_file_type":null},"deprecated":false,"deprecation_reason":"","description":"todo description","properties":[],"summary":"todo summary","name":"flash","examples":[],"json_data":{"path":"","handle":"context.flash","data_from_file":""},"return_type":[]},{"access":{"global":true,"parents":[{"object":"forloop","property":"parentloop"}],"template":[]},"deprecated":false,"deprecation_reason":"","description":"","properties":[{"deprecated":false,"deprecation_reason":"","description":"","examples":[],"return_type":[{"type":"number","name":"","description":"","array_value":""}],"summary":"The total number of iterations in the loop.","name":"length"},{"deprecated":false,"deprecation_reason":"","description":"If the current `for` loop isn't nested inside another `for` loop, then `nil` is returned.","examples":[{"name":"Use the `parentloop` property","description":"","syntax":"","path":"/","raw_liquid":"{% for i in (1..3) -%}\n {% for j in (1..3) -%}\n {{ forloop.parentloop.index }} - {{ forloop.index }}\n {%- endfor %}\n{%- endfor %}","parameter":false,"display_type":"text","show_data_tab":true}],"return_type":[{"type":"forloop","name":"","description":"","array_value":""}],"summary":"The parent `forloop` object.","name":"parentloop"},{"deprecated":false,"deprecation_reason":"","description":"","examples":[],"return_type":[{"type":"number","name":"","description":"","array_value":""}],"summary":"The 1-based index of the current iteration.","name":"index"},{"deprecated":false,"deprecation_reason":"","description":"","examples":[],"return_type":[{"type":"number","name":"","description":"","array_value":""}],"summary":"The 0-based index of the current iteration.","name":"index0"},{"deprecated":false,"deprecation_reason":"","description":"","examples":[],"return_type":[{"type":"number","name":"","description":"","array_value":""}],"summary":"The 1-based index of the current iteration, in reverse order.","name":"rindex"},{"deprecated":false,"deprecation_reason":"","description":"","examples":[],"return_type":[{"type":"number","name":"","description":"","array_value":""}],"summary":"The 0-based index of the current iteration, in reverse order.","name":"rindex0"},{"deprecated":false,"deprecation_reason":"","description":"","examples":[],"return_type":[{"type":"boolean","name":"","description":"","array_value":""}],"summary":"Returns `true` if the current iteration is the first. Returns `false` if not.","name":"first"},{"deprecated":false,"deprecation_reason":"","description":"","examples":[],"return_type":[{"type":"boolean","name":"","description":"","array_value":""}],"summary":"Returns `true` if the current iteration is the last. Returns `false` if not.","name":"last"}],"summary":"Information about a parent [`for` loop](/docs/api/liquid/tags/for).","name":"forloop","examples":[{"name":"Use the `forloop` object","description":"","syntax":"","path":"/","raw_liquid":"{% for page in pages -%}\n {%- if forloop.length \u003e 0 -%}\n {{ page.title }}{% unless forloop.last %}, {% endunless -%}\n {%- endif -%}\n{% endfor %}","parameter":false,"display_type":"text","show_data_tab":true}],"json_data":{"path":"","handle":"","data_from_file":"{\"first\":true,\"index\":1,\"index0\":0,\"last\":false,\"length\":4,\"rindex\":3}"},"return_type":[]},{"access":{"global":false,"parents":[],"template":[],"app_file_type":null},"deprecated":false,"deprecation_reason":"","description":"todo description","properties":[{"deprecated":false,"deprecation_reason":"","description":"","examples":[],"return_type":[{"type":"time_zones","name":"","description":"","array_value":""}],"summary":"todo property summary","name":"time_zones"}],"summary":"todo summary","name":"globals","examples":[],"json_data":{"path":"","handle":"context.globals","data_from_file":""},"return_type":[]},{"access":{"global":false,"parents":[],"template":[],"app_file_type":null},"deprecated":false,"deprecation_reason":"","description":"todo description","properties":[{"deprecated":false,"deprecation_reason":"","description":"","examples":[],"return_type":[{"type":"string","name":"","description":"","array_value":""}],"summary":"todo property summary","name":"QUERY_STRING"}],"summary":"todo summary","name":"headers","examples":[],"json_data":{"path":"","handle":"context.headers","data_from_file":""},"return_type":[]},{"access":{"global":false,"parents":[],"template":[],"app_file_type":null},"deprecated":false,"deprecation_reason":"","description":"todo description","properties":[{"deprecated":false,"deprecation_reason":"","description":"","examples":[],"return_type":[{"type":"number","name":"","description":"","array_value":""}],"summary":"todo property summary","name":"id"},{"deprecated":false,"deprecation_reason":"","description":"","examples":[],"return_type":[{"type":"string","name":"","description":"","array_value":""}],"summary":"todo property summary","name":"uuid"},{"deprecated":false,"deprecation_reason":"","description":"","examples":[],"return_type":[{"type":"string","name":"","description":"","array_value":""}],"summary":"todo property summary","name":"name"}],"summary":"todo summary","name":"instance","examples":[],"json_data":{"path":"","handle":"context.instance","data_from_file":""},"return_type":[]},{"access":{"global":false,"parents":[],"template":[],"app_file_type":null},"deprecated":false,"deprecation_reason":"","description":"todo description","properties":[{"deprecated":false,"deprecation_reason":"","description":"","examples":[],"return_type":[{"type":"nilclass","name":"","description":"","array_value":""}],"summary":"todo property summary","name":"metadata"}],"summary":"todo summary","name":"layout","examples":[],"json_data":{"path":"","handle":"context.layout","data_from_file":""},"return_type":[]},{"access":{"global":false,"parents":[],"template":[],"app_file_type":null},"deprecated":false,"deprecation_reason":"","description":"todo description","properties":[{"deprecated":false,"deprecation_reason":"","description":"","examples":[],"return_type":[{"type":"string","name":"","description":"","array_value":""}],"summary":"todo property summary","name":"url"},{"deprecated":false,"deprecation_reason":"","description":"","examples":[],"return_type":[{"type":"string","name":"","description":"","array_value":""}],"summary":"todo property summary","name":"href"},{"deprecated":false,"deprecation_reason":"","description":"","examples":[],"return_type":[{"type":"string","name":"","description":"","array_value":""}],"summary":"todo property summary","name":"host"},{"deprecated":false,"deprecation_reason":"","description":"","examples":[],"return_type":[{"type":"string","name":"","description":"","array_value":""}],"summary":"todo property summary","name":"pathname"},{"deprecated":false,"deprecation_reason":"","description":"","examples":[],"return_type":[{"type":"search","name":"","description":"","array_value":""}],"summary":"todo property summary","name":"search"}],"summary":"todo summary","name":"location","examples":[],"json_data":{"path":"","handle":"context.location","data_from_file":""},"return_type":[]},{"access":{"global":false,"parents":[],"template":[],"app_file_type":null},"deprecated":false,"deprecation_reason":"","description":"todo description","properties":[{"deprecated":false,"deprecation_reason":"","description":"","examples":[],"return_type":[{"type":"string","name":"","description":"","array_value":""}],"summary":"todo property summary","name":"name"},{"deprecated":false,"deprecation_reason":"","description":"","examples":[],"return_type":[{"type":"string","name":"","description":"","array_value":""}],"summary":"todo property summary","name":"scope_name"},{"deprecated":false,"deprecation_reason":"","description":"","examples":[],"return_type":[{"type":"string","name":"","description":"","array_value":""}],"summary":"todo property summary","name":"version"},{"deprecated":false,"deprecation_reason":"","description":"","examples":[],"return_type":[{"type":"version_info","name":"","description":"","array_value":""}],"summary":"todo property summary","name":"version_info"},{"deprecated":false,"deprecation_reason":"","description":"","examples":[],"return_type":[{"type":"subscription_info","name":"","description":"","array_value":""}],"summary":"todo property summary","name":"subscription_info"}],"summary":"todo summary","name":"module","examples":[],"json_data":{"path":"","handle":"modules.module","data_from_file":""},"return_type":[]},{"access":{"global":false,"parents":[],"template":[],"app_file_type":null},"deprecated":false,"deprecation_reason":"","description":"todo description","properties":[{"deprecated":false,"deprecation_reason":"","description":"","examples":[],"return_type":[{"type":"module","name":"","description":"","array_value":""}],"summary":"todo property summary","name":"module"}],"summary":"todo summary","name":"modules","examples":[],"json_data":{"path":"","handle":"context.modules","data_from_file":""},"return_type":[]},{"access":{"global":false,"parents":[],"template":[],"app_file_type":null},"deprecated":false,"deprecation_reason":"","description":"todo description","properties":[{"deprecated":false,"deprecation_reason":"","description":"","examples":[],"return_type":[{"type":"number","name":"","description":"","array_value":""}],"summary":"todo property summary","name":"id"},{"deprecated":false,"deprecation_reason":"","description":"","examples":[],"return_type":[{"type":"string","name":"","description":"","array_value":""}],"summary":"todo property summary","name":"slug"},{"deprecated":false,"deprecation_reason":"","description":"","examples":[],"return_type":[{"type":"falseclass","name":"","description":"","array_value":""}],"summary":"todo property summary","name":"enable_profiler"},{"deprecated":false,"deprecation_reason":"","description":"","examples":[],"return_type":[{"type":"string","name":"","description":"","array_value":""}],"summary":"todo property summary","name":"layout"},{"deprecated":false,"deprecation_reason":"","description":"","examples":[],"return_type":[{"type":"string","name":"","description":"","array_value":""}],"summary":"todo property summary","name":"layout_name"},{"deprecated":false,"deprecation_reason":"","description":"","examples":[],"return_type":[{"type":"nilclass","name":"","description":"","array_value":""}],"summary":"todo property summary","name":"metadata"}],"summary":"todo summary","name":"page","examples":[],"json_data":{"path":"","handle":"context.page","data_from_file":""},"return_type":[]},{"access":{"global":false,"parents":[],"template":[],"app_file_type":null},"deprecated":false,"deprecation_reason":"","description":"todo description","properties":[{"deprecated":false,"deprecation_reason":"","description":"","examples":[],"return_type":[{"type":"string","name":"","description":"","array_value":""}],"summary":"todo property summary","name":"slug"},{"deprecated":false,"deprecation_reason":"","description":"","examples":[],"return_type":[{"type":"string","name":"","description":"","array_value":""}],"summary":"todo property summary","name":"format"}],"summary":"todo summary","name":"params","examples":[],"json_data":{"path":"","handle":"context.params","data_from_file":""},"return_type":[]},{"access":{"global":true,"parents":[],"template":[],"app_file_type":"api_call"},"deprecated":false,"deprecation_reason":"","description":"","properties":[{"deprecated":false,"deprecation_reason":"","description":"","examples":[],"return_type":[{"type":"string","name":"","description":"","array_value":""}],"summary":"body of the response","name":"body"},{"deprecated":false,"deprecation_reason":"","description":"","examples":[],"return_type":[{"type":"string","name":"","description":"","array_value":""}],"summary":"status of the response","name":"status"}],"summary":"","name":"response","examples":[],"json_data":{"path":"","handle":"","data_from_file":""},"return_type":[]},{"access":{"global":false,"parents":[],"template":[],"app_file_type":null},"deprecated":false,"deprecation_reason":"","description":"todo description","properties":[],"summary":"todo summary","name":"search","examples":[],"json_data":{"path":"","handle":"location.search","data_from_file":""},"return_type":[]},{"access":{"global":false,"parents":[],"template":[],"app_file_type":null},"deprecated":false,"deprecation_reason":"","description":"todo description","properties":[{"deprecated":false,"deprecation_reason":"","description":"","examples":[],"return_type":[{"type":"string","name":"","description":"","array_value":""}],"summary":"todo property summary","name":"language"},{"deprecated":false,"deprecation_reason":"","description":"","examples":[],"return_type":[{"type":"string","name":"","description":"","array_value":""}],"summary":"todo property summary","name":"_csrf_token"},{"deprecated":false,"deprecation_reason":"","description":"","examples":[],"return_type":[{"type":"string","name":"","description":"","array_value":""}],"summary":"todo property summary","name":"session_id"}],"summary":"todo summary","name":"session","examples":[],"json_data":{"path":"","handle":"context.session","data_from_file":""},"return_type":[]},{"access":{"global":false,"parents":[],"template":[],"app_file_type":null},"deprecated":false,"deprecation_reason":"","description":"todo description","properties":[],"summary":"todo summary","name":"subscription_info","examples":[],"json_data":{"path":"","handle":"module.subscription_info","data_from_file":""},"return_type":[]},{"access":{"global":false,"parents":[],"template":[],"app_file_type":null},"deprecated":false,"deprecation_reason":"","description":"todo description","properties":[{"deprecated":false,"deprecation_reason":"","description":"","examples":[],"return_type":[{"type":"string","name":"","description":"","array_value":""}],"summary":"todo property summary","name":"all"},{"deprecated":false,"deprecation_reason":"","description":"","examples":[],"return_type":[{"type":"string","name":"","description":"","array_value":""}],"summary":"todo property summary","name":"us_zones"}],"summary":"todo summary","name":"time_zones","examples":[],"json_data":{"path":"","handle":"globals.time_zones","data_from_file":""},"return_type":[]},{"access":{"global":false,"parents":[],"template":[],"app_file_type":null},"deprecated":false,"deprecation_reason":"","description":"todo description","properties":[{"deprecated":false,"deprecation_reason":"","description":"","examples":[],"return_type":[{"type":"string","name":"","description":"","array_value":""}],"summary":"todo property summary","name":"version_name"}],"summary":"todo summary","name":"version_info","examples":[],"json_data":{"path":"","handle":"module.version_info","data_from_file":""},"return_type":[]},{"access":{"global":false,"parents":[],"template":[],"app_file_type":null},"deprecated":false,"deprecation_reason":"","description":"todo description","properties":[{"deprecated":false,"deprecation_reason":"","description":"","examples":[],"return_type":[{"type":"string","name":"","description":"","array_value":""}],"summary":"todo property summary","name":"ip"}],"summary":"todo summary","name":"visitor","examples":[],"json_data":{"path":"","handle":"context.visitor","data_from_file":""},"return_type":[]}]
|
|
4
|
+
[{"access":{"global":false,"parents":[],"template":[],"app_file_type":null},"deprecated":false,"deprecation_reason":"","description":"todo description","properties":[],"summary":"todo summary","name":"constants","examples":[],"json_data":{"path":"","handle":"context.constants","data_from_file":""},"return_type":[]},{"access":{"global":true,"parents":[],"template":[]},"deprecated":false,"deprecation_reason":"","description":"Include the `content_for_layout` object in your [layout files](/themes/architecture/layouts) between the `\u003cbody\u003e` and\n`\u003c/body\u003e` HTML tags.\n\n\u003e Note:\n\u003e The `content_for_layout` object is required in `theme.liquid`.","properties":[],"summary":"Dynamically returns content based on the current [template](/themes/architecture/templates).","name":"content_for_layout","examples":[],"json_data":{"path":"","handle":"","data_from_file":""},"return_type":[{"type":"string","name":"","description":"","array_value":""}]},{"access":{"global":true,"parents":[],"template":[],"app_file_type":null},"deprecated":false,"deprecation_reason":"","description":"todo description","properties":[{"deprecated":false,"deprecation_reason":"","description":"","examples":[],"return_type":[{"type":"string","name":"","description":"","array_value":""}],"summary":"todo property summary","name":"authenticity_token"},{"deprecated":false,"deprecation_reason":"","description":"","examples":[],"return_type":[{"type":"session","name":"","description":"","array_value":""}],"summary":"todo property summary","name":"session"},{"deprecated":false,"deprecation_reason":"","description":"","examples":[],"return_type":[{"type":"trueclass","name":"","description":"","array_value":""}],"summary":"todo property summary","name":"csrf_request_valid"},{"deprecated":false,"deprecation_reason":"","description":"","examples":[],"return_type":[{"type":"current_user","name":"","description":"","array_value":""}],"summary":"todo property summary","name":"current_user"},{"deprecated":false,"deprecation_reason":"","description":"","examples":[],"return_type":[{"type":"headers","name":"","description":"","array_value":""}],"summary":"todo property summary","name":"headers"},{"deprecated":false,"deprecation_reason":"","description":"","examples":[],"return_type":[{"type":"params","name":"","description":"","array_value":""}],"summary":"todo property summary","name":"params"},{"deprecated":false,"deprecation_reason":"","description":"","examples":[],"return_type":[{"type":"string","name":"","description":"","array_value":""}],"summary":"todo property summary","name":"language"},{"deprecated":false,"deprecation_reason":"","description":"","examples":[],"return_type":[{"type":"string","name":"","description":"","array_value":""}],"summary":"todo property summary","name":"environment"},{"deprecated":false,"deprecation_reason":"","description":"","examples":[],"return_type":[{"type":"falseclass","name":"","description":"","array_value":""}],"summary":"todo property summary","name":"is_xhr"},{"deprecated":false,"deprecation_reason":"","description":"","examples":[],"return_type":[{"type":"instance","name":"","description":"","array_value":""}],"summary":"todo property summary","name":"instance"},{"deprecated":false,"deprecation_reason":"","description":"","examples":[],"return_type":[{"type":"location","name":"","description":"","array_value":""}],"summary":"todo property summary","name":"location"},{"deprecated":false,"deprecation_reason":"","description":"","examples":[],"return_type":[{"type":"page","name":"","description":"","array_value":""}],"summary":"todo property summary","name":"page"},{"deprecated":false,"deprecation_reason":"","description":"","examples":[],"return_type":[{"type":"layout","name":"","description":"","array_value":""}],"summary":"todo property summary","name":"layout"},{"deprecated":false,"deprecation_reason":"","description":"","examples":[],"return_type":[{"type":"visitor","name":"","description":"","array_value":""}],"summary":"todo property summary","name":"visitor"},{"deprecated":false,"deprecation_reason":"","description":"","examples":[],"return_type":[{"type":"string","name":"","description":"","array_value":""}],"summary":"todo property summary","name":"useragent"},{"deprecated":false,"deprecation_reason":"","description":"","examples":[],"return_type":[{"type":"device","name":"","description":"","array_value":""}],"summary":"todo property summary","name":"device"},{"deprecated":false,"deprecation_reason":"","description":"","examples":[],"return_type":[{"type":"cookies","name":"","description":"","array_value":""}],"summary":"todo property summary","name":"cookies"},{"deprecated":false,"deprecation_reason":"","description":"","examples":[],"return_type":[{"type":"string","name":"","description":"","array_value":""}],"summary":"todo property summary","name":"version"},{"deprecated":false,"deprecation_reason":"","description":"","examples":[],"return_type":[{"type":"string","name":"","description":"","array_value":""}],"summary":"todo property summary","name":"post_params"},{"deprecated":false,"deprecation_reason":"","description":"","examples":[],"return_type":[{"type":"string","name":"","description":"","array_value":""}],"summary":"todo property summary","name":"hcaptcha_site_key"},{"deprecated":false,"deprecation_reason":"","description":"","examples":[],"return_type":[{"type":"globals","name":"","description":"","array_value":""}],"summary":"todo property summary","name":"globals"},{"deprecated":false,"deprecation_reason":"","description":"","examples":[],"return_type":[{"type":"modules","name":"","description":"","array_value":""}],"summary":"todo property summary","name":"modules"},{"deprecated":false,"deprecation_reason":"","description":"","examples":[],"return_type":[{"type":"constants","name":"","description":"","array_value":""}],"summary":"todo property summary","name":"constants"},{"deprecated":false,"deprecation_reason":"","description":"","examples":[],"return_type":[{"type":"flash","name":"","description":"","array_value":""}],"summary":"todo property summary","name":"flash"}],"summary":"todo summary","name":"context","examples":[],"json_data":{"path":"","handle":"context","data_from_file":""},"return_type":[]},{"access":{"global":false,"parents":[],"template":[],"app_file_type":null},"deprecated":false,"deprecation_reason":"","description":"todo description","properties":[{"deprecated":false,"deprecation_reason":"","description":"","examples":[],"return_type":[{"type":"string","name":"","description":"","array_value":""}],"summary":"todo property summary","name":"_pos_session"}],"summary":"todo summary","name":"cookies","examples":[],"json_data":{"path":"","handle":"context.cookies","data_from_file":""},"return_type":[]},{"access":{"global":false,"parents":[],"template":[],"app_file_type":null},"deprecated":false,"deprecation_reason":"","description":"todo description","properties":[{"deprecated":false,"deprecation_reason":"","description":"","examples":[],"return_type":[{"type":"string","name":"","description":"","array_value":""}],"summary":"todo property summary","name":"first_name"},{"deprecated":false,"deprecation_reason":"","description":"","examples":[],"return_type":[{"type":"string","name":"","description":"","array_value":""}],"summary":"todo property summary","name":"last_name"},{"deprecated":false,"deprecation_reason":"","description":"","examples":[],"return_type":[{"type":"string","name":"","description":"","array_value":""}],"summary":"todo property summary","name":"email"},{"deprecated":false,"deprecation_reason":"","description":"","examples":[],"return_type":[{"type":"string","name":"","description":"","array_value":""}],"summary":"todo property summary","name":"id"},{"deprecated":false,"deprecation_reason":"","description":"","examples":[],"return_type":[{"type":"string","name":"","description":"","array_value":""}],"summary":"todo property summary","name":"slug"}],"summary":"todo summary","name":"current_user","examples":[],"json_data":{"path":"","handle":"context.current_user","data_from_file":""},"return_type":[]},{"access":{"global":false,"parents":[],"template":[],"app_file_type":null},"deprecated":false,"deprecation_reason":"","description":"todo description","properties":[{"deprecated":false,"deprecation_reason":"","description":"","examples":[],"return_type":[{"type":"falseclass","name":"","description":"","array_value":""}],"summary":"todo property summary","name":"bot"},{"deprecated":false,"deprecation_reason":"","description":"","examples":[],"return_type":[{"type":"nilclass","name":"","description":"","array_value":""}],"summary":"todo property summary","name":"bot_name"},{"deprecated":false,"deprecation_reason":"","description":"","examples":[],"return_type":[{"type":"nilclass","name":"","description":"","array_value":""}],"summary":"todo property summary","name":"device_brand"},{"deprecated":false,"deprecation_reason":"","description":"","examples":[],"return_type":[{"type":"nilclass","name":"","description":"","array_value":""}],"summary":"todo property summary","name":"device_name"},{"deprecated":false,"deprecation_reason":"","description":"","examples":[],"return_type":[{"type":"string","name":"","description":"","array_value":""}],"summary":"todo property summary","name":"device_type"},{"deprecated":false,"deprecation_reason":"","description":"","examples":[],"return_type":[{"type":"string","name":"","description":"","array_value":""}],"summary":"todo property summary","name":"full_version"},{"deprecated":false,"deprecation_reason":"","description":"","examples":[],"return_type":[{"type":"trueclass","name":"","description":"","array_value":""}],"summary":"todo property summary","name":"known"},{"deprecated":false,"deprecation_reason":"","description":"","examples":[],"return_type":[{"type":"string","name":"","description":"","array_value":""}],"summary":"todo property summary","name":"name"},{"deprecated":false,"deprecation_reason":"","description":"","examples":[],"return_type":[{"type":"nilclass","name":"","description":"","array_value":""}],"summary":"todo property summary","name":"os_full_version"},{"deprecated":false,"deprecation_reason":"","description":"","examples":[],"return_type":[{"type":"string","name":"","description":"","array_value":""}],"summary":"todo property summary","name":"os_name"}],"summary":"todo summary","name":"device","examples":[],"json_data":{"path":"","handle":"context.device","data_from_file":""},"return_type":[]},{"access":{"global":false,"parents":[],"template":[],"app_file_type":null},"deprecated":false,"deprecation_reason":"","description":"todo description","properties":[],"summary":"todo summary","name":"flash","examples":[],"json_data":{"path":"","handle":"context.flash","data_from_file":""},"return_type":[]},{"access":{"global":true,"parents":[{"object":"forloop","property":"parentloop"}],"template":[]},"deprecated":false,"deprecation_reason":"","description":"","properties":[{"deprecated":false,"deprecation_reason":"","description":"","examples":[],"return_type":[{"type":"number","name":"","description":"","array_value":""}],"summary":"The total number of iterations in the loop.","name":"length"},{"deprecated":false,"deprecation_reason":"","description":"If the current `for` loop isn't nested inside another `for` loop, then `nil` is returned.","examples":[{"name":"Use the `parentloop` property","description":"","syntax":"","path":"/","raw_liquid":"{% for i in (1..3) -%}\n {% for j in (1..3) -%}\n {{ forloop.parentloop.index }} - {{ forloop.index }}\n {%- endfor %}\n{%- endfor %}","parameter":false,"display_type":"text","show_data_tab":true}],"return_type":[{"type":"forloop","name":"","description":"","array_value":""}],"summary":"The parent `forloop` object.","name":"parentloop"},{"deprecated":false,"deprecation_reason":"","description":"","examples":[],"return_type":[{"type":"number","name":"","description":"","array_value":""}],"summary":"The 1-based index of the current iteration.","name":"index"},{"deprecated":false,"deprecation_reason":"","description":"","examples":[],"return_type":[{"type":"number","name":"","description":"","array_value":""}],"summary":"The 0-based index of the current iteration.","name":"index0"},{"deprecated":false,"deprecation_reason":"","description":"","examples":[],"return_type":[{"type":"number","name":"","description":"","array_value":""}],"summary":"The 1-based index of the current iteration, in reverse order.","name":"rindex"},{"deprecated":false,"deprecation_reason":"","description":"","examples":[],"return_type":[{"type":"number","name":"","description":"","array_value":""}],"summary":"The 0-based index of the current iteration, in reverse order.","name":"rindex0"},{"deprecated":false,"deprecation_reason":"","description":"","examples":[],"return_type":[{"type":"boolean","name":"","description":"","array_value":""}],"summary":"Returns `true` if the current iteration is the first. Returns `false` if not.","name":"first"},{"deprecated":false,"deprecation_reason":"","description":"","examples":[],"return_type":[{"type":"boolean","name":"","description":"","array_value":""}],"summary":"Returns `true` if the current iteration is the last. Returns `false` if not.","name":"last"}],"summary":"Information about a parent [`for` loop](/docs/api/liquid/tags/for).","name":"forloop","examples":[{"name":"Use the `forloop` object","description":"","syntax":"","path":"/","raw_liquid":"{% for page in pages -%}\n {%- if forloop.length \u003e 0 -%}\n {{ page.title }}{% unless forloop.last %}, {% endunless -%}\n {%- endif -%}\n{% endfor %}","parameter":false,"display_type":"text","show_data_tab":true}],"json_data":{"path":"","handle":"","data_from_file":"{\"first\":true,\"index\":1,\"index0\":0,\"last\":false,\"length\":4,\"rindex\":3}"},"return_type":[]},{"access":{"global":false,"parents":[],"template":[],"app_file_type":null},"deprecated":false,"deprecation_reason":"","description":"todo description","properties":[{"deprecated":false,"deprecation_reason":"","description":"","examples":[],"return_type":[{"type":"time_zones","name":"","description":"","array_value":""}],"summary":"todo property summary","name":"time_zones"}],"summary":"todo summary","name":"globals","examples":[],"json_data":{"path":"","handle":"context.globals","data_from_file":""},"return_type":[]},{"access":{"global":false,"parents":[],"template":[],"app_file_type":null},"deprecated":false,"deprecation_reason":"","description":"todo description","properties":[{"deprecated":false,"deprecation_reason":"","description":"","examples":[],"return_type":[{"type":"string","name":"","description":"","array_value":""}],"summary":"todo property summary","name":"QUERY_STRING"}],"summary":"todo summary","name":"headers","examples":[],"json_data":{"path":"","handle":"context.headers","data_from_file":""},"return_type":[]},{"access":{"global":false,"parents":[],"template":[],"app_file_type":null},"deprecated":false,"deprecation_reason":"","description":"todo description","properties":[{"deprecated":false,"deprecation_reason":"","description":"","examples":[],"return_type":[{"type":"number","name":"","description":"","array_value":""}],"summary":"todo property summary","name":"id"},{"deprecated":false,"deprecation_reason":"","description":"","examples":[],"return_type":[{"type":"string","name":"","description":"","array_value":""}],"summary":"todo property summary","name":"uuid"},{"deprecated":false,"deprecation_reason":"","description":"","examples":[],"return_type":[{"type":"string","name":"","description":"","array_value":""}],"summary":"todo property summary","name":"name"}],"summary":"todo summary","name":"instance","examples":[],"json_data":{"path":"","handle":"context.instance","data_from_file":""},"return_type":[]},{"access":{"global":false,"parents":[],"template":[],"app_file_type":null},"deprecated":false,"deprecation_reason":"","description":"todo description","properties":[{"deprecated":false,"deprecation_reason":"","description":"","examples":[],"return_type":[{"type":"nilclass","name":"","description":"","array_value":""}],"summary":"todo property summary","name":"metadata"}],"summary":"todo summary","name":"layout","examples":[],"json_data":{"path":"","handle":"context.layout","data_from_file":""},"return_type":[]},{"access":{"global":false,"parents":[],"template":[],"app_file_type":null},"deprecated":false,"deprecation_reason":"","description":"todo description","properties":[{"deprecated":false,"deprecation_reason":"","description":"","examples":[],"return_type":[{"type":"string","name":"","description":"","array_value":""}],"summary":"todo property summary","name":"url"},{"deprecated":false,"deprecation_reason":"","description":"","examples":[],"return_type":[{"type":"string","name":"","description":"","array_value":""}],"summary":"todo property summary","name":"href"},{"deprecated":false,"deprecation_reason":"","description":"","examples":[],"return_type":[{"type":"string","name":"","description":"","array_value":""}],"summary":"todo property summary","name":"host"},{"deprecated":false,"deprecation_reason":"","description":"","examples":[],"return_type":[{"type":"string","name":"","description":"","array_value":""}],"summary":"todo property summary","name":"pathname"},{"deprecated":false,"deprecation_reason":"","description":"","examples":[],"return_type":[{"type":"search","name":"","description":"","array_value":""}],"summary":"todo property summary","name":"search"}],"summary":"todo summary","name":"location","examples":[],"json_data":{"path":"","handle":"context.location","data_from_file":""},"return_type":[]},{"access":{"global":false,"parents":[],"template":[],"app_file_type":null},"deprecated":false,"deprecation_reason":"","description":"todo description","properties":[{"deprecated":false,"deprecation_reason":"","description":"","examples":[],"return_type":[{"type":"string","name":"","description":"","array_value":""}],"summary":"todo property summary","name":"name"},{"deprecated":false,"deprecation_reason":"","description":"","examples":[],"return_type":[{"type":"string","name":"","description":"","array_value":""}],"summary":"todo property summary","name":"scope_name"},{"deprecated":false,"deprecation_reason":"","description":"","examples":[],"return_type":[{"type":"string","name":"","description":"","array_value":""}],"summary":"todo property summary","name":"version"},{"deprecated":false,"deprecation_reason":"","description":"","examples":[],"return_type":[{"type":"version_info","name":"","description":"","array_value":""}],"summary":"todo property summary","name":"version_info"},{"deprecated":false,"deprecation_reason":"","description":"","examples":[],"return_type":[{"type":"subscription_info","name":"","description":"","array_value":""}],"summary":"todo property summary","name":"subscription_info"}],"summary":"todo summary","name":"module","examples":[],"json_data":{"path":"","handle":"modules.module","data_from_file":""},"return_type":[]},{"access":{"global":false,"parents":[],"template":[],"app_file_type":null},"deprecated":false,"deprecation_reason":"","description":"todo description","properties":[{"deprecated":false,"deprecation_reason":"","description":"","examples":[],"return_type":[{"type":"module","name":"","description":"","array_value":""}],"summary":"todo property summary","name":"module"}],"summary":"todo summary","name":"modules","examples":[],"json_data":{"path":"","handle":"context.modules","data_from_file":""},"return_type":[]},{"access":{"global":false,"parents":[],"template":[],"app_file_type":null},"deprecated":false,"deprecation_reason":"","description":"todo description","properties":[{"deprecated":false,"deprecation_reason":"","description":"","examples":[],"return_type":[{"type":"number","name":"","description":"","array_value":""}],"summary":"todo property summary","name":"id"},{"deprecated":false,"deprecation_reason":"","description":"","examples":[],"return_type":[{"type":"string","name":"","description":"","array_value":""}],"summary":"todo property summary","name":"slug"},{"deprecated":false,"deprecation_reason":"","description":"","examples":[],"return_type":[{"type":"falseclass","name":"","description":"","array_value":""}],"summary":"todo property summary","name":"enable_profiler"},{"deprecated":false,"deprecation_reason":"","description":"","examples":[],"return_type":[{"type":"string","name":"","description":"","array_value":""}],"summary":"todo property summary","name":"layout"},{"deprecated":false,"deprecation_reason":"","description":"","examples":[],"return_type":[{"type":"string","name":"","description":"","array_value":""}],"summary":"todo property summary","name":"layout_name"},{"deprecated":false,"deprecation_reason":"","description":"","examples":[],"return_type":[{"type":"nilclass","name":"","description":"","array_value":""}],"summary":"todo property summary","name":"metadata"}],"summary":"todo summary","name":"page","examples":[],"json_data":{"path":"","handle":"context.page","data_from_file":""},"return_type":[]},{"access":{"global":false,"parents":[],"template":[],"app_file_type":null},"deprecated":false,"deprecation_reason":"","description":"todo description","properties":[{"deprecated":false,"deprecation_reason":"","description":"","examples":[],"return_type":[{"type":"string","name":"","description":"","array_value":""}],"summary":"todo property summary","name":"slug"},{"deprecated":false,"deprecation_reason":"","description":"","examples":[],"return_type":[{"type":"string","name":"","description":"","array_value":""}],"summary":"todo property summary","name":"format"}],"summary":"todo summary","name":"params","examples":[],"json_data":{"path":"","handle":"context.params","data_from_file":""},"return_type":[]},{"access":{"global":true,"parents":[],"template":[],"app_file_type":"api_call"},"deprecated":false,"deprecation_reason":"","description":"Response from the API Call","properties":[{"deprecated":false,"deprecation_reason":"","description":"","examples":[],"return_type":[{"type":"string","name":"","description":"","array_value":""}],"summary":"body of the response","name":"body"},{"deprecated":false,"deprecation_reason":"","description":"","examples":[],"return_type":[{"type":"string","name":"","description":"","array_value":""}],"summary":"status of the response","name":"status"}],"summary":"","name":"response","examples":[],"json_data":{"path":"","handle":"","data_from_file":""},"return_type":[]},{"access":{"global":false,"parents":[],"template":[],"app_file_type":null},"deprecated":false,"deprecation_reason":"","description":"todo description","properties":[],"summary":"todo summary","name":"search","examples":[],"json_data":{"path":"","handle":"location.search","data_from_file":""},"return_type":[]},{"access":{"global":false,"parents":[],"template":[],"app_file_type":null},"deprecated":false,"deprecation_reason":"","description":"todo description","properties":[{"deprecated":false,"deprecation_reason":"","description":"","examples":[],"return_type":[{"type":"string","name":"","description":"","array_value":""}],"summary":"todo property summary","name":"language"},{"deprecated":false,"deprecation_reason":"","description":"","examples":[],"return_type":[{"type":"string","name":"","description":"","array_value":""}],"summary":"todo property summary","name":"_csrf_token"},{"deprecated":false,"deprecation_reason":"","description":"","examples":[],"return_type":[{"type":"string","name":"","description":"","array_value":""}],"summary":"todo property summary","name":"session_id"}],"summary":"todo summary","name":"session","examples":[],"json_data":{"path":"","handle":"context.session","data_from_file":""},"return_type":[]},{"access":{"global":false,"parents":[],"template":[],"app_file_type":null},"deprecated":false,"deprecation_reason":"","description":"todo description","properties":[],"summary":"todo summary","name":"subscription_info","examples":[],"json_data":{"path":"","handle":"module.subscription_info","data_from_file":""},"return_type":[]},{"access":{"global":false,"parents":[],"template":[],"app_file_type":null},"deprecated":false,"deprecation_reason":"","description":"todo description","properties":[{"deprecated":false,"deprecation_reason":"","description":"","examples":[],"return_type":[{"type":"string","name":"","description":"","array_value":""}],"summary":"todo property summary","name":"all"},{"deprecated":false,"deprecation_reason":"","description":"","examples":[],"return_type":[{"type":"string","name":"","description":"","array_value":""}],"summary":"todo property summary","name":"us_zones"}],"summary":"todo summary","name":"time_zones","examples":[],"json_data":{"path":"","handle":"globals.time_zones","data_from_file":""},"return_type":[]},{"access":{"global":false,"parents":[],"template":[],"app_file_type":null},"deprecated":false,"deprecation_reason":"","description":"todo description","properties":[{"deprecated":false,"deprecation_reason":"","description":"","examples":[],"return_type":[{"type":"string","name":"","description":"","array_value":""}],"summary":"todo property summary","name":"version_name"}],"summary":"todo summary","name":"version_info","examples":[],"json_data":{"path":"","handle":"module.version_info","data_from_file":""},"return_type":[]},{"access":{"global":false,"parents":[],"template":[],"app_file_type":null},"deprecated":false,"deprecation_reason":"","description":"todo description","properties":[{"deprecated":false,"deprecation_reason":"","description":"","examples":[],"return_type":[{"type":"string","name":"","description":"","array_value":""}],"summary":"todo property summary","name":"ip"}],"summary":"todo summary","name":"visitor","examples":[],"json_data":{"path":"","handle":"context.visitor","data_from_file":""},"return_type":[]}]
|
|
5
5
|
|
|
6
6
|
|
|
@@ -4,12 +4,11 @@ This check prevents errors by making sure that no undefined variables are being
|
|
|
4
4
|
|
|
5
5
|
## Check Details
|
|
6
6
|
|
|
7
|
-
This check is aimed at eliminating undefined object errors.
|
|
7
|
+
This check is aimed at eliminating undefined object errors. Additionally it reports any missing or unused attributes in render, function and background tags.
|
|
8
8
|
|
|
9
9
|
:-1: Examples of **incorrect** code for this check:
|
|
10
10
|
|
|
11
11
|
```liquid
|
|
12
|
-
{% assign greetings = "Hello" %}
|
|
13
12
|
{% if greeting == "Hello" %}
|
|
14
13
|
Hello
|
|
15
14
|
{% endif %}
|
|
@@ -31,7 +30,7 @@ This check is aimed at eliminating undefined object errors.
|
|
|
31
30
|
```liquid
|
|
32
31
|
{% liquid
|
|
33
32
|
# my_function body
|
|
34
|
-
assign my_arg = my_arg
|
|
33
|
+
assign my_arg = my_arg | default: nil
|
|
35
34
|
return my_arg
|
|
36
35
|
%}
|
|
37
36
|
```
|
|
@@ -196,9 +196,12 @@ module PlatformosCheck
|
|
|
196
196
|
|
|
197
197
|
def check_undefined(info, all_global_objects, render_node)
|
|
198
198
|
all_variables = info.all_variables
|
|
199
|
-
|
|
199
|
+
potentially_unused_variables = render_node.value.attributes.keys if render_node
|
|
200
200
|
info.each_variable_lookup(!!render_node) do |(key, node)|
|
|
201
201
|
name, line_number = key
|
|
202
|
+
|
|
203
|
+
potentially_unused_variables&.delete(name)
|
|
204
|
+
|
|
202
205
|
next if all_variables.include?(name)
|
|
203
206
|
next if all_global_objects.include?(name)
|
|
204
207
|
|
|
@@ -213,6 +216,11 @@ module PlatformosCheck
|
|
|
213
216
|
add_offense("Undefined object `#{name}`", node:, line_number:)
|
|
214
217
|
end
|
|
215
218
|
end
|
|
219
|
+
|
|
220
|
+
potentially_unused_variables -= render_node.value.internal_attributes if render_node && render_node.value.respond_to?(:internal_attributes)
|
|
221
|
+
potentially_unused_variables&.each do |name|
|
|
222
|
+
add_offense("Unused argument `#{name}`", node: render_node)
|
|
223
|
+
end
|
|
216
224
|
end
|
|
217
225
|
end
|
|
218
226
|
end
|
data/lib/platformos_check/language_server/completion_providers/object_completion_provider.rb
CHANGED
|
@@ -11,7 +11,6 @@ module PlatformosCheck
|
|
|
11
11
|
return [] unless variable_lookup.lookups.empty?
|
|
12
12
|
return [] if content[context.cursor - 1] == "."
|
|
13
13
|
|
|
14
|
-
|
|
15
14
|
current_file_type = file_type(find_file(context))
|
|
16
15
|
|
|
17
16
|
PlatformosLiquid::SourceIndex
|
|
@@ -41,11 +40,11 @@ module PlatformosCheck
|
|
|
41
40
|
|
|
42
41
|
def find_file(context)
|
|
43
42
|
@storage.platformos_app
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
43
|
+
.grouped_files
|
|
44
|
+
.values
|
|
45
|
+
.map(&:values)
|
|
46
|
+
.flatten
|
|
47
|
+
.find { |app_file| app_file.relative_path.to_s == context.relative_path }
|
|
49
48
|
end
|
|
50
49
|
|
|
51
50
|
def file_type(app_file)
|
|
@@ -11,6 +11,7 @@ module PlatformosCheck
|
|
|
11
11
|
def file_link(partial, platformos_app)
|
|
12
12
|
relative_path = nil
|
|
13
13
|
path_prefixes(platformos_app).each do |prefix|
|
|
14
|
+
prefix ||= ''
|
|
14
15
|
partial_with_prefix = (prefix.split(File::SEPARATOR) + [partial]).join(File::SEPARATOR)
|
|
15
16
|
relative_path = platformos_app.send(app_file_type).detect { |f| f.name == partial_with_prefix }&.relative_path
|
|
16
17
|
break if relative_path
|
|
@@ -5,6 +5,7 @@ module PlatformosCheck
|
|
|
5
5
|
class Background < Base
|
|
6
6
|
PARTIAL_SYNTAX = /(#{Liquid::VariableSignature}+)\s*=\s*(.*)\s*/om
|
|
7
7
|
CLOSE_TAG_SYNTAX = /\A(.*)(?-mix:\{%-?)\s*(\w+)\s*(.*)?(?-mix:%\})\z/m # based on Liquid::Raw::FullTokenPossiblyInvalid
|
|
8
|
+
INTERNAL_ATTRIBUTES = %w[delay priority max_attempts source_name]
|
|
8
9
|
|
|
9
10
|
attr_reader :to, :from, :attributes, :value_expr, :partial_syntax, :partial_name
|
|
10
11
|
|
|
@@ -27,6 +28,10 @@ module PlatformosCheck
|
|
|
27
28
|
@attributes = attributes_expr
|
|
28
29
|
end
|
|
29
30
|
|
|
31
|
+
def internal_attributes
|
|
32
|
+
INTERNAL_ATTRIBUTES
|
|
33
|
+
end
|
|
34
|
+
|
|
30
35
|
def parse(tokens)
|
|
31
36
|
return super if @partial_syntax
|
|
32
37
|
|
|
@@ -31,7 +31,7 @@ module PlatformosCheck
|
|
|
31
31
|
@inline_query = true
|
|
32
32
|
parse_markup(tag_name, markup)
|
|
33
33
|
@attributes = attributes_expr.keys
|
|
34
|
-
@to = @value_expr.name
|
|
34
|
+
@to = @value_expr.is_a?(String) ? @value_expr : @value_expr.name
|
|
35
35
|
else
|
|
36
36
|
raise Liquid::SyntaxError, 'Invalid syntax for graphql tag'
|
|
37
37
|
end
|
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: platformos-check
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.
|
|
4
|
+
version: 0.4.0
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Piotr Bliszczyk
|
|
@@ -10,7 +10,7 @@ authors:
|
|
|
10
10
|
autorequire:
|
|
11
11
|
bindir: exe
|
|
12
12
|
cert_chain: []
|
|
13
|
-
date: 2023-09-
|
|
13
|
+
date: 2023-09-17 00:00:00.000000000 Z
|
|
14
14
|
dependencies:
|
|
15
15
|
- !ruby/object:Gem::Dependency
|
|
16
16
|
name: graphql
|