puppet-lint 0.4.0.pre1 → 1.0.0
Sign up to get free protection for your applications and to get access to all the features.
- data/.travis.yml +3 -4
- data/Gemfile +2 -5
- data/README.md +2 -149
- data/Rakefile +0 -5
- data/lib/puppet-lint.rb +74 -20
- data/lib/puppet-lint/bin.rb +20 -85
- data/lib/puppet-lint/checkplugin.rb +158 -12
- data/lib/puppet-lint/checks.rb +39 -222
- data/lib/puppet-lint/configuration.rb +12 -31
- data/lib/puppet-lint/data.rb +329 -0
- data/lib/puppet-lint/lexer.rb +37 -30
- data/lib/puppet-lint/lexer/token.rb +14 -16
- data/lib/puppet-lint/monkeypatches/string_prepend.rb +6 -0
- data/lib/puppet-lint/optparser.rb +105 -0
- data/lib/puppet-lint/plugins.rb +28 -9
- data/lib/puppet-lint/plugins/check_classes.rb +162 -238
- data/lib/puppet-lint/plugins/check_comments.rb +40 -25
- data/lib/puppet-lint/plugins/check_conditionals.rb +16 -20
- data/lib/puppet-lint/plugins/check_documentation.rb +14 -20
- data/lib/puppet-lint/plugins/check_nodes.rb +23 -0
- data/lib/puppet-lint/plugins/check_resources.rb +127 -141
- data/lib/puppet-lint/plugins/check_strings.rb +133 -107
- data/lib/puppet-lint/plugins/check_variables.rb +11 -11
- data/lib/puppet-lint/plugins/check_whitespace.rb +86 -92
- data/lib/puppet-lint/tasks/puppet-lint.rb +17 -1
- data/lib/puppet-lint/version.rb +1 -1
- data/puppet-lint.gemspec +4 -2
- data/spec/fixtures/test/manifests/ignore.pp +1 -0
- data/spec/fixtures/test/manifests/ignore_reason.pp +1 -0
- data/spec/puppet-lint/bin_spec.rb +104 -84
- data/spec/puppet-lint/configuration_spec.rb +19 -19
- data/spec/puppet-lint/ignore_overrides_spec.rb +97 -0
- data/spec/puppet-lint/lexer/token_spec.rb +9 -9
- data/spec/puppet-lint/lexer_spec.rb +352 -325
- data/spec/puppet-lint/plugins/check_classes/autoloader_layout_spec.rb +77 -23
- data/spec/puppet-lint/plugins/check_classes/class_inherits_from_params_class_spec.rb +14 -12
- data/spec/puppet-lint/plugins/check_classes/inherits_across_namespaces_spec.rb +18 -14
- data/spec/puppet-lint/plugins/check_classes/names_containing_dash_spec.rb +30 -30
- data/spec/puppet-lint/plugins/check_classes/nested_classes_or_defines_spec.rb +31 -26
- data/spec/puppet-lint/plugins/check_classes/parameter_order_spec.rb +34 -28
- data/spec/puppet-lint/plugins/check_classes/right_to_left_relationship_spec.rb +14 -12
- data/spec/puppet-lint/plugins/check_classes/variable_scope_spec.rb +74 -30
- data/spec/puppet-lint/plugins/check_comments/slash_comments_spec.rb +27 -20
- data/spec/puppet-lint/plugins/check_comments/star_comments_spec.rb +78 -13
- data/spec/puppet-lint/plugins/check_conditionals/case_without_default_spec.rb +17 -12
- data/spec/puppet-lint/plugins/check_conditionals/selector_inside_resource_spec.rb +13 -10
- data/spec/puppet-lint/plugins/check_documentation/documentation_spec.rb +21 -16
- data/spec/puppet-lint/plugins/check_nodes/unquoted_node_name_spec.rb +69 -0
- data/spec/puppet-lint/plugins/check_resources/duplicate_params_spec.rb +42 -38
- data/spec/puppet-lint/plugins/check_resources/ensure_first_param_spec.rb +22 -10
- data/spec/puppet-lint/plugins/check_resources/ensure_not_symlink_target_spec.rb +81 -18
- data/spec/puppet-lint/plugins/check_resources/file_mode_spec.rb +69 -112
- data/spec/puppet-lint/plugins/check_resources/unquoted_file_mode_spec.rb +27 -20
- data/spec/puppet-lint/plugins/check_resources/unquoted_resource_title_spec.rb +177 -171
- data/spec/puppet-lint/plugins/check_strings/double_quoted_strings_spec.rb +165 -88
- data/spec/puppet-lint/plugins/check_strings/only_variable_string_spec.rb +97 -22
- data/spec/puppet-lint/plugins/check_strings/puppet_url_without_modules_spec.rb +25 -0
- data/spec/puppet-lint/plugins/check_strings/quoted_booleans_spec.rb +97 -111
- data/spec/puppet-lint/plugins/check_strings/single_quote_string_with_variables_spec.rb +10 -9
- data/spec/puppet-lint/plugins/check_strings/variables_not_enclosed_spec.rb +53 -53
- data/spec/puppet-lint/plugins/check_variables/variable_contains_dash_spec.rb +26 -14
- data/spec/puppet-lint/plugins/check_whitespace/2sp_soft_tabs_spec.rb +10 -9
- data/spec/puppet-lint/plugins/check_whitespace/80chars_spec.rb +31 -15
- data/spec/puppet-lint/plugins/check_whitespace/arrow_alignment_spec.rb +340 -322
- data/spec/puppet-lint/plugins/check_whitespace/hard_tabs_spec.rb +30 -23
- data/spec/puppet-lint/plugins/check_whitespace/trailing_whitespace_spec.rb +42 -41
- data/spec/puppet-lint_spec.rb +3 -3
- data/spec/spec_helper.rb +109 -116
- metadata +109 -50
- data/spec/puppet-lint/plugins/check_classes/class_parameter_defaults_spec.rb +0 -60
@@ -1,20 +1,23 @@
|
|
1
1
|
require 'spec_helper'
|
2
2
|
|
3
3
|
describe 'hard_tabs' do
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
4
|
+
let(:msg) { 'tab character found' }
|
5
|
+
|
6
|
+
context 'with fix disabled' do
|
7
|
+
context 'hard tabs indents' do
|
8
|
+
let(:code) { "\tfoo => bar," }
|
9
|
+
|
10
|
+
it 'should only detect a single problem' do
|
11
|
+
expect(problems).to have(1).problem
|
12
|
+
end
|
13
|
+
|
14
|
+
it 'should create an error' do
|
15
|
+
expect(problems).to contain_error(msg).on_line(1).in_column(1)
|
16
|
+
end
|
17
|
+
end
|
15
18
|
end
|
16
19
|
|
17
|
-
|
20
|
+
context 'with fix enabled' do
|
18
21
|
before do
|
19
22
|
PuppetLint.configuration.fix = true
|
20
23
|
end
|
@@ -23,16 +26,20 @@ describe 'hard_tabs' do
|
|
23
26
|
PuppetLint.configuration.fix = false
|
24
27
|
end
|
25
28
|
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
should
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
29
|
+
context 'hard tabs indents' do
|
30
|
+
let(:code) { "\tfoo => bar," }
|
31
|
+
|
32
|
+
it 'should only detect a single problem' do
|
33
|
+
expect(problems).to have(1).problem
|
34
|
+
end
|
35
|
+
|
36
|
+
it 'should fix the manifest' do
|
37
|
+
expect(problems).to contain_fixed(msg).on_line(1).in_column(1)
|
38
|
+
end
|
39
|
+
|
40
|
+
it 'should convert the tab characters into spaces' do
|
41
|
+
expect(manifest).to eq(" foo => bar,")
|
42
|
+
end
|
43
|
+
end
|
37
44
|
end
|
38
45
|
end
|
@@ -1,20 +1,23 @@
|
|
1
1
|
require 'spec_helper'
|
2
2
|
|
3
3
|
describe 'trailing_whitespace' do
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
4
|
+
let(:msg) { 'trailing whitespace found' }
|
5
|
+
|
6
|
+
context 'with fix disabled' do
|
7
|
+
context 'line with trailing whitespace' do
|
8
|
+
let(:code) { "foo " }
|
9
|
+
|
10
|
+
it 'should only detect a single problem' do
|
11
|
+
expect(problems).to have(1).problem
|
12
|
+
end
|
13
|
+
|
14
|
+
it 'should create an error' do
|
15
|
+
expect(problems).to contain_error(msg).on_line(1).in_column(4)
|
16
|
+
end
|
17
|
+
end
|
15
18
|
end
|
16
19
|
|
17
|
-
|
20
|
+
context 'with fix enabled' do
|
18
21
|
before do
|
19
22
|
PuppetLint.configuration.fix = true
|
20
23
|
end
|
@@ -23,38 +26,36 @@ describe 'trailing_whitespace' do
|
|
23
26
|
PuppetLint.configuration.fix = false
|
24
27
|
end
|
25
28
|
|
26
|
-
|
27
|
-
|
28
|
-
its(:problems) {
|
29
|
-
should have_problem({
|
30
|
-
:kind => :fixed,
|
31
|
-
:message => 'trailing whitespace found',
|
32
|
-
:linenumber => 1,
|
33
|
-
:column => 4,
|
34
|
-
})
|
35
|
-
}
|
36
|
-
its(:manifest) { should == 'foo' }
|
37
|
-
end
|
29
|
+
context 'single line with trailing whitespace' do
|
30
|
+
let(:code) { "foo " }
|
38
31
|
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
end
|
32
|
+
it 'should only detect a single problem' do
|
33
|
+
expect(problems).to have(1).problem
|
34
|
+
end
|
43
35
|
|
44
|
-
|
45
|
-
|
36
|
+
it 'should fix the manifest' do
|
37
|
+
expect(problems).to contain_fixed(msg).on_line(1).in_column(4)
|
38
|
+
end
|
39
|
+
|
40
|
+
it 'should remove the trailing whitespace' do
|
41
|
+
expect(manifest).to eq('foo')
|
42
|
+
end
|
46
43
|
end
|
47
44
|
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
should
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
-
|
58
|
-
|
45
|
+
context 'multiple lines with trailing whitespace' do
|
46
|
+
let(:code) { "foo \nbar" }
|
47
|
+
|
48
|
+
it 'should only detect a single problem' do
|
49
|
+
expect(problems).to have(1).problem
|
50
|
+
end
|
51
|
+
|
52
|
+
it 'should fix the manifest' do
|
53
|
+
expect(problems).to contain_fixed(msg).on_line(1).in_column(4)
|
54
|
+
end
|
55
|
+
|
56
|
+
it 'should remove the trailing whitespace' do
|
57
|
+
expect(manifest).to eq("foo\nbar")
|
58
|
+
end
|
59
|
+
end
|
59
60
|
end
|
60
61
|
end
|
data/spec/puppet-lint_spec.rb
CHANGED
@@ -5,16 +5,16 @@ describe PuppetLint do
|
|
5
5
|
|
6
6
|
it 'should accept manifests as a string' do
|
7
7
|
subject.code = "class foo { }"
|
8
|
-
subject.code.
|
8
|
+
expect(subject.code).to_not be_nil
|
9
9
|
end
|
10
10
|
|
11
11
|
it 'should have support for % with a hash' do
|
12
12
|
string = 'replace %{hash}' % {:hash => 'replaced'}
|
13
|
-
string.
|
13
|
+
expect(string).to match('replace replaced')
|
14
14
|
end
|
15
15
|
|
16
16
|
it 'should not break regular % support' do
|
17
17
|
string = 'replace %s %s' % ['get','replaced']
|
18
|
-
string.
|
18
|
+
expect(string).to match('replace get replaced')
|
19
19
|
end
|
20
20
|
end
|
data/spec/spec_helper.rb
CHANGED
@@ -1,136 +1,129 @@
|
|
1
|
-
require 'rspec/autorun'
|
2
1
|
require 'puppet-lint'
|
2
|
+
require 'rspec/its'
|
3
|
+
require 'rspec/collection_matchers'
|
3
4
|
|
4
5
|
module RSpec
|
5
6
|
module LintExampleGroup
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
end
|
15
|
-
end
|
7
|
+
class HaveProblem
|
8
|
+
def initialize(method, message)
|
9
|
+
@expected_problem = {
|
10
|
+
:kind => method.to_s.gsub(/\Acontain_/, '').to_sym,
|
11
|
+
:message => message,
|
12
|
+
}
|
13
|
+
@description = ["contain a #{@expected_problem[:kind]}"]
|
14
|
+
end
|
16
15
|
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
end
|
16
|
+
def on_line(line)
|
17
|
+
@expected_problem[:line] = line
|
18
|
+
@description << "on line #{line}"
|
19
|
+
self
|
20
|
+
end
|
23
21
|
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
#end
|
29
|
-
|
30
|
-
#PuppetLint::CheckPlugin.any_instance.stub(:error) do |arg|
|
31
|
-
# raise PuppetLint::Error
|
32
|
-
#end
|
33
|
-
|
34
|
-
# filter_array_of_hashes(array, filter) -> an_array
|
35
|
-
#
|
36
|
-
# Filters out hashes by applying filter_hash to each hash
|
37
|
-
# in the array. All set value/key pairs in filter_hash must
|
38
|
-
# match before a hash is allowed.
|
39
|
-
# Returns all hashes that matched in an array.
|
40
|
-
#
|
41
|
-
# filter_array_of_hashes(
|
42
|
-
# [
|
43
|
-
# {:filter => 1, :name => 'one'},
|
44
|
-
# {:filter => 2, :name => 'two'},
|
45
|
-
# {:filter => 3, :name => 'three'},
|
46
|
-
# ],
|
47
|
-
# { :filter => 2 }
|
48
|
-
# )
|
49
|
-
# => [{:filter=>2, :name=>"two"}]
|
50
|
-
#
|
51
|
-
# filter_array_of_hashes([{:f => 1}, {:f => 2}], {})
|
52
|
-
# => [{:f=>1}, {:f=>2}]
|
53
|
-
#
|
54
|
-
def filter_array_of_hashes(array_of_hashes, filter_hash)
|
55
|
-
array_of_hashes.select { |hash_to_check|
|
56
|
-
val = true
|
57
|
-
filter_hash.each do |k,v|
|
58
|
-
if ! hash_to_check.key?(k)
|
59
|
-
val = false
|
60
|
-
break
|
61
|
-
elsif hash_to_check[k].to_s != v.to_s
|
62
|
-
val = false
|
63
|
-
break
|
22
|
+
def in_column(column)
|
23
|
+
@expected_problem[:column] = column
|
24
|
+
@description << "starting in column #{column}"
|
25
|
+
self
|
64
26
|
end
|
65
|
-
end
|
66
|
-
val
|
67
|
-
}
|
68
|
-
end
|
69
27
|
|
70
|
-
|
28
|
+
def with_reason(reason)
|
29
|
+
@expected_problem[:reason] = reason
|
30
|
+
@description << "with reason '#{reason}'"
|
31
|
+
self
|
32
|
+
end
|
71
33
|
|
72
|
-
|
73
|
-
|
74
|
-
|
34
|
+
def matches?(problems)
|
35
|
+
@problems = problems
|
36
|
+
|
37
|
+
problems.any? do |problem|
|
38
|
+
ret = true
|
39
|
+
@expected_problem.each do |key, value|
|
40
|
+
if !problem.key?(key)
|
41
|
+
ret = false
|
42
|
+
break
|
43
|
+
elsif problem[key] != value
|
44
|
+
ret = false
|
45
|
+
break
|
46
|
+
end
|
47
|
+
end
|
48
|
+
ret
|
49
|
+
end
|
50
|
+
end
|
75
51
|
|
76
|
-
|
77
|
-
|
78
|
-
|
79
|
-
* filter = #{filter.inspect}
|
80
|
-
* problems = [
|
81
|
-
"
|
82
|
-
problems.each { |prob| message << " #{prob.inspect}," }
|
83
|
-
message << "
|
84
|
-
]"
|
85
|
-
message
|
86
|
-
end
|
52
|
+
def description
|
53
|
+
@description.join(' ')
|
54
|
+
end
|
87
55
|
|
88
|
-
|
89
|
-
|
90
|
-
|
91
|
-
|
92
|
-
|
93
|
-
|
94
|
-
|
95
|
-
message << "
|
96
|
-
]"
|
97
|
-
message
|
98
|
-
end
|
56
|
+
def check_attr(attr, prefix)
|
57
|
+
unless @expected_problem[attr] == @problems.first[attr]
|
58
|
+
expected = @expected_problem[attr].inspect
|
59
|
+
actual = @problems.first[attr].inspect
|
60
|
+
"#{prefix} #{expected}, but it was #{actual}"
|
61
|
+
end
|
62
|
+
end
|
99
63
|
|
100
|
-
|
64
|
+
def failure_message
|
65
|
+
case @problems.length
|
66
|
+
when 0
|
67
|
+
"expected that the check would create a problem but it did not"
|
68
|
+
when 1
|
69
|
+
messages = ["expected that the problem"]
|
70
|
+
|
71
|
+
messages << check_attr(:kind, 'would be of kind')
|
72
|
+
messages << check_attr(:message, 'would have the message')
|
73
|
+
messages << check_attr(:linenumber, 'would be on line')
|
74
|
+
messages << check_attr(:column, 'would start on column')
|
75
|
+
|
76
|
+
messages.compact.join("\n ")
|
77
|
+
else
|
78
|
+
[
|
79
|
+
"expected that the check would create",
|
80
|
+
PP.pp(@expected_problem, '').strip,
|
81
|
+
"but it instead created",
|
82
|
+
PP.pp(@problems, ''),
|
83
|
+
].join("\n")
|
84
|
+
end
|
85
|
+
end
|
101
86
|
|
102
|
-
|
87
|
+
def failure_message_when_negated
|
88
|
+
"expected that the check would not create the problem, but it did"
|
89
|
+
end
|
90
|
+
end
|
103
91
|
|
104
|
-
|
105
|
-
|
106
|
-
|
107
|
-
|
92
|
+
def method_missing(method, *args, &block)
|
93
|
+
return HaveProblem.new(method, args.first) if method.to_s =~ /\Acontain_/
|
94
|
+
super
|
95
|
+
end
|
108
96
|
|
109
|
-
|
110
|
-
|
111
|
-
if filtered_problems.length > 1
|
112
|
-
message = "Multiple problems found matching the filter."
|
113
|
-
else
|
114
|
-
left = problems - filter_array_of_hashes(actual, filter)
|
115
|
-
message = "There were problems not matching filter."
|
116
|
-
message << "
|
117
|
-
* filter = #{filter.inspect}
|
118
|
-
* unmatched = [
|
119
|
-
"
|
120
|
-
left.each { |prob| message << " #{prob.inspect}," }
|
121
|
-
message << "
|
122
|
-
]"
|
97
|
+
def problems
|
98
|
+
subject.problems
|
123
99
|
end
|
124
|
-
message
|
125
|
-
end
|
126
100
|
|
127
|
-
|
128
|
-
|
129
|
-
|
130
|
-
* filter = #{filter.inspect}
|
131
|
-
"
|
132
|
-
message
|
133
|
-
end
|
101
|
+
def manifest
|
102
|
+
subject.manifest
|
103
|
+
end
|
134
104
|
|
105
|
+
def subject
|
106
|
+
klass = PuppetLint::Checks.new
|
107
|
+
filepath = self.respond_to?(:path) ? path : ''
|
108
|
+
klass.load_data(filepath, code)
|
109
|
+
check_name = self.class.top_level_description.to_sym
|
110
|
+
check = PuppetLint.configuration.check_object[check_name].new
|
111
|
+
klass.problems = check.run
|
112
|
+
if PuppetLint.configuration.fix
|
113
|
+
klass.problems = check.fix_problems
|
114
|
+
end
|
115
|
+
klass
|
116
|
+
end
|
117
|
+
end
|
135
118
|
end
|
136
119
|
|
120
|
+
RSpec.configure do |config|
|
121
|
+
config.mock_framework = :rspec
|
122
|
+
config.include RSpec::LintExampleGroup, {
|
123
|
+
:type => :lint,
|
124
|
+
:file_path => Regexp.compile(%w{spec puppet-lint plugins}.join('[\\\/]')),
|
125
|
+
}
|
126
|
+
config.expect_with :rspec do |c|
|
127
|
+
c.syntax = :expect
|
128
|
+
end
|
129
|
+
end
|
metadata
CHANGED
@@ -1,56 +1,94 @@
|
|
1
|
-
--- !ruby/object:Gem::Specification
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
2
|
name: puppet-lint
|
3
|
-
version: !ruby/object:Gem::Version
|
4
|
-
|
5
|
-
prerelease:
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
hash: 23
|
5
|
+
prerelease:
|
6
|
+
segments:
|
7
|
+
- 1
|
8
|
+
- 0
|
9
|
+
- 0
|
10
|
+
version: 1.0.0
|
6
11
|
platform: ruby
|
7
|
-
authors:
|
12
|
+
authors:
|
8
13
|
- Tim Sharpe
|
9
14
|
autorequire:
|
10
15
|
bindir: bin
|
11
16
|
cert_chain: []
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
+
|
18
|
+
date: 2014-08-18 00:00:00 +10:00
|
19
|
+
default_executable:
|
20
|
+
dependencies:
|
21
|
+
- !ruby/object:Gem::Dependency
|
22
|
+
name: rake
|
23
|
+
prerelease: false
|
24
|
+
requirement: &id001 !ruby/object:Gem::Requirement
|
17
25
|
none: false
|
18
|
-
requirements:
|
19
|
-
- -
|
20
|
-
- !ruby/object:Gem::Version
|
21
|
-
|
26
|
+
requirements:
|
27
|
+
- - ~>
|
28
|
+
- !ruby/object:Gem::Version
|
29
|
+
hash: 35
|
30
|
+
segments:
|
31
|
+
- 10
|
32
|
+
- 0
|
33
|
+
version: "10.0"
|
22
34
|
type: :development
|
35
|
+
version_requirements: *id001
|
36
|
+
- !ruby/object:Gem::Dependency
|
37
|
+
name: rspec
|
23
38
|
prerelease: false
|
24
|
-
|
39
|
+
requirement: &id002 !ruby/object:Gem::Requirement
|
25
40
|
none: false
|
26
|
-
requirements:
|
27
|
-
- -
|
28
|
-
- !ruby/object:Gem::Version
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
41
|
+
requirements:
|
42
|
+
- - ~>
|
43
|
+
- !ruby/object:Gem::Version
|
44
|
+
hash: 7
|
45
|
+
segments:
|
46
|
+
- 3
|
47
|
+
- 0
|
48
|
+
version: "3.0"
|
49
|
+
type: :development
|
50
|
+
version_requirements: *id002
|
51
|
+
- !ruby/object:Gem::Dependency
|
52
|
+
name: rspec-its
|
53
|
+
prerelease: false
|
54
|
+
requirement: &id003 !ruby/object:Gem::Requirement
|
33
55
|
none: false
|
34
|
-
requirements:
|
35
|
-
- -
|
36
|
-
- !ruby/object:Gem::Version
|
37
|
-
|
56
|
+
requirements:
|
57
|
+
- - ~>
|
58
|
+
- !ruby/object:Gem::Version
|
59
|
+
hash: 15
|
60
|
+
segments:
|
61
|
+
- 1
|
62
|
+
- 0
|
63
|
+
version: "1.0"
|
38
64
|
type: :development
|
65
|
+
version_requirements: *id003
|
66
|
+
- !ruby/object:Gem::Dependency
|
67
|
+
name: rspec-collection_matchers
|
39
68
|
prerelease: false
|
40
|
-
|
69
|
+
requirement: &id004 !ruby/object:Gem::Requirement
|
41
70
|
none: false
|
42
|
-
requirements:
|
43
|
-
- -
|
44
|
-
- !ruby/object:Gem::Version
|
45
|
-
|
46
|
-
|
47
|
-
|
71
|
+
requirements:
|
72
|
+
- - ~>
|
73
|
+
- !ruby/object:Gem::Version
|
74
|
+
hash: 15
|
75
|
+
segments:
|
76
|
+
- 1
|
77
|
+
- 0
|
78
|
+
version: "1.0"
|
79
|
+
type: :development
|
80
|
+
version_requirements: *id004
|
81
|
+
description: |-
|
82
|
+
Checks your Puppet manifests against the Puppetlabs
|
83
|
+
style guide and alerts you to any discrepancies.
|
48
84
|
email: tim@sharpe.id.au
|
49
|
-
executables:
|
85
|
+
executables:
|
50
86
|
- puppet-lint
|
51
87
|
extensions: []
|
88
|
+
|
52
89
|
extra_rdoc_files: []
|
53
|
-
|
90
|
+
|
91
|
+
files:
|
54
92
|
- .gitignore
|
55
93
|
- .travis.yml
|
56
94
|
- Gemfile
|
@@ -63,16 +101,19 @@ files:
|
|
63
101
|
- lib/puppet-lint/checkplugin.rb
|
64
102
|
- lib/puppet-lint/checks.rb
|
65
103
|
- lib/puppet-lint/configuration.rb
|
104
|
+
- lib/puppet-lint/data.rb
|
66
105
|
- lib/puppet-lint/lexer.rb
|
67
106
|
- lib/puppet-lint/lexer/token.rb
|
68
107
|
- lib/puppet-lint/monkeypatches.rb
|
69
108
|
- lib/puppet-lint/monkeypatches/string_percent.rb
|
70
109
|
- lib/puppet-lint/monkeypatches/string_prepend.rb
|
110
|
+
- lib/puppet-lint/optparser.rb
|
71
111
|
- lib/puppet-lint/plugins.rb
|
72
112
|
- lib/puppet-lint/plugins/check_classes.rb
|
73
113
|
- lib/puppet-lint/plugins/check_comments.rb
|
74
114
|
- lib/puppet-lint/plugins/check_conditionals.rb
|
75
115
|
- lib/puppet-lint/plugins/check_documentation.rb
|
116
|
+
- lib/puppet-lint/plugins/check_nodes.rb
|
76
117
|
- lib/puppet-lint/plugins/check_resources.rb
|
77
118
|
- lib/puppet-lint/plugins/check_strings.rb
|
78
119
|
- lib/puppet-lint/plugins/check_variables.rb
|
@@ -81,16 +122,18 @@ files:
|
|
81
122
|
- lib/puppet-lint/version.rb
|
82
123
|
- puppet-lint.gemspec
|
83
124
|
- spec/fixtures/test/manifests/fail.pp
|
125
|
+
- spec/fixtures/test/manifests/ignore.pp
|
126
|
+
- spec/fixtures/test/manifests/ignore_reason.pp
|
84
127
|
- spec/fixtures/test/manifests/init.pp
|
85
128
|
- spec/fixtures/test/manifests/malformed.pp
|
86
129
|
- spec/fixtures/test/manifests/warning.pp
|
87
130
|
- spec/puppet-lint/bin_spec.rb
|
88
131
|
- spec/puppet-lint/configuration_spec.rb
|
132
|
+
- spec/puppet-lint/ignore_overrides_spec.rb
|
89
133
|
- spec/puppet-lint/lexer/token_spec.rb
|
90
134
|
- spec/puppet-lint/lexer_spec.rb
|
91
135
|
- spec/puppet-lint/plugins/check_classes/autoloader_layout_spec.rb
|
92
136
|
- spec/puppet-lint/plugins/check_classes/class_inherits_from_params_class_spec.rb
|
93
|
-
- spec/puppet-lint/plugins/check_classes/class_parameter_defaults_spec.rb
|
94
137
|
- spec/puppet-lint/plugins/check_classes/inherits_across_namespaces_spec.rb
|
95
138
|
- spec/puppet-lint/plugins/check_classes/names_containing_dash_spec.rb
|
96
139
|
- spec/puppet-lint/plugins/check_classes/nested_classes_or_defines_spec.rb
|
@@ -102,6 +145,7 @@ files:
|
|
102
145
|
- spec/puppet-lint/plugins/check_conditionals/case_without_default_spec.rb
|
103
146
|
- spec/puppet-lint/plugins/check_conditionals/selector_inside_resource_spec.rb
|
104
147
|
- spec/puppet-lint/plugins/check_documentation/documentation_spec.rb
|
148
|
+
- spec/puppet-lint/plugins/check_nodes/unquoted_node_name_spec.rb
|
105
149
|
- spec/puppet-lint/plugins/check_resources/duplicate_params_spec.rb
|
106
150
|
- spec/puppet-lint/plugins/check_resources/ensure_first_param_spec.rb
|
107
151
|
- spec/puppet-lint/plugins/check_resources/ensure_not_symlink_target_spec.rb
|
@@ -110,6 +154,7 @@ files:
|
|
110
154
|
- spec/puppet-lint/plugins/check_resources/unquoted_resource_title_spec.rb
|
111
155
|
- spec/puppet-lint/plugins/check_strings/double_quoted_strings_spec.rb
|
112
156
|
- spec/puppet-lint/plugins/check_strings/only_variable_string_spec.rb
|
157
|
+
- spec/puppet-lint/plugins/check_strings/puppet_url_without_modules_spec.rb
|
113
158
|
- spec/puppet-lint/plugins/check_strings/quoted_booleans_spec.rb
|
114
159
|
- spec/puppet-lint/plugins/check_strings/single_quote_string_with_variables_spec.rb
|
115
160
|
- spec/puppet-lint/plugins/check_strings/variables_not_enclosed_spec.rb
|
@@ -121,42 +166,54 @@ files:
|
|
121
166
|
- spec/puppet-lint/plugins/check_whitespace/trailing_whitespace_spec.rb
|
122
167
|
- spec/puppet-lint_spec.rb
|
123
168
|
- spec/spec_helper.rb
|
169
|
+
has_rdoc: true
|
124
170
|
homepage: https://github.com/rodjek/puppet-lint/
|
125
171
|
licenses: []
|
172
|
+
|
126
173
|
post_install_message:
|
127
174
|
rdoc_options: []
|
128
|
-
|
175
|
+
|
176
|
+
require_paths:
|
129
177
|
- lib
|
130
|
-
required_ruby_version: !ruby/object:Gem::Requirement
|
178
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
131
179
|
none: false
|
132
|
-
requirements:
|
133
|
-
- -
|
134
|
-
- !ruby/object:Gem::Version
|
135
|
-
|
136
|
-
|
180
|
+
requirements:
|
181
|
+
- - ">="
|
182
|
+
- !ruby/object:Gem::Version
|
183
|
+
hash: 3
|
184
|
+
segments:
|
185
|
+
- 0
|
186
|
+
version: "0"
|
187
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
137
188
|
none: false
|
138
|
-
requirements:
|
139
|
-
- -
|
140
|
-
- !ruby/object:Gem::Version
|
141
|
-
|
189
|
+
requirements:
|
190
|
+
- - ">="
|
191
|
+
- !ruby/object:Gem::Version
|
192
|
+
hash: 3
|
193
|
+
segments:
|
194
|
+
- 0
|
195
|
+
version: "0"
|
142
196
|
requirements: []
|
197
|
+
|
143
198
|
rubyforge_project:
|
144
|
-
rubygems_version: 1.
|
199
|
+
rubygems_version: 1.6.2
|
145
200
|
signing_key:
|
146
201
|
specification_version: 3
|
147
202
|
summary: Ensure your Puppet manifests conform with the Puppetlabs style guide
|
148
|
-
test_files:
|
203
|
+
test_files:
|
149
204
|
- spec/fixtures/test/manifests/fail.pp
|
205
|
+
- spec/fixtures/test/manifests/ignore.pp
|
206
|
+
- spec/fixtures/test/manifests/ignore_reason.pp
|
150
207
|
- spec/fixtures/test/manifests/init.pp
|
151
208
|
- spec/fixtures/test/manifests/malformed.pp
|
152
209
|
- spec/fixtures/test/manifests/warning.pp
|
153
210
|
- spec/puppet-lint/bin_spec.rb
|
154
211
|
- spec/puppet-lint/configuration_spec.rb
|
212
|
+
- spec/puppet-lint/ignore_overrides_spec.rb
|
155
213
|
- spec/puppet-lint/lexer/token_spec.rb
|
156
214
|
- spec/puppet-lint/lexer_spec.rb
|
157
215
|
- spec/puppet-lint/plugins/check_classes/autoloader_layout_spec.rb
|
158
216
|
- spec/puppet-lint/plugins/check_classes/class_inherits_from_params_class_spec.rb
|
159
|
-
- spec/puppet-lint/plugins/check_classes/class_parameter_defaults_spec.rb
|
160
217
|
- spec/puppet-lint/plugins/check_classes/inherits_across_namespaces_spec.rb
|
161
218
|
- spec/puppet-lint/plugins/check_classes/names_containing_dash_spec.rb
|
162
219
|
- spec/puppet-lint/plugins/check_classes/nested_classes_or_defines_spec.rb
|
@@ -168,6 +225,7 @@ test_files:
|
|
168
225
|
- spec/puppet-lint/plugins/check_conditionals/case_without_default_spec.rb
|
169
226
|
- spec/puppet-lint/plugins/check_conditionals/selector_inside_resource_spec.rb
|
170
227
|
- spec/puppet-lint/plugins/check_documentation/documentation_spec.rb
|
228
|
+
- spec/puppet-lint/plugins/check_nodes/unquoted_node_name_spec.rb
|
171
229
|
- spec/puppet-lint/plugins/check_resources/duplicate_params_spec.rb
|
172
230
|
- spec/puppet-lint/plugins/check_resources/ensure_first_param_spec.rb
|
173
231
|
- spec/puppet-lint/plugins/check_resources/ensure_not_symlink_target_spec.rb
|
@@ -176,6 +234,7 @@ test_files:
|
|
176
234
|
- spec/puppet-lint/plugins/check_resources/unquoted_resource_title_spec.rb
|
177
235
|
- spec/puppet-lint/plugins/check_strings/double_quoted_strings_spec.rb
|
178
236
|
- spec/puppet-lint/plugins/check_strings/only_variable_string_spec.rb
|
237
|
+
- spec/puppet-lint/plugins/check_strings/puppet_url_without_modules_spec.rb
|
179
238
|
- spec/puppet-lint/plugins/check_strings/quoted_booleans_spec.rb
|
180
239
|
- spec/puppet-lint/plugins/check_strings/single_quote_string_with_variables_spec.rb
|
181
240
|
- spec/puppet-lint/plugins/check_strings/variables_not_enclosed_spec.rb
|