rubocop-sketchup 0.19.0 → 1.0.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 0ece47daae3428b0918e22ceb77535ad907220f4ea8d6b8a0df1f1f375fcc389
4
- data.tar.gz: efde5166fd6546561d536e7681869ef40684aed0e2d69104d4fab6372fa2ff01
3
+ metadata.gz: 2f127a24e47b19d2fdfcc67dbd345a4c2a7ad60425ec65b6d966f28244fcb081
4
+ data.tar.gz: cd916a3de6ebb7e3b51d0a57c3176be7898bd2b4cea2cf3cbfecf508fe1d94aa
5
5
  SHA512:
6
- metadata.gz: b7118c5bf98cfdabeae09fce334e2fc92bac56394b8acd09c5398dc9726cc647d5b828a722d4525b0889d35ec7da5536c1bdfc04e75d3da4e33dac876c0cabdd
7
- data.tar.gz: 2dc355ae4f59fa71275a56f5dba47cfce54e736f157fc51ac736c936c74d7bd1a4cf5e1e66f76ac92f6e67cc054d6f7fb407575490738adefec12374e54514a7
6
+ metadata.gz: f805d4810dd4711b760763ed4d83b9185a13b7c8c9e14cf89472fff1acbb9c1246defcdbdfc593350b5b3e4213b4523decc060639b46b12c6a73eee26d4a3d68
7
+ data.tar.gz: e5d41dd9aa462d62be7804076803f9969e7dbc5b100169c339654e88d9b518e4a06d72859450ea645aba2ea8b7b981a9c76a17ee2eb449b220b8e627b1778194
data/Gemfile CHANGED
@@ -8,13 +8,12 @@ group :test do
8
8
  gem 'appveyor-worker', '~> 0.2', require: false
9
9
  gem 'rake', '~> 12.0', require: false
10
10
  gem 'rspec', '~> 3.7', require: false
11
- gem 'rubocop-performance', '~> 1.7.0', require: false
11
+ gem 'rubocop-performance', '~> 1.11.0', require: false
12
12
  gem 'simplecov', '~> 0.10', require: false
13
13
  end
14
14
 
15
15
  group :development do
16
16
  gem 'bump', '~> 0.5', require: false
17
17
  gem 'solargraph', '~> 0.34', require: false
18
- gem 'thor', '~> 0.20', require: false
19
18
  gem 'yard', '~> 0.9', require: false
20
19
  end
data/config/default.yml CHANGED
@@ -35,21 +35,21 @@ SketchupBugs/MaterialName:
35
35
  Description: >-
36
36
  SketchUp 2017 did not protect against the Ruby API creating
37
37
  duplicated material names.
38
- Reference: https://github.com/SketchUp/rubocop-sketchup/tree/master/manual/cops_bugs.md#materialname
38
+ Reference: https://github.com/SketchUp/rubocop-sketchup/tree/main/manual/cops_bugs.md#materialname
39
39
  Enabled: true
40
40
 
41
41
  SketchupBugs/RenderMode:
42
42
  Description: >-
43
43
  Invalid rendering mode will crash SketchUp 2017 and newer
44
44
  versions.
45
- Reference: https://github.com/SketchUp/rubocop-sketchup/tree/master/manual/cops_bugs.md#rendermode
45
+ Reference: https://github.com/SketchUp/rubocop-sketchup/tree/main/manual/cops_bugs.md#rendermode
46
46
  Enabled: true
47
47
 
48
48
  SketchupBugs/UniformScaling:
49
49
  Description: >-
50
50
  `Geom::Transformation.scaling(scale)` might yield unexpected
51
51
  behavior.
52
- Reference: https://github.com/SketchUp/rubocop-sketchup/tree/master/manual/cops_bugs.md#uniformscaling
52
+ Reference: https://github.com/SketchUp/rubocop-sketchup/tree/main/manual/cops_bugs.md#uniformscaling
53
53
  Enabled: true
54
54
 
55
55
 
@@ -58,7 +58,7 @@ SketchupDeprecations/AddSeparatorToMenu:
58
58
  Details: >-
59
59
  Avoid adding separators to top level menus. If you require
60
60
  grouping use a sub-menu instead.
