inspecstyle 0.1.1 → 0.1.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.gitignore +1 -0
- data/config/default.yml +1 -0
- data/lib/rubocop/cop/inspecstyle/deprecated_attributes.rb +4 -2
- data/lib/rubocop/inspecstyle/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: b906208d63efff19eb182ce0a3b066206556695ca72e229b6b0afa60d74d91e4
|
4
|
+
data.tar.gz: e9a707ede42ac3da35c82019fd24cc8bb3dcf495a4853df54fead8bfa003bb85
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 589110f446bf5b0dc7ebf5538619a3e3d67717f27cebaaa6042730b2e88bef920d2344bbfbcd1631be42476961ddf5bb99533a1ed16ed6f4e3efc1dd0b154617
|
7
|
+
data.tar.gz: f14685e321ef3919d3bcbab64a87a703fbf799e314bd4064851500c1dac4d21d16457a8b7a025a858406be363522f8f6a0cb3f321307543ba6cb03881a95ac17
|
data/.gitignore
CHANGED
data/config/default.yml
CHANGED
@@ -2,6 +2,7 @@ InSpecStyle/DeprecatedAttributes:
|
|
2
2
|
Description: 'Attributes are deprecated in favor of inputs'
|
3
3
|
Enabled: true
|
4
4
|
VersionAdded: '0.82'
|
5
|
+
StyleGuide: 'https://github.com/inspec/inspec/issues/3802'
|
5
6
|
|
6
7
|
InspecStyle/FirstCop:
|
7
8
|
Description: 'This first cop is a sandbox for exploring new InspecStyle cops.'
|
@@ -4,8 +4,9 @@
|
|
4
4
|
module RuboCop
|
5
5
|
module Cop
|
6
6
|
module InSpecStyle
|
7
|
+
# Checks if deprecated method attribute is used.
|
7
8
|
#
|
8
|
-
# @example
|
9
|
+
# @example
|
9
10
|
# # Attributes have been deprecated for inputs
|
10
11
|
# # https://github.com/inspec/inspec/issues/3802
|
11
12
|
#
|
@@ -33,7 +34,8 @@ module RuboCop
|
|
33
34
|
|
34
35
|
def range(node)
|
35
36
|
# Only highlights the method 'attribute'
|
36
|
-
range_between(
|
37
|
+
range_between(
|
38
|
+
node.source_range.begin_pos,
|
37
39
|
node.source_range.begin_pos+9
|
38
40
|
)
|
39
41
|
end
|