rubocop-sketchup 0.1.3 → 0.1.4
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/requirements/exit.rb +6 -2
- data/lib/rubocop/sketchup/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: c09ed3075037d8889fc6b7d95d6ecfcd7875c515
|
4
|
+
data.tar.gz: 84d80e94029644080c343153d6f4f02b0543bf6e
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: e782b7b399274d823d23ea3c8e3830eb5fc2c5452b91b2f5a1bd6a08aba38afde38374d781a6b57a8d7ad0206318b2bc0ed7a472cb4d62e1f201ea5390c8db34
|
7
|
+
data.tar.gz: 4a8acc757c7a38faf5b2d2e35a8c3afdb9df83d53ad2280e8efe8815ccbc4959e25642f4d94a89f73a4bd91e254c677c267cd415cdb0eba0fb0548409b8e60c6
|
@@ -3,12 +3,16 @@
|
|
3
3
|
module RuboCop
|
4
4
|
module Cop
|
5
5
|
module SketchupRequirements
|
6
|
-
# Don't attempt to kill the Ruby interpreter by calling exit or exit
|
6
|
+
# Don't attempt to kill the Ruby interpreter by calling `exit` or `exit!`.
|
7
|
+
# SketchUp will trap `exit` and prevent that, with a message in the
|
8
|
+
# console. But `exit!` is not trapped and with terminate SketchUp without
|
9
|
+
# shutting down cleanly.
|
10
|
+
# Use `return`, `next` or `break` instead.
|
7
11
|
class Exit < Cop
|
8
12
|
|
9
13
|
include NoCommentDisable
|
10
14
|
|
11
|
-
MSG = 'Exit attempts to kill the Ruby interpreter.'.freeze
|
15
|
+
MSG = 'Exit attempts to kill the Ruby interpreter. Use return, next or break instead.'.freeze
|
12
16
|
|
13
17
|
# Reference: http://rubocop.readthedocs.io/en/latest/development/
|
14
18
|
def_node_matcher :exit?, <<-PATTERN
|