61
- Reference: https://github.com/SketchUp/rubocop-sketchup/tree/master/manual/cops_deprecations.md#addseparatortomenu
61
+ Reference: https://github.com/SketchUp/rubocop-sketchup/tree/main/manual/cops_deprecations.md#addseparatortomenu
62
62
  Enabled: true
63
63
 
64
64
  SketchupDeprecations/OperationNextTransparent:
@@ -66,7 +66,7 @@ SketchupDeprecations/OperationNextTransparent:
66
66
  Details: >-
67
67
  It is not possible to predict what operation will come next. Avoid
68
68
  making the next operation transparent.
69
- Reference: https://github.com/SketchUp/rubocop-sketchup/tree/master/manual/cops_deprecations.md#operationnexttransparent
69
+ Reference: https://github.com/SketchUp/rubocop-sketchup/tree/main/manual/cops_deprecations.md#operationnexttransparent
70
70
  Enabled: true
71
71
 
72
72
  SketchupDeprecations/RequireAll:
@@ -74,7 +74,7 @@ SketchupDeprecations/RequireAll:
74
74
  Details: >-
75
75
  This method adds the path given to `$LOAD_PATH` which can affect
76
76
  other extensions.
77
- Reference: https://github.com/SketchUp/rubocop-sketchup/tree/master/manual/cops_deprecations.md#requireall
77
+ Reference: https://github.com/SketchUp/rubocop-sketchup/tree/main/manual/cops_deprecations.md#requireall
78
78
  Enabled: true
79
79
 
80
80
  SketchupDeprecations/SetTextureProjection:
@@ -82,13 +82,13 @@ SketchupDeprecations/SetTextureProjection:
82
82
  Details: >-
83
83
  This method never worked right. It's not possible to control the
84
84
  position and orientation of the texture.
85
- Reference: https://github.com/SketchUp/rubocop-sketchup/tree/master/manual/cops_deprecations.md#settextureprojection
85
+ Reference: https://github.com/SketchUp/rubocop-sketchup/tree/main/manual/cops_deprecations.md#settextureprojection
86
86
  Enabled: true
87
87
 
88
88
  SketchupDeprecations/ShowRubyPanel:
89
89
  Description: The method `show_ruby_panel` is deprecated.
90
90
  Details: Use `SKETCHUP_CONSOLE.show` instead.
91
- Reference: https://github.com/SketchUp/rubocop-sketchup/tree/master/manual/cops_deprecations.md#showrubypanel
91
+ Reference: https://github.com/SketchUp/rubocop-sketchup/tree/main/manual/cops_deprecations.md#showrubypanel
92
92
  Enabled: true
93
93
 
94
94
  SketchupDeprecations/SketchupSet:
@@ -96,7 +96,7 @@ SketchupDeprecations/SketchupSet:
96
96
  Details: >-
97
97
  It's slow and with limited functionality. Use the `Set` class in
98
98
  the Ruby StdLib instead.
99
- Reference: https://github.com/SketchUp/rubocop-sketchup/tree/master/manual/cops_deprecations.md#sketchupset
99
+ Reference: https://github.com/SketchUp/rubocop-sketchup/tree/main/manual/cops_deprecations.md#sketchupset
100
100
  Enabled: true
101
101
 
102
102
 
@@ -108,29 +108,29 @@ SketchupPerformance/OpenSSL:
108
108
  affects SecureRandom and anything else that depend on OpenSSL.
109
109
  Net::HTTP is affected if connecting via HTTPS. Connecting via
110
110
  plain HTTP is unaffected.
111
- Reference: https://github.com/SketchUp/rubocop-sketchup/tree/master/manual/cops_performance.md#openssl
111
+ Reference: https://github.com/SketchUp/rubocop-sketchup/tree/main/manual/cops_performance.md#openssl
112
112
  Enabled: true
113
113
 
114
114
  SketchupPerformance/OperationDisableUI:
115
115
  Description: Operations should disable the UI for performance gain.
116
- Reference: https://github.com/SketchUp/rubocop-sketchup/tree/master/manual/cops_performance.md#operationdisableui
116
+ Reference: https://github.com/SketchUp/rubocop-sketchup/tree/main/manual/cops_performance.md#operationdisableui
117
117
  Enabled: true
118
118
 
119
119
  SketchupPerformance/SelectionBulkChanges:
120
120
  Description: >-
121
121
  Avoid modifying the selection set within loops. It's much
122
122
  faster to change the selection in bulk.
