puppet-lint 0.4.0.pre1 → 1.0.0

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.
Files changed (70) hide show
  1. data/.travis.yml +3 -4
  2. data/Gemfile +2 -5
  3. data/README.md +2 -149
  4. data/Rakefile +0 -5
  5. data/lib/puppet-lint.rb +74 -20
  6. data/lib/puppet-lint/bin.rb +20 -85
  7. data/lib/puppet-lint/checkplugin.rb +158 -12
  8. data/lib/puppet-lint/checks.rb +39 -222
  9. data/lib/puppet-lint/configuration.rb +12 -31
  10. data/lib/puppet-lint/data.rb +329 -0
  11. data/lib/puppet-lint/lexer.rb +37 -30
  12. data/lib/puppet-lint/lexer/token.rb +14 -16
  13. data/lib/puppet-lint/monkeypatches/string_prepend.rb +6 -0
  14. data/lib/puppet-lint/optparser.rb +105 -0
  15. data/lib/puppet-lint/plugins.rb +28 -9
  16. data/lib/puppet-lint/plugins/check_classes.rb +162 -238
  17. data/lib/puppet-lint/plugins/check_comments.rb +40 -25
  18. data/lib/puppet-lint/plugins/check_conditionals.rb +16 -20
  19. data/lib/puppet-lint/plugins/check_documentation.rb +14 -20
  20. data/lib/puppet-lint/plugins/check_nodes.rb +23 -0
  21. data/lib/puppet-lint/plugins/check_resources.rb +127 -141
  22. data/lib/puppet-lint/plugins/check_strings.rb +133 -107
  23. data/lib/puppet-lint/plugins/check_variables.rb +11 -11
  24. data/lib/puppet-lint/plugins/check_whitespace.rb +86 -92
  25. data/lib/puppet-lint/tasks/puppet-lint.rb +17 -1
  26. data/lib/puppet-lint/version.rb +1 -1
  27. data/puppet-lint.gemspec +4 -2
  28. data/spec/fixtures/test/manifests/ignore.pp +1 -0
  29. data/spec/fixtures/test/manifests/ignore_reason.pp +1 -0
  30. data/spec/puppet-lint/bin_spec.rb +104 -84
  31. data/spec/puppet-lint/configuration_spec.rb +19 -19
  32. data/spec/puppet-lint/ignore_overrides_spec.rb +97 -0
  33. data/spec/puppet-lint/lexer/token_spec.rb +9 -9
  34. data/spec/puppet-lint/lexer_spec.rb +352 -325
  35. data/spec/puppet-lint/plugins/check_classes/autoloader_layout_spec.rb +77 -23
  36. data/spec/puppet-lint/plugins/check_classes/class_inherits_from_params_class_spec.rb +14 -12
  37. data/spec/puppet-lint/plugins/check_classes/inherits_across_namespaces_spec.rb +18 -14
  38. data/spec/puppet-lint/plugins/check_classes/names_containing_dash_spec.rb +30 -30
  39. data/spec/puppet-lint/plugins/check_classes/nested_classes_or_defines_spec.rb +31 -26
  40. data/spec/puppet-lint/plugins/check_classes/parameter_order_spec.rb +34 -28
  41. data/spec/puppet-lint/plugins/check_classes/right_to_left_relationship_spec.rb +14 -12
  42. data/spec/puppet-lint/plugins/check_classes/variable_scope_spec.rb +74 -30
  43. data/spec/puppet-lint/plugins/check_comments/slash_comments_spec.rb +27 -20
  44. data/spec/puppet-lint/plugins/check_comments/star_comments_spec.rb +78 -13
  45. data/spec/puppet-lint/plugins/check_conditionals/case_without_default_spec.rb +17 -12
  46. data/spec/puppet-lint/plugins/check_conditionals/selector_inside_resource_spec.rb +13 -10
  47. data/spec/puppet-lint/plugins/check_documentation/documentation_spec.rb +21 -16
  48. data/spec/puppet-lint/plugins/check_nodes/unquoted_node_name_spec.rb +69 -0
  49. data/spec/puppet-lint/plugins/check_resources/duplicate_params_spec.rb +42 -38
  50. data/spec/puppet-lint/plugins/check_resources/ensure_first_param_spec.rb +22 -10
  51. data/spec/puppet-lint/plugins/check_resources/ensure_not_symlink_target_spec.rb +81 -18
  52. data/spec/puppet-lint/plugins/check_resources/file_mode_spec.rb +69 -112
  53. data/spec/puppet-lint/plugins/check_resources/unquoted_file_mode_spec.rb +27 -20
  54. data/spec/puppet-lint/plugins/check_resources/unquoted_resource_title_spec.rb +177 -171
  55. data/spec/puppet-lint/plugins/check_strings/double_quoted_strings_spec.rb +165 -88
  56. data/spec/puppet-lint/plugins/check_strings/only_variable_string_spec.rb +97 -22
  57. data/spec/puppet-lint/plugins/check_strings/puppet_url_without_modules_spec.rb +25 -0
  58. data/spec/puppet-lint/plugins/check_strings/quoted_booleans_spec.rb +97 -111
  59. data/spec/puppet-lint/plugins/check_strings/single_quote_string_with_variables_spec.rb +10 -9
  60. data/spec/puppet-lint/plugins/check_strings/variables_not_enclosed_spec.rb +53 -53
  61. data/spec/puppet-lint/plugins/check_variables/variable_contains_dash_spec.rb +26 -14
  62. data/spec/puppet-lint/plugins/check_whitespace/2sp_soft_tabs_spec.rb +10 -9
  63. data/spec/puppet-lint/plugins/check_whitespace/80chars_spec.rb +31 -15
  64. data/spec/puppet-lint/plugins/check_whitespace/arrow_alignment_spec.rb +340 -322
  65. data/spec/puppet-lint/plugins/check_whitespace/hard_tabs_spec.rb +30 -23
  66. data/spec/puppet-lint/plugins/check_whitespace/trailing_whitespace_spec.rb +42 -41
  67. data/spec/puppet-lint_spec.rb +3 -3
  68. data/spec/spec_helper.rb +109 -116
  69. metadata +109 -50
  70. 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
