platformos-check 0.4.11 → 0.4.13

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.
Files changed (52) hide show
  1. checksums.yaml +4 -4
  2. data/.github/workflows/build_for_windows.yml +57 -0
  3. data/CHANGELOG.md +11 -0
  4. data/CONTRIBUTING.md +20 -18
  5. data/README.md +108 -57
  6. data/RELEASING.md +14 -7
  7. data/TROUBLESHOOTING.md +19 -10
  8. data/build/windows/build.sh +3 -2
  9. data/data/platformos_liquid/documentation/filters.json +1 -1
  10. data/data/platformos_liquid/documentation/latest.json +1 -1
  11. data/data/platformos_liquid/documentation/tags.json +1 -1
  12. data/docs/api/check.md +7 -6
  13. data/docs/api/html_check.md +12 -13
  14. data/docs/api/liquid_check.md +17 -21
  15. data/docs/api/yaml_check.md +3 -3
  16. data/docs/checks/TEMPLATE.md.erb +16 -11
  17. data/docs/checks/convert_include_to_render.md +29 -13
  18. data/docs/checks/deprecated_filter.md +5 -9
  19. data/docs/checks/form_action.md +12 -12
  20. data/docs/checks/form_authenticity_token.md +21 -15
  21. data/docs/checks/graphql_in_for_loop.md +15 -13
  22. data/docs/checks/html_parsing_error.md +12 -12
  23. data/docs/checks/img_lazy_loading.md +13 -11
  24. data/docs/checks/img_width_and_height.md +21 -23
  25. data/docs/checks/include_in_render.md +11 -11
  26. data/docs/checks/invalid_args.md +11 -11
  27. data/docs/checks/liquid_tag.md +12 -12
  28. data/docs/checks/missing_enable_comment.md +7 -7
  29. data/docs/checks/missing_template.md +14 -13
  30. data/docs/checks/parse_json_format.md +15 -14
  31. data/docs/checks/parser_blocking_javascript.md +19 -14
  32. data/docs/checks/required_layout_object.md +5 -7
  33. data/docs/checks/space_inside_braces.md +12 -12
  34. data/docs/checks/syntax_error.md +10 -10
  35. data/docs/checks/template_length.md +12 -12
  36. data/docs/checks/translation_files_match.md +10 -11
  37. data/docs/checks/translation_key_exists.md +10 -11
  38. data/docs/checks/undefined_object.md +11 -13
  39. data/docs/checks/unknown_filter.md +11 -11
  40. data/docs/checks/unreachable_code.md +11 -11
  41. data/docs/checks/unused_assign.md +11 -11
  42. data/docs/checks/unused_partial.md +7 -11
  43. data/docs/checks/valid_yaml.md +11 -11
  44. data/docs/language_server/how_to_correct_code_with_code_actions_and_execute_command.md +62 -70
  45. data/lib/platformos_check/language_server/completion_providers/filter_completion_provider.rb +1 -1
  46. data/lib/platformos_check/language_server/handler.rb +7 -6
  47. data/lib/platformos_check/language_server/variable_lookup_finder.rb +8 -10
  48. data/lib/platformos_check/platformos_liquid/documentation.rb +2 -2
  49. data/lib/platformos_check/version.rb +1 -1
  50. data/platformos-check.gemspec +1 -1
  51. metadata +6 -6
  52. data/build/windows/lsp.exe +0 -0
@@ -1,12 +1,12 @@
1
- # Prevent providing invalid arguments in function, render and graphql tags Liquid (`InvalidArgs`)
1
+ # Prevent providing invalid arguments in `function`, `render` and `graphql` tags Liquid (`InvalidArgs`)
2
2
 
3
- This check exists to prevent providing invalid arguments via `function`, `render` and `graphql` tags.
3
+ This check ensures that invalid arguments are not provided in `function`, `render`, and `graphql` tags in Liquid files.
4
4
 
5
5
  ## Examples
6
6
 
7
- The following examples contain code snippets that either fail or pass this check.
7
+ The following examples show code snippets that either fail or pass this check:
8
8
 
9
- ### ✗ Fail
9
+ ### ✗ Incorrect Code Example (Avoid using this):
10
10
 