123
- Reference: https://github.com/SketchUp/rubocop-sketchup/tree/master/manual/cops_performance.md#selectionbulkchanges
123
+ Reference: https://github.com/SketchUp/rubocop-sketchup/tree/main/manual/cops_performance.md#selectionbulkchanges
124
124
  Enabled: true
125
125
 
126
126
  SketchupPerformance/TypeCheck:
127
127
  Description: String comparisons for type checks are very slow.
128
- Reference: https://github.com/SketchUp/rubocop-sketchup/tree/master/manual/cops_performance.md#typecheck
128
+ Reference: https://github.com/SketchUp/rubocop-sketchup/tree/main/manual/cops_performance.md#typecheck
129
129
  Enabled: true
130
130
 
131
131
  SketchupPerformance/Typename:
132
132
  Description: Using `.typename` is very slow, prefer `.is_a?` instead.
133
- Reference: https://github.com/SketchUp/rubocop-sketchup/tree/master/manual/cops_performance.md#typename
133
+ Reference: https://github.com/SketchUp/rubocop-sketchup/tree/main/manual/cops_performance.md#typename
134
134
  Enabled: true
135
135
 
136
136
 
@@ -139,7 +139,7 @@ SketchupRequirements/ApiNamespace:
139
139
  Details: >-
140
140
  Modifying the API namespace could affect other extensions - making
141
141
  it hard for other developers to determine what is going on.
142
- Reference: https://github.com/SketchUp/rubocop-sketchup/tree/master/manual/cops_requirements.md#apinamespace
142
+ Reference: https://github.com/SketchUp/rubocop-sketchup/tree/main/manual/cops_requirements.md#apinamespace
143
143
  Enabled: true
144
144
 
145
145
  SketchupRequirements/Exit:
@@ -149,7 +149,7 @@ SketchupRequirements/Exit:
149
149
  console. But `exit!` is not trapped and with terminate SketchUp
150
150
  without shutting down cleanly. Use `return`, `next` or `break`
151
151
  instead.
152
- Reference: https://github.com/SketchUp/rubocop-sketchup/tree/master/manual/cops_requirements.md#exit
152
+ Reference: https://github.com/SketchUp/rubocop-sketchup/tree/main/manual/cops_requirements.md#exit
153
153
  Enabled: true
154
154
 
155
155
  SketchupRequirements/ExtensionNamespace:
@@ -157,7 +157,7 @@ SketchupRequirements/ExtensionNamespace:
157
157
  Details: >-
158
158
  To avoid clashing with other extensions a single root namespace
159
159
  should contain all the extension's code.
160
- Reference: https://github.com/SketchUp/rubocop-sketchup/tree/master/manual/cops_requirements.md#extensionnamespace
160
+ Reference: https://github.com/SketchUp/rubocop-sketchup/tree/main/manual/cops_requirements.md#extensionnamespace
161
161
  Exceptions: []
162
162
  Enabled: true
163
163
 
@@ -166,39 +166,39 @@ SketchupRequirements/FileStructure:
166
166
  Details: >-
167
167
  Check that the extension conform to expected file structure with a
168
168
  single root .rb file and a support folder with matching name.
169
- Reference: https://github.com/SketchUp/rubocop-sketchup/tree/master/manual/cops_requirements.md#filestructure
169
+ Reference: https://github.com/SketchUp/rubocop-sketchup/tree/main/manual/cops_requirements.md#filestructure
170
170
  Enabled: true
171
171
 
172
172
  SketchupRequirements/GemInstall:
173
173
  Description: >-
174
174
  Gem.install is unreliable in SketchUp, and can cause
175
175
  extensions to clash.
176
- Reference: https://github.com/SketchUp/rubocop-sketchup/tree/master/manual/cops_requirements.md#geminstall
176
+ Reference: https://github.com/SketchUp/rubocop-sketchup/tree/main/manual/cops_requirements.md#geminstall
177
177
  Enabled: true
178
178
 
179
179
  SketchupRequirements/GetExtensionLicense:
180
180
  Description: Pass in valid extension ID from local string literals.
181
- Reference: https://github.com/SketchUp/rubocop-sketchup/tree/master/manual/cops_requirements.md#getextensionlicense
181
+ Reference: https://github.com/SketchUp/rubocop-sketchup/tree/main/manual/cops_requirements.md#getextensionlicense
182
182
  Enabled: true
