puppet-lint-class_alignment-check 0.3.1 → 0.3.2
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
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: d8c9035498fac5688a9587ff1b5eaaf15027974e85ac46c9745419b3cd309319
|
|
4
|
+
data.tar.gz: c0d6f86ab41d272eb2f2e1883ebd2f9502888a1ba21d592523c8038d1f0dc5a4
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: b1bd3766aa9650219858800d4374434fba8fca275fe905d1734917ddcfb17fe1ff64efb33ffdeaa98ca48ff85feff8242fe45127c2460f6cd752e854d5c18952
|
|
7
|
+
data.tar.gz: 9d1e88aa315c31b44660589c183f6beca1399a84219a6f6f57ad741fb1eae633d4bd7c92e537c3b6b2c73767cbb0a3f70084040540cbb0681030272bdca5bee6
|
|
@@ -10,6 +10,7 @@ PuppetLint.new_check(:class_params_newline) do
|
|
|
10
10
|
def check
|
|
11
11
|
(class_indexes + defined_type_indexes).each do |item|
|
|
12
12
|
tokens = item[:param_tokens]
|
|
13
|
+
next if tokens.nil?
|
|
13
14
|
|
|
14
15
|
first_param = tokens.index { |token| a_param?(token) }
|
|
15
16
|
last_param = tokens.rindex { |token| a_param?(token) }
|
|
@@ -103,6 +103,8 @@ describe 'class_params_newline' do
|
|
|
103
103
|
class bbb ( $foo = 1, $bar = $a, ) {}
|
|
104
104
|
|
|
105
105
|
class ccc ($foo = 1) {}
|
|
106
|
+
|
|
107
|
+
class ddd {}
|
|
106
108
|
END
|
|
107
109
|
end
|
|
108
110
|
|
|
@@ -129,6 +131,8 @@ describe 'class_params_newline' do
|
|
|
129
131
|
) {}
|
|
130
132
|
|
|
131
133
|
class ccc ($foo = 1) {}
|
|
134
|
+
|
|
135
|
+
class ddd {}
|
|
132
136
|
END
|
|
133
137
|
end
|
|
134
138
|
|