11
11
  ```liquid
12
12
  {% comment %}app/graphql/my-query does not define invalid_argument{% endcomment %}
@@ -21,16 +21,16 @@ The following examples contain code snippets that either fail or pass this check
21
21
  {% render res = 'my-partial', context: context %}
22
22
  ```
23
23
 
24
- ### ✓ Pass
24
+ ### ✓ Correct Code Example (Use this instead):
25
25
 
26
26
  ```liquid
27
27
  {% comment %}app/graphql/my-query defines defined_argument{% endcomment %}
28
28
  {% graphql res = 'my-query', defined_argument: 10 %}
29
29
  ```
30
30
 
31
- ## Options
31
+ ## Configuration Options
32
32
 
33
- The following example contains the default configuration for this check:
33
+ The default configuration for this check:
34
34
 
35
35
  ```yaml
36
36
  InvalidArgs:
@@ -42,9 +42,9 @@ InvalidArgs:
42
42
  | enabled | Whether the check is enabled. |
43
43
  | severity | The [severity](https://documentation.platformos.com/developer-guide/platformos-check/platformos-check#check-severity) of the check. |
44
44
 
45
- ## When Not To Use It
45
+ ## Disabling This Check
46
46
 
47
- It is not safe to disable this rule.
47
+ Disabling this check is not recommended.
48
48
 
49
49
  ## Resources
50
50
 
@@ -52,5 +52,5 @@ It is not safe to disable this rule.
52
52
  - [Rule source][codesource]
53
53
  - [Documentation source][docsource]
54
54
 
55
- [codesource]: /lib/platformos_check/checks/graphql_args.rb
56
- [docsource]: /docs/checks/graphql_args.md
55
+ [codesource]: /lib/platformos_check/checks/invalid_args.rb
56
+ [docsource]: /docs/checks/invalid_args.md
@@ -1,12 +1,12 @@
1
- # Encourage use of liquid tag for consecutive statements (LiquidTag)
1
+ # Encourage Use of `{% liquid ... %}` Tag for Consecutive Statements (`LiquidTag`)
2
2
 
3
- Recommends using `{% liquid ... %}` if 4 or more consecutive liquid tags (`{% ... %}`) are found.
3
+ This check recommends using the `{% liquid ... %}` tag when four or more consecutive Liquid tags (`{% ... %}`) are found. The purpose of this check is to eliminate repetitive tag markers (`{%` and `%}`) in your platformOS application files for improved readability and maintainability.
4
4
 
5
- ## Check Details
5
+ ## Examples
6
6
 
7
- This check is aimed at eliminating repetitive tag markers (`{%` and `%}`) in theme files.
7
+ The following examples show code snippets that either fail or pass this check:
8
8
 
9
- :-1: Example of **incorrect** code for this check:
9
+ ### ✗ Incorrect Code Example (Avoid using this):
10
10
 
11
11
  ```liquid
12
12
  {% if collection.image.size != 0 %}
@@ -18,7 +18,7 @@ This check is aimed at eliminating repetitive tag markers (`{%` and `%}`) in the
18
18
  {% endif %}
19
19
  ```
20
20
 
21
- :+1: Example of **correct** code for this check:
21
+ ### ✓ Correct Code Example (Use this instead):
22
22
 
23
23
  ```liquid
24
24
  {%- liquid
@@ -32,9 +32,9 @@ This check is aimed at eliminating repetitive tag markers (`{%` and `%}`) in the
32
32
  -%}
33
33
  ```
34
34
 
35
- ## Check Options
35
+ ## Configuration Options
36
36
 
37
- The default configuration for this check is the following:
37
+ The default configuration for this check:
38
38
 
39
39
  ```yaml
40
40
  LiquidTag:
@@ -44,15 +44,15 @@ LiquidTag:
44
44
 
45
45
  ### `min_consecutive_statements`
46
46
 
47
- The `min_consecutive_statements` option (Default: `5`) determines the maximum (inclusive) number of consecutive statements before the check recommends a refactor.
47
+ The `min_consecutive_statements` option (Default: `5`) determines the maximum (inclusive) number of consecutive statements required before the check recommends refactoring to use the `{% liquid ... %}` tag.
48
48
 
49
- ## When Not To Use It
49
+ ## Disabling This Check
50
50
 
51
- It's safe to disable this rule.
51
+ This check is safe to disable if it does not align with your coding standards.
52
52
 
53
53
  ## Version
54
54
 
