platformos-check 0.4.11 → 0.4.13
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.github/workflows/build_for_windows.yml +57 -0
- data/CHANGELOG.md +11 -0
- data/CONTRIBUTING.md +20 -18
- data/README.md +108 -57
- data/RELEASING.md +14 -7
- data/TROUBLESHOOTING.md +19 -10
- data/build/windows/build.sh +3 -2
- data/data/platformos_liquid/documentation/filters.json +1 -1
- data/data/platformos_liquid/documentation/latest.json +1 -1
- data/data/platformos_liquid/documentation/tags.json +1 -1
- data/docs/api/check.md +7 -6
- data/docs/api/html_check.md +12 -13
- data/docs/api/liquid_check.md +17 -21
- data/docs/api/yaml_check.md +3 -3
- data/docs/checks/TEMPLATE.md.erb +16 -11
- data/docs/checks/convert_include_to_render.md +29 -13
- data/docs/checks/deprecated_filter.md +5 -9
- data/docs/checks/form_action.md +12 -12
- data/docs/checks/form_authenticity_token.md +21 -15
- data/docs/checks/graphql_in_for_loop.md +15 -13
- data/docs/checks/html_parsing_error.md +12 -12
- data/docs/checks/img_lazy_loading.md +13 -11
- data/docs/checks/img_width_and_height.md +21 -23
- data/docs/checks/include_in_render.md +11 -11
- data/docs/checks/invalid_args.md +11 -11
- data/docs/checks/liquid_tag.md +12 -12
- data/docs/checks/missing_enable_comment.md +7 -7
- data/docs/checks/missing_template.md +14 -13
- data/docs/checks/parse_json_format.md +15 -14
- data/docs/checks/parser_blocking_javascript.md +19 -14
- data/docs/checks/required_layout_object.md +5 -7
- data/docs/checks/space_inside_braces.md +12 -12
- data/docs/checks/syntax_error.md +10 -10
- data/docs/checks/template_length.md +12 -12
- data/docs/checks/translation_files_match.md +10 -11
- data/docs/checks/translation_key_exists.md +10 -11
- data/docs/checks/undefined_object.md +11 -13
- data/docs/checks/unknown_filter.md +11 -11
- data/docs/checks/unreachable_code.md +11 -11
- data/docs/checks/unused_assign.md +11 -11
- data/docs/checks/unused_partial.md +7 -11
- data/docs/checks/valid_yaml.md +11 -11
- data/docs/language_server/how_to_correct_code_with_code_actions_and_execute_command.md +62 -70
- data/lib/platformos_check/language_server/completion_providers/filter_completion_provider.rb +1 -1
- data/lib/platformos_check/language_server/handler.rb +7 -6
- data/lib/platformos_check/language_server/variable_lookup_finder.rb +8 -10
- data/lib/platformos_check/platformos_liquid/documentation.rb +2 -2
- data/lib/platformos_check/version.rb +1 -1
- data/platformos-check.gemspec +1 -1
- metadata +6 -6
- data/build/windows/lsp.exe +0 -0
@@ -169,8 +169,8 @@ module PlatformosCheck
|
|
169
169
|
|
170
170
|
def on_workspace_did_create_files(_id, params)
|
171
171
|
paths = params[:files]
|
172
|
-
|
173
|
-
|
172
|
+
&.map { |file| file[:uri] }
|
173
|
+
&.map { |uri| file_path(uri) }
|
174
174
|
return unless paths
|
175
175
|
|
176
176
|
paths.each do |path|
|
@@ -184,8 +184,9 @@ module PlatformosCheck
|
|
184
184
|
|
185
185
|
def on_workspace_did_delete_files(_id, params)
|
186
186
|
absolute_paths = params[:files]
|
187
|
-
|
188
|
-
|
187
|
+
&.map { |file| file[:uri] }
|
188
|
+
&.map { |uri| file_path(uri) }
|
189
|
+
|
189
190
|
return unless absolute_paths
|
190
191
|
|
191
192
|
absolute_paths.each do |path|
|
@@ -201,8 +202,8 @@ module PlatformosCheck
|
|
201
202
|
# (which might trigger another platformos_app analysis).
|
202
203
|
def on_workspace_will_rename_files(id, params)
|
203
204
|
relative_paths = params[:files]
|
204
|
-
|
205
|
-
|
205
|
+
&.map { |file| [file[:oldUri], file[:newUri]] }
|
206
|
+
&.map { |(old_uri, new_uri)| [relative_path_from_uri(old_uri), relative_path_from_uri(new_uri)] }
|
206
207
|
return @bridge.send_response(id, nil) unless relative_paths
|
207
208
|
|
208
209
|
relative_paths.each do |(old_path, new_path)|
|
@@ -75,11 +75,10 @@ module PlatformosCheck
|
|
75
75
|
is_liquid_variable = content =~ Liquid::VariableStart
|
76
76
|
is_in_variable_segment = previous_char =~ VARIABLE_LOOKUP_CHARACTERS
|
77
77
|
is_on_blank_variable_lookup_position = content[0..cursor - 1] =~ /[{:,-]\s+$/
|
78
|
-
|
79
|
-
|
80
|
-
|
81
|
-
|
82
|
-
)
|
78
|
+
|
79
|
+
is_liquid_variable && (
|
80
|
+
is_in_variable_segment ||
|
81
|
+
is_on_blank_variable_lookup_position
|
83
82
|
)
|
84
83
|
end
|
85
84
|
|
@@ -162,11 +161,10 @@ module PlatformosCheck
|
|
162
161
|
is_liquid_tag = content.match?(Liquid::TagStart)
|
163
162
|
is_in_variable_segment = markup =~ ENDS_WITH_POTENTIAL_LOOKUP
|
164
163
|
is_on_blank_variable_lookup_position = markup =~ ENDS_WITH_BLANK_POTENTIAL_LOOKUP
|
165
|
-
|
166
|
-
|
167
|
-
|
168
|
-
|
169
|
-
)
|
164
|
+
|
165
|
+
is_liquid_tag && (
|
166
|
+
is_in_variable_segment ||
|
167
|
+
is_on_blank_variable_lookup_position
|
170
168
|
)
|
171
169
|
end
|
172
170
|
|
@@ -22,8 +22,8 @@ module PlatformosCheck
|
|
22
22
|
property_entry = SourceIndex
|
23
23
|
.objects
|
24
24
|
.find { |entry| entry.name == object_name }
|
25
|
-
|
26
|
-
|
25
|
+
&.properties
|
26
|
+
&.find { |prop| prop.name == property_name }
|
27
27
|
|
28
28
|
render_doc(property_entry)
|
29
29
|
end
|
data/platformos-check.gemspec
CHANGED
@@ -28,7 +28,7 @@ Gem::Specification.new do |spec|
|
|
28
28
|
spec.require_paths = ["lib"]
|
29
29
|
|
30
30
|
spec.add_dependency('graphql', '~> 2.0.0')
|
31
|
-
spec.add_dependency('liquid', '
|
31
|
+
spec.add_dependency('liquid', '5.4.0')
|
32
32
|
spec.add_dependency('nokogiri', '>= 1.12')
|
33
33
|
spec.add_dependency('parser', '~> 3')
|
34
34
|
|
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.
|
4
|
+
version: 0.4.13
|
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: 2024-
|
13
|
+
date: 2024-10-07 00:00:00.000000000 Z
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
16
16
|
name: graphql
|
@@ -30,14 +30,14 @@ dependencies:
|
|
30
30
|
name: liquid
|
31
31
|
requirement: !ruby/object:Gem::Requirement
|
32
32
|
requirements:
|
33
|
-
- -
|
33
|
+
- - '='
|
34
34
|
- !ruby/object:Gem::Version
|
35
35
|
version: 5.4.0
|
36
36
|
type: :runtime
|
37
37
|
prerelease: false
|
38
38
|
version_requirements: !ruby/object:Gem::Requirement
|
39
39
|
requirements:
|
40
|
-
- -
|
40
|
+
- - '='
|
41
41
|
- !ruby/object:Gem::Version
|
42
42
|
version: 5.4.0
|
43
43
|
- !ruby/object:Gem::Dependency
|
@@ -78,6 +78,7 @@ extensions: []
|
|
78
78
|
extra_rdoc_files: []
|
79
79
|
files:
|
80
80
|
- ".dockerignore"
|
81
|
+
- ".github/workflows/build_for_windows.yml"
|
81
82
|
- ".gitignore"
|
82
83
|
- ".rubocop.yml"
|
83
84
|
- CHANGELOG.md
|
@@ -96,7 +97,6 @@ files:
|
|
96
97
|
- build/windows/Gemfile
|
97
98
|
- build/windows/README.md
|
98
99
|
- build/windows/build.sh
|
99
|
-
- build/windows/lsp.exe
|
100
100
|
- build/windows/run.rb
|
101
101
|
- config/default.yml
|
102
102
|
- config/nothing.yml
|
@@ -373,7 +373,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
373
373
|
- !ruby/object:Gem::Version
|
374
374
|
version: '0'
|
375
375
|
requirements: []
|
376
|
-
rubygems_version: 3.5.
|
376
|
+
rubygems_version: 3.5.18
|
377
377
|
signing_key:
|
378
378
|
specification_version: 4
|
379
379
|
summary: A platformOS App Linter
|
data/build/windows/lsp.exe
DELETED
Binary file
|