183
183
 
184
184
  SketchupRequirements/GlobalConstants:
185
185
  Description: Do not introduce global constants.
186
- Reference: https://github.com/SketchUp/rubocop-sketchup/tree/master/manual/cops_requirements.md#globalconstants
186
+ Reference: https://github.com/SketchUp/rubocop-sketchup/tree/main/manual/cops_requirements.md#globalconstants
187
187
  Enabled: true
188
188
 
189
189
  SketchupRequirements/GlobalInclude:
190
190
  Description: Do not include modules into global namespace.
191
- Reference: https://github.com/SketchUp/rubocop-sketchup/tree/master/manual/cops_requirements.md#globalinclude
191
+ Reference: https://github.com/SketchUp/rubocop-sketchup/tree/main/manual/cops_requirements.md#globalinclude
192
192
  Enabled: true
193
193
 
194
194
  SketchupRequirements/GlobalMethods:
195
195
  Description: Extensions should not define global methods.
196
- Reference: https://github.com/SketchUp/rubocop-sketchup/tree/master/manual/cops_requirements.md#globalmethods
196
+ Reference: https://github.com/SketchUp/rubocop-sketchup/tree/main/manual/cops_requirements.md#globalmethods
197
197
  Enabled: true
198
198
 
199
199
  SketchupRequirements/GlobalVariables:
200
200
  Description: Do not introduce global variables.
201
- Reference: https://github.com/SketchUp/rubocop-sketchup/tree/master/manual/cops_requirements.md#globalvariables
201
+ Reference: https://github.com/SketchUp/rubocop-sketchup/tree/main/manual/cops_requirements.md#globalvariables
202
202
  Enabled: true
203
203
 
204
204
  SketchupRequirements/LanguageHandlerGlobals:
@@ -207,7 +207,7 @@ SketchupRequirements/LanguageHandlerGlobals:
207
207
  Avoid using globals in general, but especially these which are
208
208
  known to be in use by other extensions made by SketchUp. They are
209
209
  still in use due to compatibility reasons.
210
- Reference: https://github.com/SketchUp/rubocop-sketchup/tree/master/manual/cops_requirements.md#languagehandlerglobals
210
+ Reference: https://github.com/SketchUp/rubocop-sketchup/tree/main/manual/cops_requirements.md#languagehandlerglobals
211
211
  Enabled: true
212
212
 
213
213
  SketchupRequirements/LoadPath:
@@ -215,7 +215,7 @@ SketchupRequirements/LoadPath:
215
215
  Details: >-
216
216
  This can cause other extensions from not loading correctly. Always
217
217
  load files relative to the installation path for the extension.
218
- Reference: https://github.com/SketchUp/rubocop-sketchup/tree/master/manual/cops_requirements.md#loadpath
218
+ Reference: https://github.com/SketchUp/rubocop-sketchup/tree/main/manual/cops_requirements.md#loadpath
219
219
  Enabled: true
220
220
 
221
221
  SketchupRequirements/MinimalRegistration:
@@ -223,7 +223,7 @@ SketchupRequirements/MinimalRegistration:
223
223
  Don't load extension files in the root file registering the
224
224
  extension. Extensions should not load additional files when
225
225
  it's disabled.
226
- Reference: https://github.com/SketchUp/rubocop-sketchup/tree/master/manual/cops_requirements.md#minimalregistration
226
+ Reference: https://github.com/SketchUp/rubocop-sketchup/tree/main/manual/cops_requirements.md#minimalregistration
227
227
  Enabled: true
228
228
 
229
229
  SketchupRequirements/ObserversStartOperation:
@@ -231,14 +231,14 @@ SketchupRequirements/ObserversStartOperation:
231
231
  Details: >-
232
232
  When making model changes within an observer event, start a
233
233
  transparent operation to ensure a clean undo-stack.
234
- Reference: https://github.com/SketchUp/rubocop-sketchup/tree/master/manual/cops_requirements.md#observersstartoperation
234
+ Reference: https://github.com/SketchUp/rubocop-sketchup/tree/main/manual/cops_requirements.md#observersstartoperation
235
235
  Enabled: true
236
236
 
237
237
  SketchupRequirements/RegisterExtension:
238
238
  Description: >-
239
239
  Always register extensions to load by default. Otherwise it
240
240
  might confuse users to think the extension isn't working.