55
- This check has been introduced in PlatformOS Check 0.0.1.
55
+ This check has been introduced in platformOS Check 0.0.1.
56
56
 
57
57
  ## Resources
58
58
 
@@ -1,12 +1,12 @@
1
- # Prevent missing platformos-check-enable comments (`MissingEnableComment`)
1
+ # Prevent Missing `platformos-check-enable` Comments (`MissingEnableComment`)
2
2
 
3
- When `platformos-check-disable` is used in the middle of a theme file, the corresponding `platformos-check-enable` comment should also be included.
3
+ This check ensures that when `platformos-check-disable` is used in your platformOS application, a corresponding `platformos-check-enable` comment is included to re-enable the checks.
4
4
 
5
- ## Check Details
5
+ ## Examples
6
6
 
7
- This check aims at eliminating missing `platformos-check-enable` comments.
7
+ The following examples show code snippets that either fail or pass this check:
8
8
 
9
- :-1: Example of **incorrect** code for this check:
9
+ ### ✗ Incorrect Code Example (Avoid using this):
10
10
 
11
11
  ```liquid
12
12
  <!doctype html>
@@ -21,7 +21,7 @@ This check aims at eliminating missing `platformos-check-enable` comments.
21
21
  </html>
22
22
  ```
23
23
 
24
- :+1: Example of **correct** code for this check:
24
+ ### &#x2713; Correct Code Example (Use this instead):
25
25
 
26
26
  ```liquid
27
27
  <!doctype html>
@@ -39,7 +39,7 @@ This check aims at eliminating missing `platformos-check-enable` comments.
39
39
 
40
40
  ## Version
41
41
 
42
- This check has been introduced in PlatformOS Check 0.3.0.
42
+ This check has been introduced in platformOS Check 0.3.0.
43
43
 
44
44
  ## Resources
45
45
 
@@ -1,26 +1,26 @@
1
- # Prevent missing templates (`MissingTemplate`)
1
+ # Prevent Missing Templates (`MissingTemplate`)
2
2
 
3
- This check exists to prevent rendering resources with the `render` tag, `function` tag (and the deprecated `include` tag) that do not exist.
3
+ This check ensures that resources specified with the `render` tag, `function` tag, and the deprecated `include` tag actually exist. It aims to prevent Liquid rendering errors caused by referencing non-existent templates.
4
4
 
5
- ## Check Details
5
+ ## Examples
6
6
 
7
- This check is aimed at preventing liquid rendering errors.
7
+ The following examples show code snippets that either fail or pass this check:
8
8
 
9
- :-1: Example of **incorrect** code for this check:
9
+ ### &#x2717; Incorrect Code Example (Avoid using this):
10
10
 
11
11
  ```liquid
12
12
  {% render 'partial-that-does-not-exist' %}
13
13
  ```
14
14
 
15
- :+1: Example of **correct** code for this check:
15
+ ### &#x2713; Correct Code Example (Use this instead):
16
16
 
17
17
  ```liquid
18
18
  {% render 'partial-that-exists' %}
19
19
  ```
20
20
 
21
- ## Check Options
21
+ ## Configuration Options
22
22
 
23
- The default configuration for this check is the following:
23
+ The default configuration for this check:
24
24
 
25
25
  ```yaml
26
26
  MissingTemplate:
@@ -30,9 +30,10 @@ MissingTemplate:
30
30
 
31
31
  ### `ignore_missing`
32
32
 
33
- Specify a list of patterns of missing template files to ignore.
33
+ Specify a list of patterns for missing template files to ignore.
34
34
 
35
- While the `ignore` option will ignore all occurrences of `MissingTemplate` according to the file in which they appear, `ignore_missing` allows ignoring all occurrences of `MissingTemplate` based on the target template, the template being rendered.
35
+ - The `ignore` option ignores all occurrences of `MissingTemplate` according to the file in which they appear.
36
+ - The `ignore_missing` option ignores all occurrences of `MissingTemplate` based on the target template, the template being rendered.
36
37
 
37
38
  For example:
38
39
 
@@ -42,7 +43,7 @@ MissingTemplate:
42
43
  - icon-*
43
44
  ```
44
45
 
45
- Would ignore offenses on `{% render 'icon-missing' %}` across app files.
46
+ This configuration ignores offenses on `{% render 'icon-missing' %}` across all app files.
46
47
 
47
48
  ```yaml
