platformos-check 0.4.9 → 0.4.11

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 (29) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +15 -0
  3. data/README.md +18 -18
  4. data/config/default.yml +9 -0
  5. data/data/platformos_liquid/documentation/filters.json +1 -1
  6. data/data/platformos_liquid/documentation/latest.json +1 -1
  7. data/data/platformos_liquid/documentation/tags.json +1 -1
  8. data/docs/checks/translation_files_match.md +70 -0
  9. data/docs/checks/translation_key_exists.md +44 -0
  10. data/docs/platformos-check.jpg +0 -0
  11. data/lib/platformos_check/app.rb +13 -0
  12. data/lib/platformos_check/app_file.rb +22 -3
  13. data/lib/platformos_check/checks/missing_template.rb +19 -26
  14. data/lib/platformos_check/checks/translation_files_match.rb +83 -0
  15. data/lib/platformos_check/checks/translation_key_exists.rb +48 -0
  16. data/lib/platformos_check/checks/undefined_object.rb +1 -1
  17. data/lib/platformos_check/ext/hash.rb +19 -0
  18. data/lib/platformos_check/graphql_file.rb +10 -6
  19. data/lib/platformos_check/language_server/constants.rb +18 -2
  20. data/lib/platformos_check/language_server/document_link_provider.rb +67 -10
  21. data/lib/platformos_check/language_server/document_link_providers/localize_document_link_provider.rb +38 -0
  22. data/lib/platformos_check/language_server/document_link_providers/theme_render_document_link_provider.rb +2 -1
  23. data/lib/platformos_check/language_server/document_link_providers/translation_document_link_provider.rb +36 -0
  24. data/lib/platformos_check/translation_file.rb +40 -0
  25. data/lib/platformos_check/version.rb +1 -1
  26. data/lib/platformos_check/yaml_file.rb +7 -2
  27. data/lib/platformos_check.rb +1 -0
  28. metadata +11 -4
  29. data/docs/preview.png +0 -0
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: e41eee4e2aa717be9663df4efbc1acf79bc8b571784808b80177f9298fdad9e9
4
- data.tar.gz: 6bed8f9e1e3e22dbd02cee00a15d5e9ce1787f7826ee09e3e461fcf0161c681d
3
+ metadata.gz: 75c26d25ca37804e005de9dc19115f7a82e5d47e735178710799aa0a26f9f0ab
4
+ data.tar.gz: 8f739f2fb5a0781e0a0d1941ff6f4a028d75ece6a17ddd5eeb75d1ce0603ec33
5
5
  SHA512:
6
- metadata.gz: 71a9feab2a3d5e31a2436652036bf1669c65424f24cfa550feedb49bd43e03264f2feb51b0367c84a79805c3cda0d24ed3ccccdd27d2b63a09dd15f3e26a94b4
7
- data.tar.gz: 56961261716dae13fce53dadb2c6e03d8c3f268195748e81783cfe4dd7162c18ffb05063530975939ad2805f2a2e33d5d63aab1da51de65f3c98e17e1e2df2b4
6
+ metadata.gz: db1fc79fc045545e7fa114a0abc0232c5a478277795cb21d1e0e351c1d75d35e330a3327202d26b4c219b86ac21d9ae98c69f33b7771018292c70d94713a08e6
7
+ data.tar.gz: 0b3282d42ee9e1cb60a4a2d0f2e2011ccb1d6ae296b5b5fdba7c8962c9454ec574bb116080ecbb1387bc5a001326b58e5144c8651a5b292f54ee72859a814b31
data/CHANGELOG.md CHANGED
@@ -1,3 +1,18 @@
1
+ v0.4.11 / 2024-03-11
2
+ ==================
3
+
4
+ * Do not throw parse error for empty GraphQL file
5
+ * enable MissingTemplate Check in single file mode
6
+ * report if file is blank in MissingTemplate check
7
+ * add support for background tag in MissingTemplate check
8
+
9
+
10
+ v0.4.10 / 2024-02-19
11
+ ==================
12
+
13
+ * Add documentLink for translations (both for `| t` and `| l` filters)
14
+ * Add TranslationKeyExists, TranslationFilesMatch offenses to warn about issues with missing translation or inconsistency between multiple language translation files
15
+
1
16
  v0.4.9 / 2024-01-10
2
17
  ==================
3
18
 
data/README.md CHANGED
@@ -8,28 +8,28 @@ PlatformOS Check is a tool that helps you follow platformOS recommendations & be
8
8
 
9
9
  PlatformOS Check currently checks for the following:
10
10
 
11
- ✅ Liquid syntax errors
12
- ✅ JSON syntax errors
13
- ✅ Missing partials and graphqls
14
- ✅ Unused variables (via `{% assign var = ... %}`, {% function var = ... %} etc.)
15
- ✅ Unused partials
16
- ✅ Template length
17
- ✅ Deprecated tags
18
- ✅ Unknown tags
19
- ✅ Unknown filters
20
- ✅ Missing or extra spaces inside `{% ... %}` and `{{ ... }}`
21
- ✅ Using several `{% ... %}` instead of `{% liquid ... %}`
22
- ✅ Undefined objects
23
- ✅ Deprecated filters
24
- ✅ Missing `platformos-check-enable` comment
25
- ✅ Invalid arguments provided to `{% graphql %}` tags
26
- ✅ Missing `authenticity_token` in `<form>`
11
+ ✅ Liquid syntax errors
12
+ ✅ JSON syntax errors
13
+ ✅ Missing partials and graphqls
14
+ ✅ Unused variables (via `{% assign var = ... %}`, {% function var = ... %} etc.)
15
+ ✅ Unused partials
16
+ ✅ Template length
17
+ ✅ Deprecated tags
18
+ ✅ Unknown tags
19
+ ✅ Unknown filters
20
+ ✅ Missing or extra spaces inside `{% ... %}` and `{{ ... }}`
21
+ ✅ Using several `{% ... %}` instead of `{% liquid ... %}`
22
+ ✅ Undefined objects
23
+ ✅ Deprecated filters
24
+ ✅ Missing `platformos-check-enable` comment
25
+ ✅ Invalid arguments provided to `{% graphql %}` tags
26
+ ✅ Missing `authenticity_token` in `<form>`
27
27
  ✅ Unreachable code
28
28
 
29
29
  As well as checks that prevent easy to spot performance problems:
30
30
 
31
- ✅ [GraphQL in for loop](/docs/checks/graphql_in_for_loop.md)
32
- ✅ Use of [parser-blocking](/docs/checks/parser_blocking_javascript.md) JavaScript
31
+ ✅ [GraphQL in for loop](/docs/checks/graphql_in_for_loop.md)
32
+ ✅ Use of [parser-blocking](/docs/checks/parser_blocking_javascript.md) JavaScript
33
33
  ✅ [Missing width and height attributes on `img` tags](/docs/checks/img_width_and_height.md)
34
34
 
35
35
  For detailed descriptions and configuration options, [take a look at the complete list.](/docs/checks/)
data/config/default.yml CHANGED
@@ -110,7 +110,16 @@ HtmlParsingError:
110
110
  enabled: true
111
111
  ignore: []
112
112
 
113
+ TranslationKeyExists:
114
+ enabled: true
115
+ ignore: []
116
+
117
+ TranslationFilesMatch:
118
+ enabled: true
119
+ ignore: []
120
+
113
121
  ParseJsonFormat:
114
122
  enabled: false
115
123
  start_level: 0
116
124
  indent: ' '
125
+