241
- Reference: https://github.com/SketchUp/rubocop-sketchup/tree/master/manual/cops_requirements.md#registerextension
241
+ Reference: https://github.com/SketchUp/rubocop-sketchup/tree/main/manual/cops_requirements.md#registerextension
242
242
  Enabled: true
243
243
 
244
244
  SketchupRequirements/RequireToolsRubyFiles:
@@ -247,29 +247,29 @@ SketchupRequirements/RequireToolsRubyFiles:
247
247
  has been loaded, files from SketchUp's Tools folder should be
248
248
  required in using `require` and with their file extension to
249
249
  avoid duplicate loading.
250
- Reference: https://github.com/SketchUp/rubocop-sketchup/tree/master/manual/cops_requirements.md#requiretoolsrubyfiles
250
+ Reference: https://github.com/SketchUp/rubocop-sketchup/tree/main/manual/cops_requirements.md#requiretoolsrubyfiles
251
251
  Enabled: true
252
252
 
253
253
  SketchupRequirements/RubyCoreNamespace:
254
254
  Description: Do not modify Ruby core functionality.
255
- Reference: https://github.com/SketchUp/rubocop-sketchup/tree/master/manual/cops_requirements.md#rubycorenamespace
255
+ Reference: https://github.com/SketchUp/rubocop-sketchup/tree/main/manual/cops_requirements.md#rubycorenamespace
256
256
  Enabled: true
257
257
 
258
258
  SketchupRequirements/RubyStdLibNamespace:
259
259
  Description: Do not modify Ruby stdlib functionality.
260
- Reference: https://github.com/SketchUp/rubocop-sketchup/tree/master/manual/cops_requirements.md#rubystdlibnamespace
260
+ Reference: https://github.com/SketchUp/rubocop-sketchup/tree/main/manual/cops_requirements.md#rubystdlibnamespace
261
261
  Enabled: true
262
262
 
263
263
  SketchupRequirements/SketchupRequire:
264
264
  Description: >-
265
265
  Omit file extensions when using `Sketchup.require` to allow
266
266
  encrypted files to be loaded.
267
- Reference: https://github.com/SketchUp/rubocop-sketchup/tree/master/manual/cops_requirements.md#sketchuprequire
267
+ Reference: https://github.com/SketchUp/rubocop-sketchup/tree/main/manual/cops_requirements.md#sketchuprequire
268
268
  Enabled: true
269
269
 
270
270
  SketchupRequirements/ShippedExtensionsNamespace:
271
271
  Description: Don't use the namespace of SketchUp's shipped extensions.
272
- Reference: https://github.com/SketchUp/rubocop-sketchup/tree/master/manual/cops_requirements.md#shippedextensionsnamespace
272
+ Reference: https://github.com/SketchUp/rubocop-sketchup/tree/main/manual/cops_requirements.md#shippedextensionsnamespace
273
273
  Enabled: true
274
274
 
275
275
  SketchupRequirements/SketchupExtension:
@@ -277,25 +277,25 @@ SketchupRequirements/SketchupExtension:
277
277
  Register a single instance of SketchupExtension per extension.
278
278
  This should be done by the root .rb file in the extension
279
279
  package.
280
- Reference: https://github.com/SketchUp/rubocop-sketchup/tree/master/manual/cops_requirements.md#sketchupextension
280
+ Reference: https://github.com/SketchUp/rubocop-sketchup/tree/main/manual/cops_requirements.md#sketchupextension
281
281
  Enabled: true
282
282
 
283
283
 
284
284
  SketchupSuggestions/AddGroup:
285
285
  Description: Avoid creating groups out of existing entities.
286
- Reference: https://github.com/SketchUp/rubocop-sketchup/tree/master/manual/cops_suggestions.md#addgroup
286
+ Reference: https://github.com/SketchUp/rubocop-sketchup/tree/main/manual/cops_suggestions.md#addgroup
287
287
  Enabled: true
288
288
 
289
289
  SketchupSuggestions/Compatibility:
290
290
  Description: Incompatible feature with target SketchUp version.
291
- Reference: https://github.com/SketchUp/rubocop-sketchup/tree/master/manual/cops_suggestions.md#compatibility
291
+ Reference: https://github.com/SketchUp/rubocop-sketchup/tree/main/manual/cops_suggestions.md#compatibility
292
292
  Enabled: true