48
49
  MissingTemplate:
@@ -50,11 +51,11 @@ MissingTemplate:
50
51
  - modules/private-module/index.liquid
51
52
  ```
52
53
 
53
- Would ignore all `MissingTemplate` in `modules/private-module/index.liquid`, no mater the file being rendered.
54
+ This configuration ignores all `MissingTemplate` offenses in `modules/private-module/index.liquid`, regardless of the file being rendered.
54
55
 
55
56
  ## Version
56
57
 
57
- This check has been introduced in PlatformOS Check 0.0.1.
58
+ This check has been introduced in platformOS Check 0.0.1.
58
59
 
59
60
  ## Resources
60
61
 
@@ -1,16 +1,12 @@
1
- # Prevent unformatted parse_json tags (`ParseJsonFormat`)
1
+ # Prevent Unformatted `parse_json` Tags (`ParseJsonFormat`)
2
2
 
3
- _Version 1.9.0+_
4
-
5
- This check exists to ensure the JSON in your parses is pretty.
6
-
7
- It exists as a facilitator for its auto-correction. This way you can right-click fix the problem.
3
+ This check ensures that the JSON in your `parse_json` tags is properly formatted (pretty) for better readability. It facilitates auto-correction, allowing you to right-click and fix formatting issues easily.
8
4
 
9
5
  ## Examples
10
6
 
11
- The following examples contain code snippets that either fail or pass this check.
7
+ The following examples show code snippets that either fail or pass this check:
12
8
 
13
- ### &#x2717; Fail
9
+ ### &#x2717; Incorrect Code Example (Avoid using this):
14
10
 
15
11
  ```liquid
16
12
  {% parse_json my_json %}
@@ -25,7 +21,7 @@ The following examples contain code snippets that either fail or pass this check
25
21
  {% endparse_json %}
26
22
  ```
27
23
 
28
- ### &#x2713; Pass
24
+ ### &#x2713; Correct Code Example (Use this instead):
29
25
 
30
26
  ```liquid
31
27
  {% parse_json my_json %}
@@ -44,9 +40,9 @@ The following examples contain code snippets that either fail or pass this check
44
40
  {% endparse_json %}
45
41
  ```
46
42
 
47
- ## Options
43
+ ## Configuration Options
48
44
 
49
- The following example contains the default configuration for this check:
45
+ The default configuration for this check:
50
46
 
51
47
  ```yaml
52
48
  ParseJsonFormat:
@@ -60,12 +56,17 @@ ParseJsonFormat:
60
56
  | --- | --- |
61
57
  | enabled | Whether the check is enabled. |
