puppet-lint-appends-check 1.0.0 → 2.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:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: ab3e65beafd5bcfc694834485017bd3de56fe2c200bd68cdebcbe09baf02be1e
|
4
|
+
data.tar.gz: b7a6a13d0fea22170bc93f19b46108f284ea1bbffccb145fe9971c9ab9670757
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 4fb109206d0dfe091fea1696e71ef5851289f362d91a441c2e9e69bcb622b0123d43a92a2964e3bc75bf696c16e0c0bbb5ae35b877ce8d1efdee9b9e61c882d2
|
7
|
+
data.tar.gz: a5cd26e63f172046311ede0672b61eaa69fd616cad219f0431463638427221049643f429e3a9254091000d407e162eab35acfa4eba0f889323c2c9d7d16d71f6
|
@@ -1,14 +1,14 @@
|
|
1
1
|
PuppetLint.new_check(:appends) do
|
2
2
|
def check
|
3
|
-
tokens.each_with_index do |token,
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
3
|
+
tokens.each_with_index do |token, _token_idx|
|
4
|
+
next unless token.type == :APPENDS
|
5
|
+
|
6
|
+
notify :warning, {
|
7
|
+
message: 'The appends (+=) operator was used.',
|
8
|
+
line: token.line,
|
9
|
+
column: token.column,
|
10
|
+
token: token,
|
11
|
+
}
|
12
12
|
end
|
13
13
|
end
|
14
14
|
end
|
@@ -16,7 +16,7 @@ describe 'appends' do
|
|
16
16
|
EOS
|
17
17
|
end
|
18
18
|
|
19
|
-
it '
|
19
|
+
it 'does not detect any problems' do
|
20
20
|
expect(problems).to have(0).problems
|
21
21
|
end
|
22
22
|
end
|
@@ -33,11 +33,11 @@ describe 'appends' do
|
|
33
33
|
EOS
|
34
34
|
end
|
35
35
|
|
36
|
-
it '
|
36
|
+
it 'detects 3 problems' do
|
37
37
|
expect(problems).to have(3).problems
|
38
38
|
end
|
39
39
|
|
40
|
-
it '
|
40
|
+
it 'creates warnings' do
|
41
41
|
expect(problems).to contain_warning(msg).on_line(1).in_column(17)
|
42
42
|
expect(problems).to contain_warning(msg).on_line(2).in_column(17)
|
43
43
|
expect(problems).to contain_warning(msg).on_line(3).in_column(17)
|
@@ -66,11 +66,11 @@ describe 'appends' do
|
|
66
66
|
EOS
|
67
67
|
end
|
68
68
|
|
69
|
-
it '
|
69
|
+
it 'does not detect any problems' do
|
70
70
|
expect(problems).to have(0).problems
|
71
71
|
end
|
72
72
|
|
73
|
-
it '
|
73
|
+
it 'does not modify the manifest' do
|
74
74
|
expect(manifest).to eq(code)
|
75
75
|
end
|
76
76
|
end
|
@@ -87,17 +87,17 @@ describe 'appends' do
|
|
87
87
|
EOS
|
88
88
|
end
|
89
89
|
|
90
|
-
it '
|
90
|
+
it 'detects 3 problems' do
|
91
91
|
expect(problems).to have(3).problems
|
92
92
|
end
|
93
93
|
|
94
|
-
it '
|
94
|
+
it 'creates warnings' do
|
95
95
|
expect(problems).to contain_warning(msg).on_line(1).in_column(17)
|
96
96
|
expect(problems).to contain_warning(msg).on_line(2).in_column(17)
|
97
97
|
expect(problems).to contain_warning(msg).on_line(3).in_column(17)
|
98
98
|
end
|
99
99
|
|
100
|
-
it '
|
100
|
+
it 'does not fix the ensure parameter because that is not implemented' do
|
101
101
|
expect(manifest).to eq(code)
|
102
102
|
end
|
103
103
|
end
|
data/spec/spec_helper.rb
CHANGED
@@ -1,3 +1,29 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
begin
|
4
|
+
require 'simplecov'
|
5
|
+
require 'simplecov-console'
|
6
|
+
require 'codecov'
|
7
|
+
rescue LoadError
|
8
|
+
else
|
9
|
+
SimpleCov.start do
|
10
|
+
track_files 'lib/**/*.rb'
|
11
|
+
|
12
|
+
add_filter '/spec'
|
13
|
+
|
14
|
+
enable_coverage :branch
|
15
|
+
|
16
|
+
# do not track vendored files
|
17
|
+
add_filter '/vendor'
|
18
|
+
add_filter '/.vendor'
|
19
|
+
end
|
20
|
+
|
21
|
+
SimpleCov.formatters = [
|
22
|
+
SimpleCov::Formatter::Console,
|
23
|
+
SimpleCov::Formatter::Codecov,
|
24
|
+
]
|
25
|
+
end
|
26
|
+
|
1
27
|
require 'puppet-lint'
|
2
28
|
|
3
29
|
PuppetLint::Plugins.load_spec_helper
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: puppet-lint-appends-check
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version:
|
4
|
+
version: 2.0.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Vox Pupuli
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2023-04-21 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: puppet-lint
|
@@ -16,104 +16,40 @@ dependencies:
|
|
16
16
|
requirements:
|
17
17
|
- - ">="
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version: '
|
19
|
+
version: '3'
|
20
20
|
- - "<"
|
21
21
|
- !ruby/object:Gem::Version
|
22
|
-
version: '
|
22
|
+
version: '5'
|
23
23
|
type: :runtime
|
24
24
|
prerelease: false
|
25
25
|
version_requirements: !ruby/object:Gem::Requirement
|
26
26
|
requirements:
|
27
27
|
- - ">="
|
28
28
|
- !ruby/object:Gem::Version
|
29
|
-
version: '
|
29
|
+
version: '3'
|
30
30
|
- - "<"
|
31
31
|
- !ruby/object:Gem::Version
|
32
|
-
version: '
|
33
|
-
- !ruby/object:Gem::Dependency
|
34
|
-
name: rspec
|
35
|
-
requirement: !ruby/object:Gem::Requirement
|
36
|
-
requirements:
|
37
|
-
- - "~>"
|
38
|
-
- !ruby/object:Gem::Version
|
39
|
-
version: '3.0'
|
40
|
-
type: :development
|
41
|
-
prerelease: false
|
42
|
-
version_requirements: !ruby/object:Gem::Requirement
|
43
|
-
requirements:
|
44
|
-
- - "~>"
|
45
|
-
- !ruby/object:Gem::Version
|
46
|
-
version: '3.0'
|
47
|
-
- !ruby/object:Gem::Dependency
|
48
|
-
name: rspec-its
|
49
|
-
requirement: !ruby/object:Gem::Requirement
|
50
|
-
requirements:
|
51
|
-
- - "~>"
|
52
|
-
- !ruby/object:Gem::Version
|
53
|
-
version: '1.0'
|
54
|
-
type: :development
|
55
|
-
prerelease: false
|
56
|
-
version_requirements: !ruby/object:Gem::Requirement
|
57
|
-
requirements:
|
58
|
-
- - "~>"
|
59
|
-
- !ruby/object:Gem::Version
|
60
|
-
version: '1.0'
|
61
|
-
- !ruby/object:Gem::Dependency
|
62
|
-
name: rspec-collection_matchers
|
63
|
-
requirement: !ruby/object:Gem::Requirement
|
64
|
-
requirements:
|
65
|
-
- - "~>"
|
66
|
-
- !ruby/object:Gem::Version
|
67
|
-
version: '1.0'
|
68
|
-
type: :development
|
69
|
-
prerelease: false
|
70
|
-
version_requirements: !ruby/object:Gem::Requirement
|
71
|
-
requirements:
|
72
|
-
- - "~>"
|
73
|
-
- !ruby/object:Gem::Version
|
74
|
-
version: '1.0'
|
32
|
+
version: '5'
|
75
33
|
- !ruby/object:Gem::Dependency
|
76
34
|
name: mime-types
|
77
35
|
requirement: !ruby/object:Gem::Requirement
|
78
36
|
requirements:
|
79
|
-
- - "
|
80
|
-
- !ruby/object:Gem::Version
|
81
|
-
version: '0'
|
82
|
-
type: :development
|
83
|
-
prerelease: false
|
84
|
-
version_requirements: !ruby/object:Gem::Requirement
|
85
|
-
requirements:
|
86
|
-
- - ">="
|
37
|
+
- - "~>"
|
87
38
|
- !ruby/object:Gem::Version
|
88
|
-
version: '
|
89
|
-
- !ruby/object:Gem::Dependency
|
90
|
-
name: rake
|
91
|
-
requirement: !ruby/object:Gem::Requirement
|
92
|
-
requirements:
|
39
|
+
version: '3.4'
|
93
40
|
- - ">="
|
94
41
|
- !ruby/object:Gem::Version
|
95
|
-
version:
|
42
|
+
version: 3.4.1
|
96
43
|
type: :development
|
97
44
|
prerelease: false
|
98
45
|
version_requirements: !ruby/object:Gem::Requirement
|
99
46
|
requirements:
|
100
|
-
- - "
|
101
|
-
- !ruby/object:Gem::Version
|
102
|
-
version: '0'
|
103
|
-
- !ruby/object:Gem::Dependency
|
104
|
-
name: simplecov
|
105
|
-
requirement: !ruby/object:Gem::Requirement
|
106
|
-
requirements:
|
107
|
-
- - ">="
|
47
|
+
- - "~>"
|
108
48
|
- !ruby/object:Gem::Version
|
109
|
-
version: '
|
110
|
-
type: :development
|
111
|
-
prerelease: false
|
112
|
-
version_requirements: !ruby/object:Gem::Requirement
|
113
|
-
requirements:
|
49
|
+
version: '3.4'
|
114
50
|
- - ">="
|
115
51
|
- !ruby/object:Gem::Version
|
116
|
-
version:
|
52
|
+
version: 3.4.1
|
117
53
|
description: " A puppet-lint plugin to check that the appends operator (+=) is
|
118
54
|
not used (removed in Puppet 4.0.0).\n"
|
119
55
|
email: voxpupuli@groups.io
|
@@ -138,18 +74,16 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
138
74
|
requirements:
|
139
75
|
- - ">="
|
140
76
|
- !ruby/object:Gem::Version
|
141
|
-
version:
|
77
|
+
version: 2.7.0
|
142
78
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
143
79
|
requirements:
|
144
80
|
- - ">="
|
145
81
|
- !ruby/object:Gem::Version
|
146
82
|
version: '0'
|
147
83
|
requirements: []
|
148
|
-
rubygems_version: 3.2.
|
84
|
+
rubygems_version: 3.2.33
|
149
85
|
signing_key:
|
150
86
|
specification_version: 4
|
151
87
|
summary: A puppet-lint plugin to check that the appends operator (+=) is not used
|
152
88
|
(removed in Puppet 4.0.0).
|
153
|
-
test_files:
|
154
|
-
- spec/puppet-lint/plugins/check_appends/appends_spec.rb
|
155
|
-
- spec/spec_helper.rb
|
89
|
+
test_files: []
|