293
293
 
294
294
  SketchupSuggestions/DynamicComponentInternals:
295
295
  Description: >-
296
296
  Avoid relying on internal logic of Dynamic Components. It's
297
297
  behavior might change between versions.
298
- Reference: https://github.com/SketchUp/rubocop-sketchup/tree/master/manual/cops_suggestions.md#dynamiccomponentinternals
298
+ Reference: https://github.com/SketchUp/rubocop-sketchup/tree/main/manual/cops_suggestions.md#dynamiccomponentinternals
299
299
  Enabled: true
300
300
 
301
301
  SketchupSuggestions/FileEncoding:
@@ -306,7 +306,7 @@ SketchupSuggestions/FileEncoding:
306
306
  contain non-english characters it will lead to exceptions being
307
307
  raised when the strings are used. Force encoding to work around
308
308
  this.
309
- Reference: https://github.com/SketchUp/rubocop-sketchup/tree/master/manual/cops_suggestions.md#fileencoding
309
+ Reference: https://github.com/SketchUp/rubocop-sketchup/tree/main/manual/cops_suggestions.md#fileencoding
310
310
  Enabled: true
311
311
 
312
312
  SketchupSuggestions/ModelEntities:
@@ -317,7 +317,7 @@ SketchupSuggestions/ModelEntities:
317
317
  In SketchUp the norm is that editing is performed in the opened
318
318
  instance (`model.active_entities`). `model.entities` refer to the
319
319
  model root.
320
- Reference: https://github.com/SketchUp/rubocop-sketchup/tree/master/manual/cops_suggestions.md#modelentities
320
+ Reference: https://github.com/SketchUp/rubocop-sketchup/tree/main/manual/cops_suggestions.md#modelentities
321
321
  Enabled: true
322
322
 
323
323
  SketchupSuggestions/MonkeyPatchedApi:
@@ -327,7 +327,7 @@ SketchupSuggestions/MonkeyPatchedApi:
327
327
  Details: >-
328
328
  These methods stops working when the extensions are disabled and
329
329
  may change or be removed.
330
- Reference: https://github.com/SketchUp/rubocop-sketchup/tree/master/manual/cops_suggestions.md#monkeypatchedapi
330
+ Reference: https://github.com/SketchUp/rubocop-sketchup/tree/main/manual/cops_suggestions.md#monkeypatchedapi
331
331
  Enabled: true
332
332
 
333
333
  SketchupSuggestions/OperationName:
@@ -337,7 +337,7 @@ SketchupSuggestions/OperationName:
337
337
  Details: >-
338
338
  This check is very naive and might produce false positives. Use as
339
339
  guidance only.
340
- Reference: https://github.com/SketchUp/rubocop-sketchup/tree/master/manual/cops_suggestions.md#operationname
340
+ Reference: https://github.com/SketchUp/rubocop-sketchup/tree/main/manual/cops_suggestions.md#operationname
341
341
  Max: 25
342
342
  Enabled: true
343
343
 
@@ -349,31 +349,31 @@ SketchupSuggestions/SketchupFindSupportFile:
349
349
  Extensions might be installed outside the SketchUp Plugins folder.
350
350
  Use `__FILE__` and `__dir__` to locate your files relative to the
351
351
  executing file.
352
- Reference: https://github.com/SketchUp/rubocop-sketchup/tree/master/manual/cops_suggestions.md#sketchupfindsupportfile
352
+ Reference: https://github.com/SketchUp/rubocop-sketchup/tree/main/manual/cops_suggestions.md#sketchupfindsupportfile
353
353
  Enabled: true
354
354
 
355
355
  SketchupSuggestions/ToolDrawingBounds:
356
356
  Description: >-
357
357
  When drawing to the viewport implement `getExtents` so drawn
358
358
  geometry is not clipped.
359
- Reference: https://github.com/SketchUp/rubocop-sketchup/tree/master/manual/cops_suggestions.md#tooldrawingbounds
359
+ Reference: https://github.com/SketchUp/rubocop-sketchup/tree/main/manual/cops_suggestions.md#tooldrawingbounds
360
360
  Enabled: true
361
361
 
362
362
  SketchupSuggestions/ToolInvalidate:
363
363
  Description: >-
364
364
  When drawing to the viewport, make sure tools invalidate when
365
365
  tool becomes inactive.