- describe 'hard tabs indents' do
5
- let(:code) { "\tfoo => bar," }
6
-
7
- its(:problems) {
8
- should have_problem({
9
- :kind => :error,
10
- :message => 'tab character found',
11
- :linenumber => 1,
12
- :column => 1,
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
- describe 'hard tabs indents' do
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
- let(:code) { "\tfoo => bar," }
27
-
28
- its(:problems) {
29
- should have_problem({
30
- :kind => :fixed,
31
- :message => 'tab character found',
32
- :linenumber => 1,
33
- :column => 1,
34
- })
35
- }
36
- its(:manifest) { should == " foo => bar," }
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
- describe 'line with trailing whitespace' do
5
- let(:code) { "foo " }
6
-
7
- its(:problems) {
8
- should have_problem({
9
- :kind => :error,
10
- :message => 'trailing whitespace found',
11
- :linenumber => 1,
12
- :column => 4,
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
- describe 'single line with trailing whitespace w/fix' do
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
- let(:code) { "foo " }
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
- describe 'multiple lines with trailing whitespace w/fix' do
40
- before do
41
- PuppetLint.configuration.fix = true
42
- end
32
+ it 'should only detect a single problem' do
33
+ expect(problems).to have(1).problem
34
+ end
43
35
 
44
- after do
45
- PuppetLint.configuration.fix = false
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
- let(:code) { "foo \nbar" }
49
-
50
- its(:problems) {
51
- should have_problem({
52
- :kind => :fixed,
53
- :message => 'trailing whitespace found',
54
- :linenumber => 1,
55
- :column => 4,
56
- })
57
- }
58
- its(:manifest) { should == "foo\nbar" }
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
@@ -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.should_not be_nil
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.should match 'replace replaced'
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.should match 'replace get replaced'
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
- def subject
7
- klass = PuppetLint::Checks.new
8
- fileinfo = {}
9
- fileinfo[:fullpath] = self.respond_to?(:fullpath) ? fullpath : ''
10
- klass.load_data(fileinfo, code)
11
- klass.send("lint_check_#{self.class.top_level_description}")
12
- klass
13
- end
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
- RSpec.configure do |c|
18
- c.mock_framework = :rspec
19
- c.include RSpec::LintExampleGroup, :type => :lint, :example_group => {
20
- :file_path => Regexp.compile(%w{spec puppet-lint plugins}.join('[\\\/]'))
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
- #class PuppetLint::Warning < Exception; end
25
- #class PuppetLint::Error < Exception; end
26
- #PuppetLint::CheckPlugin.any_instance.stub(:warn) do |arg|
27
- # raise PuppetLint::Warning
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
- RSpec::Matchers.define :have_problem do |filter|
28
+ def with_reason(reason)
29
+ @expected_problem[:reason] = reason
30
+ @description << "with reason '#{reason}'"
31
+ self
32
+ end
71
33
 
72
- match do |problems|
73
- filter_array_of_hashes(problems, filter).length > 0
74
- end
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
- failure_message_for_should do |problems|
77
- message = "could not find any problems matching the filter."
78
- message << "
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
- failure_message_for_should_not do |problems|
89
- message = "some problems matched the filter."
90
- message << "
91
- * filter = #{filter.inspect}
92
- * matched = [
93
- "
94
- filter_array_of_hashes(problems, filter).each { |prob| message << " #{prob.inspect}," }
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
- end
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
- RSpec::Matchers.define :only_have_problem do |filter|
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
- match do |actual|
105
- res = filter_array_of_hashes(actual, filter)
106
- res.length == actual.length && res.length == 1
107
- end
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
- failure_message_for_should do |problems|
110
- filtered_problems = filter_array_of_hashes(actual, filter)
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
- failure_message_for_should_not do |problems|
128
- message = "There were no problems found besides the ones matched with filter."
129
- message << "
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
- version: 0.4.0.pre1
5
- prerelease: 6
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
- date: 2013-01-29 00:00:00.000000000 Z
13
- dependencies:
14
- - !ruby/object:Gem::Dependency
15
- name: rspec
16
- requirement: !ruby/object:Gem::Requirement
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
- version: '0'
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
- version_requirements: !ruby/object:Gem::Requirement
39
+ requirement: &id002 !ruby/object:Gem::Requirement
25
40
  none: false
26
- requirements:
27
- - - ! '>='
28
- - !ruby/object:Gem::Version
29
- version: '0'
30
- - !ruby/object:Gem::Dependency
31
- name: rcov
32
- requirement: !ruby/object:Gem::Requirement
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
- version: '0'
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
- version_requirements: !ruby/object:Gem::Requirement
69
+ requirement: &id004 !ruby/object:Gem::Requirement
41
70
  none: false
42
- requirements:
43
- - - ! '>='
44
- - !ruby/object:Gem::Version
45
- version: '0'
46
- description: ! "Checks your Puppet manifests against the Puppetlabs\n style guide
47
- and alerts you to any discrepancies."
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
- files:
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
- require_paths:
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
- version: '0'
136
- required_rubygems_version: !ruby/object:Gem::Requirement
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
- version: 1.3.1
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.8.23
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