62
58
  | severity | The [severity](https://documentation.platformos.com/developer-guide/platformos-check/platformos-check#check-severity) of the check. |
63
- | start_level | The indentation level. If you prefer an indented parse_json, set this to 1. |
59
+ | start_level | The base indentation level. Set this to 1 if you prefer an indented `parse_json`. |
64
60
  | indent | The character(s) used for indentation levels. |
65
61
 
66
- ## Disabling this check
67
62
 
68
- This check is safe to disable. You might want to disable this check if you do not care about the visual appearance of your parse_json tags.
63
+ ## Disabling This Check
64
+
65
+ This check is safe to disable if you do not care about the visual formatting of your `parse_json` tags.
66
+
67
+ ## Version
68
+
69
+ This check has been introduced in platformOS Check 1.9.0.
69
70
 
70
71
  ## Resources
71
72
 
@@ -1,16 +1,21 @@
1
- # Discourage use of parser-blocking JavaScript (`ParserBlockingJavaScript`)
1
+ # Discourage Use of Parser-Blocking JavaScript (`ParserBlockingJavaScript`)
2
2
 
3
- The `defer` or `async` attributes are extremely important on script tags. When neither of those attributes are used, a script tag will block the construction and rendering of the DOM until the script is _loaded_, _parsed_ and _executed_. It also creates congestion on the Network, messes with the resource priorities and significantly delays the rendering of the page.
3
+ This check aims to eliminate parser-blocking JavaScript in your app.
4
4
 
5
- Considering that JavaScript on platformOS apps should always be used to progressively _enhance_ the experience of the site, app should never make use of parser-blocking script tags.
5
+ Using the `defer` or `async` attributes is extremely important on script tags. When neither of those attributes are used, a script tag will block the construction and rendering of the DOM until the script is _loaded_, _parsed_ and _executed_. This can create network congestion, interfere with resource priorities, and significantly delay page rendering.
6
6
 
7
- As a general rule, use `defer` if the order of execution matters, `async` otherwise. When in doubt, choose either one and get 80/20 of the benefits.
7
+ JavaScript in platformOS apps should always be used to progressively _enhance_ the user experience. Therefore, parser-blocking script tags should never be used.
8
8
 
9
- ## Check Details
9
+ As a general rule:
10
+ - Use `defer` if the order of execution matters.
11
+ - Use `async` if the order of execution does not matter.
12
+ - When in doubt, using either will provide 80/20 of the benefits.
10
13
 
11
- This check is aimed at eliminating parser-blocking JavaScript on app.
14
+ ## Examples
12
15
 
13
- :-1: Examples of **incorrect** code for this check:
16
+ The following examples show code snippets that either fail or pass this check:
17
+
18
+ ### &#x2717; Incorrect Code Example (Avoid using this):
14
19
 
15
20
  ```liquid
16
21
  <!-- The script_tag filter outputs a parser-blocking script -->
@@ -27,7 +32,7 @@ This check is aimed at eliminating parser-blocking JavaScript on app.
27
32
  </script>
28
33
  ```
29
34
 
30
- :+1: Examples of **correct** code for this check:
35
+ ### &#x2713; Correct Code Example (Use this instead):
31
36
 
32
37
  ```liquid
33
38
  <!-- Good. Using the asset_url filter + defer -->
@@ -67,24 +72,24 @@ This check is aimed at eliminating parser-blocking JavaScript on app.
67
72
  <button id="thing">Click Me</button>
68
73
  ```
69
74
 
70
- ## Check Options
75
+ ## Configuration Options
71
76
 
72
- The default configuration for this check is the following:
77
+ The default configuration for this check:
73
78
 
74
79
  ```yaml
75
80
  ParserBlockingJavaScript:
76
81
  enabled: true
77
82
  ```
78
83
 
79
- ## When Not To Use It
84
+ ## Disabling This Check
80
85
 
81
- This should only be turned off with the `platformos-check-disable` comment when there's no better way to accomplish what you're doing than with a parser-blocking script.
86
+ This check should only be disabled with the `platformos-check-disable` comment if there is no better way to achieve the desired outcome than using a parser-blocking script.
82
87
 
83
- It is discouraged to turn this rule off.
88
+ Disabling this check is generally not recommended.
84
89
 
85
90
  ## Version
86
91
 
87
- This check has been introduced in PlatformOS Check 0.0.1.
92
+ This check has been introduced in platformOS Check 0.0.1.
88
93
 
89
94
  ## Resources
90
95
 
@@ -1,12 +1,10 @@
1
- # Prevent missing required objects in layouts (`RequiredLayoutThemeObject`)
1
+ # Prevent Missing Required Objects in Layouts (`RequiredLayoutThemeObject`)
2
2
 
3
- ## Check Details
3
+ This check ensures that the `{{ content_for_layout }}` object is present in layouts, preventing rendering issues due to missing objects.
4
4
 
5
- This check prevents missing `{{ content_for_layout }}` objects in layouts.
5
+ ## Configuration Options
6
6
 
7
- ## Check Options
8
-
9
- The default configuration for this check is the following:
7
+ The default configuration for this check:
10
8
 
11
9
  ```yaml
12
10
  RequiredLayoutObject:
@@ -15,7 +13,7 @@ RequiredLayoutObject:
15
13
 
16
14
  ## Version
17
15
 
18
- This check has been introduced in PlatformOS Check 0.0.1.
16
+ This check has been introduced in platformOS Check 0.0.1.
19
17
 
20
18
  ## Resources
21
19
 
@@ -1,12 +1,12 @@
1
- # Ensure consistent spacing inside Liquid tags and variables (`SpaceInsideBraces`)
1
+ # Ensure Consistent Spacing Inside Liquid Tags and Variables (`SpaceInsideBraces`)
2
2
 
3
- Warns against inconsistent spacing inside liquid tags and variables.
3
+ This check warns against and aims to eliminate inconsistent spacing inside Liquid tags and variables, ensuring cleaner and more readable Liquid code.
4
4
 
5
- ## Check Details
5
+ ## Examples
6
6
 
7
- This check is aimed at eliminating ugly Liquid:
7
+ The following examples show code snippets that either fail or pass this check:
8
8
 
9
- :-1: Examples of **incorrect** code for this check:
9
+ ### &#x2717; Incorrect Code Example (Avoid using this):
10
10
 
11
11
  ```liquid
12
12
  <!-- Around braces -->
@@ -27,7 +27,7 @@ This check is aimed at eliminating ugly Liquid:
27
27
  {%- if product.featured_media.width >=165 -%}
28
28
  ```
29
29
 
30
- :+1: Examples of **correct** code for this check:
30
+ ### &#x2713; Correct Code Example (Use this instead):
31
31
 
32
32
  ```liquid
33
33
  {% assign x = 1 %}
@@ -47,9 +47,9 @@ This check is aimed at eliminating ugly Liquid:
47
47
  {%- if product.featured_media.width >= 165 -%}
48
48
  ```
49
49
 
50
- ## Check Options
50
+ ## Configuration Options
51
51
 
52
- The default configuration for this check is the following:
52
+ The default configuration for this check:
53
53
 
54
54
  ```yaml
55
55
  SpaceInsideBraces:
@@ -58,7 +58,7 @@ SpaceInsideBraces:
58
58
 
59
59
  ## Auto-correction
60
60
 
61
- This check can automatically trim or add spaces around `{{ ... }}`.
61
+ This check can automatically correct spacing around `{{ ... }}`. For example:
62
62
 
63
63
  ```liquid
64
64
  {{ x}}
@@ -72,13 +72,13 @@ Can all be auto-corrected with the `--auto-correct` option to:
72
72
  {{ x }}
73
73
  ```
74
74
 
75
- ## When Not To Use It
75
+ ## Disabling This Check
76
76
 
77
- If you don't care about the look of your code.
77
+ This check is safe to disable if you do not prioritize the visual consistency of your code.
78
78
 
79
79
  ## Version
80
80
 
81
- This check has been introduced in PlatformOS Check 0.0.1.
81
+ This check has been introduced in platformOS Check 0.0.1.
82
82
 
83
83
  ## Resources
84
84
 
@@ -1,12 +1,12 @@
1
1
  # Prevent Syntax Errors (`SyntaxError`)
2
2
 
3
- This check exists to inform the user of Liquid syntax error earlier.
3
+ This check helps inform the user of Liquid syntax errors early, aiming to eliminate syntax errors in Liquid code.
4
4
 
5
- ## Check Details
5
+ ## Examples
6
6
 
7
- This check is aimed at eliminating syntax errors.
7
+ The following examples show code snippets that either fail or pass this check:
8
8
 
9
- :-1: Examples of **incorrect** code for this check:
9
+ ### &#x2717; Incorrect Code Example (Avoid using this):
10
10
 
11
11
  ```liquid
12
12
  {% include 'muffin'
@@ -15,7 +15,7 @@ This check is aimed at eliminating syntax errors.
15
15
  {% if collection | size > 0 %}
16
16
  ```
17
17
 
18
- :+1: Examples of **correct** code for this check:
18
+ ### &#x2713; Correct Code Example (Use this instead):
19
19
 
20
20
  ```liquid
21
21
  {% include 'muffin' %}
@@ -23,22 +23,22 @@ This check is aimed at eliminating syntax errors.
23
23
  {% if collection.size > 0 %}
24
24
  ```
25
25
 
26
- ## Check Options
26
+ ## Configuration Options
27
27
 
28
- The default configuration for this check is the following:
28
+ The default configuration for this check:
29
29
 
30
30
  ```yaml
31
31
  SyntaxError:
32
32
  enabled: true
33
33
  ```
34
34
 
35
- ## When Not To Use It
35
+ ## Disabling This Check
36
36
 
37
- It is not safe to disable this rule.
37
+ Disabling this check is not recommended.
38
38
 
39
39
  ## Version
40
40
 
41
- This check has been introduced in PlatformOS Check 0.0.1.
41
+ This check has been introduced in platformOS Check 0.0.1.
42
42
 
43
43
  ## Resources
44
44
 
@@ -1,22 +1,22 @@
1
- # Discourage the use of large template files (`TemplateLength`)
1
+ # Discourage the Use of Large Template Files (`TemplateLength`)
2
2
 
3
- This check exists to discourage the use of large template files. Use partials and functions to componentize your app.
3
+ This check aims to eliminate the use of large template files by encouraging a modular approach - using partials and functions to componentize your app instead.
4
4
 
5
- ## Check Details
5
+ ## Examples
6
6
 
7
- This check is aimed at eliminating large template files.
7
+ The following examples show code snippets that either fail or pass this check:
8
8
 
9
- :-1: Examples of **incorrect** code for this check:
9
+ ### &#x2717; Incorrect Example (Avoid using this):
10
10
 
11
11
  - Files that have more lines than the threshold
12
12
 
13
- :+1: Examples of **correct** code for this check:
13
+ ### &#x2713; Correct Example (Use this instead):
14
14
 
15
15
  - Files that have less lines than the threshold
16
16
 
17
- ## Check Options
17
+ ## Configuration Options
18
18
 
19
- The default configuration for this check is the following:
19
+ The default configuration for this check:
20
20
 
21
21
  ```yaml
22
22
  TemplateLength:
@@ -26,15 +26,15 @@ TemplateLength:
26
26
 
27
27
  ### `max_length`
28
28
 
29
- The `max_length` (Default: `200`) option determines the maximum number of lines allowed inside a liquid file.
29
+ The `max_length` (Default: `600`) option determines the maximum number of lines allowed inside a liquid file.
30
30
 
31
- ## When Not To Use It
31
+ ## Disabling This Check
32
32
 
33
- If you don't care about template lengths, then it's safe to disable this rule.
33
+ This check is safe to disable if you do not prioritize template length management.
34
34
 
35
35
  ## Version
36
36
 
37
- This check has been introduced in PlatformOS Check 0.0.1.
37
+ This check has been introduced in platformOS Check 0.0.1.
38
38
 
39
39
  ## Resources
40
40
 
@@ -1,12 +1,12 @@
1
1
  # Translation Files Match (`TranslationFilesMatch`)
2
2
 
3
- Checks if translation files for different language have the same keys.
3
+ This check ensures that translation files for different languages have the same keys, aiming to avoid inconsistencies, making it easier to spot errors and maintain the code.
4
4
 
5
- ## Check Details
5
+ ## Examples
6
6
 
7
- This check is aimed at avoiding inconsistences between translation files to avoid errors hard to spot and make maintenance easier.
7
+ The following examples show code snippets that either fail or pass this check:
8
8
 
9
- :-1: Examples of **incorrect** code for this check:
9
+ ### &#x2717; Incorrect Code Example (Avoid using this):
10
10
 
11
11
  ```yaml
12
12
  # app/translations/en/item.yml
@@ -25,7 +25,7 @@ This check is aimed at avoiding inconsistences between translation files to avoi
25
25
 
26
26
  Missing "title" in de/item.yml
27
27
 
28
- :+1: Examples of **correct** code for this check:
28
+ ### &#x2713; Correct Code Example (Use this instead):
29
29
 
30
30
  ```yaml
31
31
  # app/translations/en/item.yml
@@ -43,23 +43,22 @@ Missing "title" in de/item.yml
43
43
  description: "Beschreibung"
44
44
  ```
45
45
 
46
- ## Check Options
46
+ ## Configuration Options
47
47
 
48
- The default configuration for this check is the following:
48
+ The default configuration for this check:
49
49
 
50
50
  ```yaml
51
51
  TranslationFilesMatch:
52
52
  enabled: true
53
53
  ```
54
54
 
55
- ## When Not To Use It
55
+ ## Disabling This Check
56
56
 
57
- There should be no cases where disabling this rule is needed. For keys that are set via UI, and hence should not be part of the codebase,
58
- use proper configuration option in [app/config.yml](https://documentation.platformos.com/developer-guide/platformos-workflow/codebase/config)
57
+ There should be no need to disable this rule. For keys set via the UI and not intended to be part of the codebase, use the appropriate configuration option in [app/config.yml](https://documentation.platformos.com/developer-guide/platformos-workflow/codebase/config).
59
58
 
60
59
  ## Version
61
60
 
62
- This check has been introduced in PlatformOS Check 0.4.10.
61
+ This check has been introduced in platformOS Check 0.4.10.
63
62
 
64
63
  ## Resources
65
64