366
- Reference: https://github.com/SketchUp/rubocop-sketchup/tree/master/manual/cops_suggestions.md#toolinvalidate
366
+ Reference: https://github.com/SketchUp/rubocop-sketchup/tree/main/manual/cops_suggestions.md#toolinvalidate
367
367
  Enabled: true
368
368
 
369
369
  SketchupSuggestions/ToolUserInput:
370
370
  Description: >-
371
371
  When a tool is accepting user input, make sure to define
372
372
  enableVCB?.
373
- Reference: https://github.com/SketchUp/rubocop-sketchup/tree/master/manual/cops_suggestions.md#tooluserinput
373
+ Reference: https://github.com/SketchUp/rubocop-sketchup/tree/main/manual/cops_suggestions.md#tooluserinput
374
374
  Enabled: true
375
375
 
376
376
  SketchupSuggestions/ToolbarTimer:
377
377
  Description: Wrapping `toolbar.restore` in `UI.start_timer` is redundant.
378
- Reference: https://github.com/SketchUp/rubocop-sketchup/tree/master/manual/cops_suggestions.md#toolbartimer
378
+ Reference: https://github.com/SketchUp/rubocop-sketchup/tree/main/manual/cops_suggestions.md#toolbartimer
379
379
  Enabled: true
@@ -79,7 +79,7 @@ module RuboCop
79
79
  PATTERN
80
80
 
81
81
  MSG_SET_NAME = '`material.name=` might add duplicate materials in '\
82
- 'SU2017 and older versions.'
82
+ 'SU2017 and older versions.'
83
83
 
84
84
  def on_send(node)
85
85
  return unless valid_for_target_sketchup_version?
@@ -43,10 +43,10 @@ module RuboCop
43
43
  PATTERN
44
44
 
45
45
  MSG_OBSOLETE = 'Obsolete render mode will crash in SU2017 and '\
46
- 'newer versions.'
46
+ 'newer versions.'
47
47
 
48
48
  MSG_INVALID = 'Invalid render mode will crash in SU2017 and '\
49
- 'newer versions.'
49
+ 'newer versions.'
50
50
 
51
51
  def on_send(node)
52
52
  return unless valid_for_target_sketchup_version?
@@ -21,7 +21,7 @@ module RuboCop
21
21
  PATTERN
22
22
 
23
23
  MSG = 'Resulting transformation matrix might yield unexpected '\
24
- 'results.'
24
+ 'results.'
25
25
 
26
26
  def on_send(node)
27
27
  return unless valid_for_target_sketchup_version?
@@ -7,7 +7,7 @@ module RuboCop
7
7
  class ShowRubyPanel < SketchUp::Cop
8
8
 
9
9
  MSG = 'Method is deprecated. Use `SKETCHUP_CONSOLE.show` '\
10
- 'instead.'
10
+ 'instead.'
11
11
 
12
12
  def_node_matcher :show_ruby_panel?, <<-PATTERN
13
13
  (send nil? :show_ruby_panel)
@@ -30,7 +30,7 @@ module RuboCop
30
30
  'with `Sketchup.require`.'
31
31
 
32
32
  MSG_EXTENSION_NEW_EXT_NAME = 'Do not hard code file extensions '\
33
- 'with `SketchupExtension.new`.'
33
+ 'with `SketchupExtension.new`.'
34
34
 
35
35
  MSG_REQUIRE_FOR_BINARY = 'Use `require` instead of `Sketchup.require` '\
36
36
  'to load binary Ruby libraries.'
@@ -94,14 +94,14 @@ module RuboCop
94
94
  end
95
95
 
96
96
  def find_node_location(node)
97
- # Highlight the most pertinent piece of the expression.
97
+ # Highlight the most pertinent piece of the expression.
98
98
  if node.const_type?
99
99
  :expression
100
100
  elsif node.send_type?
101
101
  :selector
102
102
  elsif node.def_type?
103
103
  :name
104
- else
104
+ else # rubocop:disable Lint/DuplicateBranch
105
105
  :expression
106
106
  end
107
107
  end
@@ -29,7 +29,8 @@ module RuboCop
29
29
  include SketchUp::ToolChecker
30
30
 
31
31
  MSG_MISSING_GET_EXTENTS = 'When drawing to the viewport implement '\
