rubocop-sketchup 0.10.2 → 0.11.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/lib/rubocop/sketchup/cop/requirements/extension_namespace.rb +18 -1
- data/lib/rubocop/sketchup/cop/requirements/get_extension_license.rb +1 -1
- data/lib/rubocop/sketchup/cop/requirements/sketchup_extension.rb +1 -1
- data/lib/rubocop/sketchup/version.rb +1 -1
- data/rubocop-sketchup.gemspec +1 -1
- metadata +10 -10
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: eccdbbd14db9a649f1926e8148e6aa3137adbb64c5a970cb02cf597b0a4aabb1
|
4
|
+
data.tar.gz: 8b162f899b3270352c64242868fb7cc3ba6b75c8480349774f808bc4d06300ef
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d23a59f8f52303027459eb696917092b229ea3f61381995eed0ecc0e52fef97826de6bfef9ac7f613865041b83bebf2640f5dd5d57aa36f6970ad3cec58ae120
|
7
|
+
data.tar.gz: 687723fc85eba7cdda263aac29d4105c551ca7b4e9d7ddcc415f083ee950a9f5c2619ce149eac218f19a98f1f4d771cb998af1ea5a87a547a40ba2b888dfd8e7
|
@@ -46,8 +46,25 @@ module RuboCop
|
|
46
46
|
|
47
47
|
def check_class_or_module(node)
|
48
48
|
name = node.defined_module_name
|
49
|
-
|
49
|
+
|
50
|
+
if node.parent_module_name
|
51
|
+
parent = Namespace.new(node.parent_module_name)
|
52
|
+
else
|
53
|
+
# This is somewhat of an educated guess. We might end up here with
|
54
|
+
# code like this:
|
55
|
+
#
|
56
|
+
# Example.generate do
|
57
|
+
# module HelloWorld
|
58
|
+
# end
|
59
|
+
# end
|
60
|
+
#
|
61
|
+
# It might be that the module is evaluated in a different context.
|
62
|
+
# But we'll accept the possible false positive and let the user
|
63
|
+
# config exceptions if needed.
|
64
|
+
parent = Namespace.new('Object')
|
65
|
+
end
|
50
66
|
namespace = parent.join(name)
|
67
|
+
|
51
68
|
# Don't want to process anything that aren't top level namespaces.
|
52
69
|
return unless parent.top_level?
|
53
70
|
# Don't check excluded namespaces.
|
@@ -39,7 +39,7 @@ module RuboCop
|
|
39
39
|
if argument.lvar_type?
|
40
40
|
variable_name = argument.children.first
|
41
41
|
assignment_node = find_assignment(node, variable_name)
|
42
|
-
argument = assignment_node.children.last
|
42
|
+
argument = assignment_node.children.last if assignment_node
|
43
43
|
end
|
44
44
|
|
45
45
|
if argument.str_type?
|
data/rubocop-sketchup.gemspec
CHANGED
metadata
CHANGED
@@ -1,35 +1,35 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: rubocop-sketchup
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.11.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Trimble Inc, SketchUp Team
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2019-
|
11
|
+
date: 2019-10-04 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rubocop
|
15
15
|
requirement: !ruby/object:Gem::Requirement
|
16
16
|
requirements:
|
17
|
-
- - ">="
|
18
|
-
- !ruby/object:Gem::Version
|
19
|
-
version: '0.69'
|
20
17
|
- - "<="
|
21
18
|
- !ruby/object:Gem::Version
|
22
|
-
version: '0.
|
19
|
+
version: '0.75'
|
20
|
+
- - ">="
|
21
|
+
- !ruby/object:Gem::Version
|
22
|
+
version: '0.75'
|
23
23
|
type: :runtime
|
24
24
|
prerelease: false
|
25
25
|
version_requirements: !ruby/object:Gem::Requirement
|
26
26
|
requirements:
|
27
|
-
- - ">="
|
28
|
-
- !ruby/object:Gem::Version
|
29
|
-
version: '0.69'
|
30
27
|
- - "<="
|
31
28
|
- !ruby/object:Gem::Version
|
32
|
-
version: '0.
|
29
|
+
version: '0.75'
|
30
|
+
- - ">="
|
31
|
+
- !ruby/object:Gem::Version
|
32
|
+
version: '0.75'
|
33
33
|
- !ruby/object:Gem::Dependency
|
34
34
|
name: bundler
|
35
35
|
requirement: !ruby/object:Gem::Requirement
|