rubocop-sketchup 0.1.4 → 0.1.5
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/config/default.yml +115 -35
- data/lib/rubocop/sketchup/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 6a682a986a80b22c8a6a1a4882e7ccf730306dc2
|
4
|
+
data.tar.gz: f883dfc7ba5d0100b447ac77364078a475c2a770
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: e763bf2331404f463e0d9d46ff19fadd9d642066eaf8b0606e108f089af006670e7fce3d3efb3eaa1abf14870e6bae732e353aa88fdd17632c0fff0f1364ac92
|
7
|
+
data.tar.gz: e550faed872bb4308a3658e42cb08aa2bc4880787ca6b01aca53fea0bebfa5291411ee6052ed8feb62466a20c00f66de21567f80b3e0736ee4290fa62e487812
|
data/config/default.yml
CHANGED
@@ -1,37 +1,92 @@
|
|
1
1
|
---
|
2
|
+
SketchupDeprecations/OperationNextTransparent:
|
3
|
+
Description: Third argument in `model.start_operation` is deprecated.
|
4
|
+
Details: >-
|
5
|
+
It is not possible to predict what operation will come next. Avoid
|
6
|
+
making the next operation transparent.
|
7
|
+
Enabled: true
|
8
|
+
|
9
|
+
SketchupPerformance/OpenSSL:
|
10
|
+
Description: Avoid using Ruby's OpenSSL within SketchUp.
|
11
|
+
Details: >-
|
12
|
+
A flaw in how it obtain random bits under Windows can severely
|
13
|
+
affect performance, freezing SketchUp for many minutes.
|
14
|
+
This also affects SecureRandom and anything else that depend on
|
15
|
+
OpenSSL. Net::HTTP is affected if connecting via HTTPS. Connecting
|
16
|
+
via plain HTTP is unaffected.
|
17
|
+
Enabled: true
|
18
|
+
|
19
|
+
SketchupPerformance/OperationDisableUI:
|
20
|
+
Description: Operations should disable the UI for performance gain.
|
21
|
+
Enabled: true
|
22
|
+
|
2
23
|
SketchupPerformance/SelectionBulkChanges:
|
3
24
|
Description: >-
|
4
25
|
Avoid modifying the selection set within loops. It's much
|
5
26
|
faster to change the selection in bulk.
|
6
27
|
Enabled: true
|
7
28
|
|
8
|
-
SketchupPerformance/
|
9
|
-
Description:
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
29
|
+
SketchupPerformance/Typename:
|
30
|
+
Description: Using `.typename` is very slow, prefer `.is_a?` instead.
|
31
|
+
Enabled: true
|
32
|
+
|
33
|
+
|
34
|
+
SketchupRequirements/ApiNamespace:
|
35
|
+
Description: Don't modify the SketchUp API namespace.
|
36
|
+
Details: >-
|
37
|
+
Modifying the API namespace could affect other extensions - making
|
38
|
+
it hard for other developers to determine what is going on.
|
16
39
|
Enabled: true
|
17
40
|
|
18
41
|
SketchupRequirements/Exit:
|
19
42
|
Description: Exit attempts to kill the Ruby interpreter.
|
43
|
+
Details: >-
|
44
|
+
SketchUp will trap `exit` and prevent that, with a message in the
|
45
|
+
console. But `exit!` is not trapped and with terminate SketchUp
|
46
|
+
without shutting down cleanly.
|
47
|
+
Use `return`, `next` or `break` instead.
|
48
|
+
Enabled: true
|
49
|
+
|
50
|
+
SketchupRequirements/ExtensionNamespace:
|
51
|
+
Description: Confine extensions to a single root namespace.
|
52
|
+
Details: >-
|
53
|
+
To avoid clashing with other extensions a single root namespace
|
54
|
+
should all the extension's code.
|
20
55
|
Enabled: true
|
21
56
|
|
22
57
|
SketchupRequirements/FileStructure:
|
23
|
-
Description:
|
24
|
-
|
25
|
-
|
26
|
-
|
58
|
+
Description: Expected extension file structure not found.
|
59
|
+
Details: >-
|
60
|
+
Check that the extension conform to expected file structure with a
|
61
|
+
single root .rb file and a support folder with matching name.
|
27
62
|
Enabled: true
|
28
63
|
SourcePath: src
|
29
64
|
|
65
|
+
SketchupRequirements/GlobalConstants:
|
66
|
+
Description: Do not introduce global constants.
|
67
|
+
Enabled: true
|
68
|
+
|
69
|
+
SketchupRequirements/GlobalMethods:
|
70
|
+
Description: Extensions should not define global methods.
|
71
|
+
Enabled: true
|
72
|
+
|
73
|
+
SketchupRequirements/GlobalVariables:
|
74
|
+
Description: Do not introduce global variables.
|
75
|
+
Enabled: true
|
76
|
+
|
30
77
|
SketchupRequirements/LanguageHandlerGlobals:
|
31
|
-
Description:
|
32
|
-
|
33
|
-
|
34
|
-
|
78
|
+
Description: Don't use other known global variables.
|
79
|
+
Details: >-
|
80
|
+
Avoid using globals in general, but especially these which are
|
81
|
+
known to be in use by other extensions made by SketchUp.
|
82
|
+
They are still in use due to compatibility reasons.
|
83
|
+
Enabled: true
|
84
|
+
|
85
|
+
SketchupRequirements/LoadPath:
|
86
|
+
Description: Do not modify the load path.
|
87
|
+
Details: >-
|
88
|
+
This can cause other extensions from not loading correctly. Always
|
89
|
+
load files relative to the installation path for the extension.
|
35
90
|
Enabled: true
|
36
91
|
|
37
92
|
SketchupRequirements/MinimalRegistration:
|
@@ -47,8 +102,16 @@ SketchupRequirements/RegisterExtension:
|
|
47
102
|
might confuse users to think the extension isn't working.
|
48
103
|
Enabled: true
|
49
104
|
|
105
|
+
SketchupRequirements/RubyCoreNamespace:
|
106
|
+
Description: Do not modify Ruby core functionality.
|
107
|
+
Enabled: true
|
108
|
+
|
109
|
+
SketchupRequirements/RubyStdLibNamespace:
|
110
|
+
Description: Do not modify Ruby stdlib functionality.
|
111
|
+
Enabled: true
|
112
|
+
|
50
113
|
SketchupRequirements/ShippedExtensionsNamespace:
|
51
|
-
Description:
|
114
|
+
Description: Don't use the namespace of SketchUp's shipped extensions.
|
52
115
|
Enabled: true
|
53
116
|
|
54
117
|
SketchupRequirements/SketchupExtension:
|
@@ -57,40 +120,57 @@ SketchupRequirements/SketchupExtension:
|
|
57
120
|
This should be done by the root .rb file in the extension
|
58
121
|
package.
|
59
122
|
Enabled: true
|
123
|
+
SourcePath: src
|
60
124
|
|
61
|
-
|
125
|
+
|
126
|
+
SketchupSuggestions/DynamicComponentInternals:
|
62
127
|
Description: >-
|
63
|
-
|
64
|
-
|
65
|
-
contain non-english characters it will lead to exceptions being
|
66
|
-
raised when the strings are used. Force encoding to work around
|
67
|
-
this.
|
128
|
+
Avoid relying on internal logic of Dynamic Components. It's
|
129
|
+
behavior might change between versions.
|
68
130
|
Enabled: true
|
69
131
|
|
70
|
-
SketchupSuggestions/
|
71
|
-
Description:
|
132
|
+
SketchupSuggestions/FileEncoding:
|
133
|
+
Description: Beware encoding bug in Ruby when using `__FILE__` and `__dir__`.
|
134
|
+
Details: >-
|
135
|
+
When using `__FILE__` and `__dir__`, beware that Ruby doesn't apply
|
136
|
+
the correct encoding to the strings under Windows. When they
|
137
|
+
contain non-english characters it will lead to exceptions being
|
138
|
+
raised when the strings are used. Force encoding to work around
|
139
|
+
this.
|
72
140
|
Enabled: true
|
73
|
-
SourcePath: src
|
74
141
|
|
75
|
-
SketchupSuggestions/
|
142
|
+
SketchupSuggestions/ModelEntities:
|
76
143
|
Description: >-
|
77
|
-
|
78
|
-
|
144
|
+
Typically one should use `model.active_entities` instead
|
145
|
+
of `model.entities`.
|
146
|
+
Details: >-
|
147
|
+
In SketchUp the norm is that editing is performed in the opened
|
148
|
+
instance (`model.active_entities`). `model.entities` refer to the
|
149
|
+
model root.
|
79
150
|
Enabled: true
|
80
151
|
|
81
152
|
SketchupSuggestions/OperationName:
|
82
|
-
Description:
|
153
|
+
Description: >-
|
154
|
+
Check that operation names are human friendly and consistent
|
155
|
+
with SketchUp.
|
156
|
+
Details: >-
|
157
|
+
This check is very naive and might produce false positives. Use
|
158
|
+
as guidance only.
|
83
159
|
Enabled: true
|
84
160
|
Max: 25
|
85
161
|
|
86
162
|
SketchupSuggestions/SketchupFindSupportFile:
|
87
163
|
Description: >-
|
88
|
-
Avoid Sketchup.find_support_file to find your extension's
|
89
|
-
|
90
|
-
|
91
|
-
|
164
|
+
Avoid `Sketchup.find_support_file` to find your extension's
|
165
|
+
files.
|
166
|
+
Details: >-
|
167
|
+
Extensions might be installed outside the SketchUp Plugins folder.
|
168
|
+
Use `__FILE__` and `__dir__` to locate your files relative to the
|
169
|
+
executing file.
|
92
170
|
Enabled: true
|
93
171
|
|
94
172
|
SketchupSuggestions/SketchupRequire:
|
95
|
-
Description:
|
173
|
+
Description: >-
|
174
|
+
Omit file extensions when using `Sketchup.require` to allow
|
175
|
+
encrypted files to be loaded.
|
96
176
|
Enabled: true
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: rubocop-sketchup
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.5
|
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: 2017-12-
|
11
|
+
date: 2017-12-08 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rubocop
|