32
- '`getExtents` so drawn geometry is not clipped.'
32
+ '`getExtents` so drawn geometry is not '\
33
+ 'clipped.'
33
34
 
34
35
  def on_tool_class(class_node, body_methods)
35
36
  return unless find_method(body_methods, :draw)
@@ -31,10 +31,12 @@ module RuboCop
31
31
  include SketchUp::ToolChecker
32
32
 
33
33
  MSG_MISSING_INVALIDATE_METHOD = 'When drawing to the viewport, make '\
34
- 'sure to `suspend` and `deactivate` calls `view.invalidate`.'
34
+ 'sure to `suspend` and `deactivate` '\
35
+ 'calls `view.invalidate`.'
35
36
 
36
37
  MSG_MISSING_INVALIDATE = 'When drawing to the viewport, make sure to '\
37
- 'call `view.invalidate` when the tool becomes inactive.'
38
+ 'call `view.invalidate` when the tool '\
39
+ 'becomes inactive.'
38
40
 
39
41
  def_node_search :view_invalidate?, <<-PATTERN
40
42
  (send (lvar :view) :invalidate ...)
@@ -24,7 +24,7 @@ module RuboCop
24
24
  include SketchUp::ToolChecker
25
25
 
26
26
  MSG_MISSING_ENABLE_VCB = 'When accepting user input, make sure to '\
27
- 'define `enableVCB?`.'
27
+ 'define `enableVCB?`.'
28
28
 
29
29
  def on_tool_class(class_node, body_methods)
30
30
  return unless find_method(body_methods, :onUserText)
@@ -2,6 +2,6 @@
2
2
 
3
3
  module RuboCop
4
4
  module SketchUp
5
- VERSION = '0.19.0'
5
+ VERSION = '1.0.0'
6
6
  end
7
7
  end
@@ -13,7 +13,7 @@ Gem::Specification.new do |spec|
13
13
 
14
14
  spec.version = RuboCop::SketchUp::VERSION
15
15
  spec.platform = Gem::Platform::RUBY
16
- spec.required_ruby_version = '>= 2.4.0'
16
+ spec.required_ruby_version = '>= 2.5.0'
17
17
 
18
18
  spec.require_paths = ['lib']
19
19
  spec.files = Dir[
@@ -24,6 +24,6 @@ Gem::Specification.new do |spec|
24
24
  'Gemfile'
25
25
  ]
26
26
 
27
- spec.add_dependency 'rubocop', '>= 0.82', '<= 0.93'
27
+ spec.add_dependency 'rubocop', '>= 0.82', '< 2.0'
28
28
  spec.add_development_dependency 'bundler', '>= 1.13', '< 3.0'
29
29
  end
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.19.0
4
+ version: 1.0.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: 2021-06-10 00:00:00.000000000 Z
11
+ date: 2021-09-28 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rubocop
@@ -17,9 +17,9 @@ dependencies:
17
17
  - - ">="
18
18
  - !ruby/object:Gem::Version
19
19
  version: '0.82'
20
- - - "<="
20
+ - - "<"
21
21
  - !ruby/object:Gem::Version
22
- version: '0.93'
22
+ version: '2.0'
23
23
  type: :runtime
24
24
  prerelease: false
25
25
  version_requirements: !ruby/object:Gem::Requirement
@@ -27,9 +27,9 @@ dependencies:
27
27
  - - ">="
28
28
  - !ruby/object:Gem::Version
29
29
  version: '0.82'
30
- - - "<="
30
+ - - "<"
31
31
  - !ruby/object:Gem::Version
32
- version: '0.93'
32
+ version: '2.0'
33
33
  - !ruby/object:Gem::Dependency
34
34
  name: bundler
35
35
  requirement: !ruby/object:Gem::Requirement
@@ -137,14 +137,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
137
137
  requirements:
138
138
  - - ">="
139
139
  - !ruby/object:Gem::Version
140
- version: 2.4.0
140
+ version: 2.5.0
141
141
  required_rubygems_version: !ruby/object:Gem::Requirement
142
142
  requirements:
143
143
  - - ">="
144
144
  - !ruby/object:Gem::Version
145
145
  version: '0'
146
146
  requirements: []
147
- rubygems_version: 3.2.15
147
+ rubygems_version: 3.0.3
148
148
  signing_key:
149
149
  specification_version: 4
150
150
  summary: RuboCop rules for SketchUp extensions.