foodcritic 10.3.1 → 10.4.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (37) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +16 -0
  3. data/Rakefile +1 -1
  4. data/features/support/command_helpers.rb +2 -2
  5. data/lib/foodcritic/rules/fc052.rb +1 -1
  6. data/lib/foodcritic/rules/fc053.rb +1 -1
  7. data/lib/foodcritic/rules/fc071.rb +3 -1
  8. data/lib/foodcritic/rules/fc076.rb +6 -0
  9. data/lib/foodcritic/rules/fc077.rb +6 -0
  10. data/lib/foodcritic/rules/fc078.rb +135 -0
  11. data/lib/foodcritic/version.rb +1 -1
  12. data/spec/functional/fc071_spec.rb +5 -0
  13. data/spec/functional/fc076_spec.rb +13 -0
  14. data/spec/functional/fc077_spec.rb +13 -0
  15. data/spec/functional/fc078_spec.rb +25 -0
  16. data/spec/regression/cookbooks.txt +16 -6
  17. data/spec/regression/expected/aix.txt +1 -0
  18. data/spec/regression/expected/ark.txt +1 -0
  19. data/spec/regression/expected/auditd.txt +5 -0
  20. data/spec/regression/expected/boost.txt +1 -1
  21. data/spec/regression/expected/build-essential.txt +1 -1
  22. data/spec/regression/expected/chef-ingredient.txt +2 -0
  23. data/spec/regression/expected/{zlib.txt → chef-vault.txt} +1 -2
  24. data/spec/regression/expected/chef_client_updater.txt +1 -0
  25. data/spec/regression/expected/chef_hostname.txt +2 -0
  26. data/spec/regression/expected/chef_nginx.txt +2 -0
  27. data/spec/regression/expected/docker.txt +2 -0
  28. data/spec/regression/expected/keepalived.txt +0 -2
  29. data/spec/regression/expected/{sqlite.txt → libarchive.txt} +1 -0
  30. data/spec/regression/expected/mysql.txt +2 -2
  31. data/spec/regression/expected/runit.txt +2 -0
  32. data/spec/regression/expected/{zsh.txt → smokeping.txt} +1 -2
  33. data/spec/regression/expected/{xfs.txt → tar.txt} +3 -0
  34. data/spec/regression/expected/tomcat.txt +0 -7
  35. data/spec/regression/expected/vcruntime.txt +7 -0
  36. data/spec/regression/regression_spec.rb +1 -1
  37. metadata +23 -7
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 56253bb3557a5445e604382c6c5f17cae29fc1f2
4
- data.tar.gz: ad35dc63ea6b20db003313d6291799ca01dcf939
3
+ metadata.gz: d188b03aeb991046c706c71cbebe4862c1dc56dd
4
+ data.tar.gz: c401c48d43ea472d45fc24c849202f33c5c6297f
5
5
  SHA512:
6
- metadata.gz: 669e2805f7e0f7c7f6f7f4e8bc02db0edc2a69cfc49613b74feb3f198059fe529217b64579f1fc792afac8aa6975880a8e1c50009c352ae843692d8cc137b669
7
- data.tar.gz: cb0b379d27bd13fc58f4a02d997bef287d5ceaba9825027e0622686edbaae598969afc6faa714419c1cf9de3ff0e4abf01d93a5e4866c07ee49a01f9fb933265
6
+ metadata.gz: 2505ff285da8b29cd42dd8884954c9b47ec01c1213e4c2fe6ea6a8efff71a58c52db0ef665629c0b236f318819ada2d023e566c0bf5f4573c3c3ace4bdd81046
7
+ data.tar.gz: 011375b9f658bc3afb31ae51ae84ac3e4742b38e0d20ff2fce7b04024f42425edb1feff5cf358cbda3da5860893f45c38f7cb1bfd19c72c98dccf030ad6cfeff
data/CHANGELOG.md CHANGED
@@ -1,5 +1,21 @@
1
1
  # Foodcritic Changelog:
2
2
 
3
+ ## [10.4.0](https://github.com/acrmp/foodcritic/tree/v10.4.0) (2017-04-13)
4
+
5
+ [Full Changelog](https://github.com/acrmp/foodcritic/compare/v10.3.1...v10.4.0)
6
+
7
+ **Implemented enhancements:**
8
+
9
+ - Added FC076 to alert when the deprecated `conflicts` metadata is used
10
+ - Added FC077 to alert when the deprecated `replaces` metadata is used
11
+ - Added FC076 to alert when a non-OSI-approved license is used in metadata. You can disable this rule turning off the new `opensource` tag. For example: `foodcritic -t ~opensource .`
12
+
13
+ **Fixed bugs:**
14
+
15
+ - Regression tests now ignore .foodcritic files so we see all possible failures
16
+ - FC053 / FC052 updated to properly refer the metadata as deprecated and not unimplemented
17
+ - FC071 no longer alerts when cookbooks are licensed as "All Rights Reserved"
18
+
3
19
  ## [10.3.1](https://github.com/acrmp/foodcritic/tree/v10.3.1) (2017-04-10)
4
20
 
5
21
  [Full Changelog](https://github.com/acrmp/foodcritic/compare/v10.3.0...v10.3.1)
data/Rakefile CHANGED
@@ -74,7 +74,7 @@ task :regen_regression do
74
74
  checkout_cmd = Mixlib::ShellOut.new("git", "checkout", ref, cwd: temp)
75
75
  checkout_cmd.run_command
76
76
  checkout_cmd.error!
77
- fc_cmd = Mixlib::ShellOut.new(File.expand_path("../bin/foodcritic", __FILE__), "--no-progress", ".", cwd: temp)
77
+ fc_cmd = Mixlib::ShellOut.new("#{File.expand_path("../bin/foodcritic", __FILE__)} --tags any --no-progress .", cwd: temp)
78
78
  fc_cmd.run_command
79
79
  out_path = File.expand_path("../spec/regression/expected/#{name}.txt", __FILE__)
80
80
  IO.write(out_path, fc_cmd.stdout)
@@ -62,8 +62,8 @@ module FoodCritic
62
62
  "FC049" => "Role name does not match containing file name",
63
63
  "FC050" => "Name includes invalid characters",
64
64
  "FC051" => "Template partials loop indefinitely",
65
- "FC052" => 'Metadata uses the unimplemented "suggests" keyword',
66
- "FC053" => 'Metadata uses the unimplemented "recommends" keyword',
65
+ "FC052" => 'Metadata uses the deprecated "suggests" keyword',
66
+ "FC053" => 'Metadata uses the deprecated "recommends" keyword',
67
67
  # FC054 was yanked and is considered reserved, do not reuse it
68
68
  "FC055" => "Ensure maintainer is set in metadata",
69
69
  "FC056" => "Ensure maintainer_email is set in metadata",
@@ -1,4 +1,4 @@
1
- rule "FC052", 'Metadata uses the unimplemented "suggests" keyword' do
1
+ rule "FC052", 'Metadata uses the deprecated "suggests" keyword' do
2
2
  tags %w{style metadata deprecated}
3
3
  metadata do |ast, filename|
4
4
  ast.xpath(%q{//command[ident/@value='suggests']})
@@ -1,4 +1,4 @@
1
- rule "FC053", 'Metadata uses the unimplemented "recommends" keyword' do
1
+ rule "FC053", 'Metadata uses the deprecated "recommends" keyword' do
2
2
  tags %w{style metadata deprecated}
3
3
  metadata do |ast, filename|
4
4
  ast.xpath(%q{//command[ident/@value='recommends']})
@@ -1,6 +1,8 @@
1
1
  rule "FC071", "Missing LICENSE file" do
2
2
  tags %w{style license}
3
3
  cookbook do |path|
4
- ensure_file_exists(path, "LICENSE")
4
+ unless ::File.exist?("metadata.rb") && field_value(read_ast("metadata.rb"), "license") == "All Rights Reserved"
5
+ ensure_file_exists(path, "LICENSE")
6
+ end
5
7
  end
6
8
  end
@@ -0,0 +1,6 @@
1
+ rule "FC076", 'Metadata uses the deprecated "conflicts" keyword' do
2
+ tags %w{metadata deprecated chef13}
3
+ metadata do |ast, filename|
4
+ [file_match(filename)] if field(ast, "conflicts").any?
5
+ end
6
+ end
@@ -0,0 +1,6 @@
1
+ rule "FC077", 'Metadata uses the deprecated "replaces" keyword' do
2
+ tags %w{metadata deprecated chef13}
3
+ metadata do |ast, filename|
4
+ [file_match(filename)] if field(ast, "replaces").any?
5
+ end
6
+ end
@@ -0,0 +1,135 @@
1
+ rule "FC078", "Ensure cookbook shared under an OSI-approved open source license" do
2
+ tags %w{opensource}
3
+ metadata do |ast, filename|
4
+ begin
5
+ license = ast.xpath(%Q{//command[ident/@value='license']/
6
+ descendant::tstring_content}).attribute("value").to_s
7
+
8
+ # list of valid SPDX.org license strings. To build an array run this:
9
+ # require 'json'
10
+ # require 'net/http'
11
+ # json_data = JSON.parse(Net::HTTP.get(URI('https://raw.githubusercontent.com/spdx/license-list-data/master/json/licenses.json')))
12
+ # licenses = json_data['licenses']
13
+ # .select { |license| license['isOsiApproved'] }
14
+ # .map {|l| l['licenseId'] }
15
+ #
16
+ osi_approved_licenses = %w{
17
+ AFL-1.1
18
+ AFL-1.2
19
+ AFL-2.0
20
+ AFL-2.1
21
+ AFL-3.0
22
+ APL-1.0
23
+ Apache-1.1
24
+ Apache-2.0
25
+ APSL-1.0
26
+ APSL-1.1
27
+ APSL-1.2
28
+ APSL-2.0
29
+ Artistic-1.0
30
+ Artistic-1.0-Perl
31
+ Artistic-1.0-cl8
32
+ Artistic-2.0
33
+ AAL
34
+ BSL-1.0
35
+ BSD-2-Clause
36
+ BSD-3-Clause
37
+ 0BSD
38
+ CECILL-2.1
39
+ CNRI-Python
40
+ CDDL-1.0
41
+ CPAL-1.0
42
+ CPL-1.0
43
+ CATOSL-1.1
44
+ CUA-OPL-1.0
45
+ EPL-1.0
46
+ ECL-1.0
47
+ ECL-2.0
48
+ EFL-1.0
49
+ EFL-2.0
50
+ Entessa
51
+ EUDatagrid
52
+ EUPL-1.1
53
+ Fair
54
+ Frameworx-1.0
55
+ AGPL-3.0
56
+ GPL-2.0
57
+ GPL-3.0
58
+ LGPL-2.1
59
+ LGPL-3.0
60
+ LGPL-2.0
61
+ HPND
62
+ IPL-1.0
63
+ Intel
64
+ IPA
65
+ ISC
66
+ LPPL-1.3c
67
+ LiLiQ-P-1.1
68
+ LiLiQ-Rplus-1.1
69
+ LiLiQ-R-1.1
70
+ LPL-1.02
71
+ LPL-1.0
72
+ MS-PL
73
+ MS-RL
74
+ MirOS
75
+ MIT
76
+ Motosoto
77
+ MPL-1.0
78
+ MPL-1.1
79
+ MPL-2.0
80
+ MPL-2.0-no-copyleft-exception
81
+ Multics
82
+ NASA-1.3
83
+ Naumen
84
+ NGPL
85
+ Nokia
86
+ NPOSL-3.0
87
+ NTP
88
+ OCLC-2.0
89
+ OGTSL
90
+ OSL-1.0
91
+ OSL-2.0
92
+ OSL-2.1
93
+ OSL-3.0
94
+ OSET-PL-2.1
95
+ PHP-3.0
96
+ PostgreSQL
97
+ Python-2.0
98
+ QPL-1.0
99
+ RPSL-1.0
100
+ RPL-1.1
101
+ RPL-1.5
102
+ RSCPL
103
+ OFL-1.1
104
+ SimPL-2.0
105
+ Sleepycat
106
+ SISSL
107
+ SPL-1.0
108
+ Watcom-1.0
109
+ UPL-1.0
110
+ NCSA
111
+ VSL-1.0
112
+ W3C
113
+ Xnet
114
+ Zlib
115
+ ZPL-2.0
116
+ GPL-2.0+
117
+ GPL-2.0-with-autoconf-exception
118
+ GPL-2.0-with-bison-exception
119
+ GPL-2.0-with-classpath-exception
120
+ GPL-2.0-with-font-exception
121
+ GPL-2.0-with-GCC-exception
122
+ GPL-3.0+
123
+ GPL-3.0-with-autoconf-exception
124
+ GPL-3.0-with-GCC-exception
125
+ LGPL-2.1+
126
+ LGPL-3.0+
127
+ LGPL-2.0+
128
+ WXwindows
129
+ }
130
+ [file_match(filename)] unless osi_approved_licenses.include?(license)
131
+ rescue NoMethodError # no license in the metadata
132
+ [file_match(filename)]
133
+ end
134
+ end
135
+ end
@@ -1,4 +1,4 @@
1
1
  module FoodCritic
2
2
  # The current version of foodcritic
3
- VERSION = "10.3.1"
3
+ VERSION = "10.4.0"
4
4
  end
@@ -11,4 +11,9 @@ describe "FC071" do
11
11
  metadata_file "name 'mycookbook'"
12
12
  it { is_expected.to violate_rule("FC071") }
13
13
  end
14
+
15
+ context "with a cookbook without a LICENSE file but with license of 'All Rights Reserved'" do
16
+ metadata_file "license 'All Rights Reserved'"
17
+ it { is_expected.not_to violate_rule("FC071") }
18
+ end
14
19
  end
@@ -0,0 +1,13 @@
1
+ require "spec_helper"
2
+
3
+ describe "FC076" do
4
+ context "with a cookbook with a metadata file that does contain the conflicts keyword" do
5
+ metadata_file "conflicts 'runit'"
6
+ it { is_expected.to violate_rule("FC076") }
7
+ end
8
+
9
+ context "with a cookbook with a metadata file that does not contain the conflicts keyword" do
10
+ metadata_file
11
+ it { is_expected.to_not violate_rule("FC076") }
12
+ end
13
+ end
@@ -0,0 +1,13 @@
1
+ require "spec_helper"
2
+
3
+ describe "FC077" do
4
+ context "with a cookbook with a metadata file that does contain the replaces keyword" do
5
+ metadata_file "replaces 'runit'"
6
+ it { is_expected.to violate_rule("FC077") }
7
+ end
8
+
9
+ context "with a cookbook with a metadata file that does not contain the replaces keyword" do
10
+ metadata_file
11
+ it { is_expected.to_not violate_rule("FC077") }
12
+ end
13
+ end
@@ -0,0 +1,25 @@
1
+ require "spec_helper"
2
+
3
+ describe "FC078" do
4
+ context "with a cookbook with a metadata file that specifies" do
5
+ context "a license generated by knife cookbook create" do
6
+ metadata_file "license 'Apache 2.0'"
7
+ it { is_expected.to violate_rule("FC078") }
8
+ end
9
+
10
+ context "a license generated by chef generate cookbook" do
11
+ metadata_file "license 'apache_2'"
12
+ it { is_expected.to violate_rule("FC078") }
13
+ end
14
+
15
+ context "a valid OSI-approved open source license in SPDX format" do
16
+ metadata_file "license 'Apache-2.0'"
17
+ it { is_expected.to_not violate_rule("FC078") }
18
+ end
19
+
20
+ context "ChefDK's non-SPDX all rights reserved string" do
21
+ metadata_file "license 'All Rights Reserved'"
22
+ it { is_expected.to violate_rule("FC078") }
23
+ end
24
+ end
25
+ end
@@ -1,16 +1,25 @@
1
1
  activemq:5dce4ca5283d2a6252130a2d800b9387a57d6e01
2
+ aix:f40afb959cc5edc3e838072c6c4f817708657f1b
2
3
  apparmor:fd09a6fda4f6fc722d4c8d5b8a5c815feda280c0
3
4
  apt:ea834265247cc8b507ac37ab3a34a9b44ed27a11
5
+ ark:950ed665bc82c13194cb7c0cac3154a4b73e40c7
6
+ auditd:eff59f9ca300ac0514e8c96769bc3e8e8c22a76a
4
7
  aws:a9530561bf559c6db2cb40a93b125607c5ef3efa
5
8
  bluepill:1d6422afcbc910e587c9639e4e0a28c72727c90b
6
9
  boost:14f30e36040a4fcd038f030d9ee1c7fb29b08b68
7
10
  build-essential:0c636536fb1236f792974f3af38f2950a03ed4b2
8
11
  chef:dac09eea9fa0d611b7b010160d6b8fa7f4d6ae1e
9
12
  chef-client:7fc4472c9913c9cb1762f979e05047a674318ef5
13
+ chef-ingredient:e9c2f58af73d49b5783754757f0a38aa87abd37f
10
14
  chef-server:d98b96d69962c7988b9640fe5bee09f771ba8977
15
+ chef-vault:6ad7e34f9b860dc1b339a0c1814214595098e4b0
16
+ chef_client_updater:01b39eaa81f017cebca3ab3a941683eb962d9bd2
11
17
  chef_handler:d147ca9644f146b97a2d53324ca344321799b45f
18
+ chef_hostname:24776c9ea403a82b5aecc6b1a4a829e892f4db95
19
+ chef_nginx:1f22dd7b7e04e60a1ea9fd0cc4ab980a4be05d4d
12
20
  cron:dce04363b6a02d36f8da88f202cedfae2daa6a2c
13
21
  database:1ab3822ca50824fbdc14f7c89341faa7ae1e90cb
22
+ docker:e0f18072406abf1ade70745a7ef7e5529f00c109
14
23
  dmg:11caf56f57a1168a891f01f0614a01b879aff624
15
24
  drbd:e65b60894b48855163c3a13ead40fb897d66c4b8
16
25
  dynect:5ef2328cc612cc4c36882742367af0e2bdbd0367
@@ -26,9 +35,10 @@ iis:ab7e4823d375e8eb4f927dee5b7ab0591301cb0e
26
35
  iptables:da126cf900af3cc36bf212973bb8d0be69fa2b9f
27
36
  jetty:d165775c2c7ce3cc484cbe8c7aadf6649505d078
28
37
  jpackage:23e6f4b717620455ee9d29cbf82d9a7ab7fa6e5b
29
- keepalived:629c8e4c5251f6125be9f6eacecb1369fcb1cd4c
38
+ keepalived:0c8bc5ea5aba93b5bc58ebea8661c1e1762ea463
30
39
  kickstart:6523fca008362ed72f8fbb25f0c7af70d563b96d
31
40
  logwatch:706174796a3bc1d85d57d3aee792e78cb13570ac
41
+ libarchive:5f21a614017c7cffb3fe7f56185c0b988fad7826
32
42
  lvm:57bd5291fbaa41e7a13f25c4553cdacbfc3ad3dd
33
43
  maradns:e975ded4303432629ad37234cb7a05c9d6edcf73
34
44
  maven:e486321f1e89f7ad2b9700c08fcbc68c32daa599
@@ -48,26 +58,26 @@ powershell:4b175affe1a8a7d091a8ca905a580bf975af5edc
48
58
  resolver:105ad0a2fc9c065a7c4455cfc07ab7771b8e0da0
49
59
  rsync:41756f404fc39f3ce407cce9fe03294dd907c0fe
50
60
  rsyslog:8830d558d2ee3126fef56ea3a25a4f0253ce269f
61
+ runit:92c60395a0727bc4941b58e95a4d67cc163a2b98
62
+ smokeping:db0b62ab6d71a782d378c550d37464f024abe144
51
63
  sql_server:d9702f8fc29f208c9e712627cda64ccae2d71321
52
- sqlite:3efb50f4166f04f1afefa21f7f8fe7e9082b37ed
53
64
  ssh_known_hosts:a89f0c32e8e2c408a2e153153cc703f1184c6b72
54
65
  stompserver:bf81830bb7783f4198565201c825c23267e1d515
55
66
  subversion:cad4c069deca1fbbfb6b8f4d21b6c341cc9c6b55
56
67
  sudo:00d024f293afb9df4fea23ba127529d67c1daf14
68
+ tar:8586d01346324f413fea9c4b48a214f5e12d3a49
57
69
  tftp:f4016b14eae2c0fe7fb48020bf28039c2de043a4
58
- tomcat:8934392833cef89b7b779b4cd36ad46d088b643b
70
+ tomcat:a99c916e8ec00b2e008c16e8b4aa9adcffbb1056
59
71
  transmission:c3d62aa4741a55b693630d9cc48b012ff22d2e7b
60
72
  ubuntu:7d21b626873ee397755d59aa222cf7fa681f6e90
61
73
  ufw:6bc6de62a84f6fa6f172edf0a490f1a332e89e29
62
74
  unicorn:bacbb2400dcb476dd53784aa965fa9329e8c3869
63
75
  users:c51c96afca83b382678dc21b8deb25677e6a3d8a
76
+ vcruntime:87ea6e2bb16871ec132f03ca014e481e473f958a
64
77
  vim:88e8d018267d2cd5cfa3260ce55a0025f52dae6f
65
78
  webpi:6cb4fde9dedf2abc980fa49880753512baa26b23
66
79
  whitelist-node-attrs:2d76a2d179096e3ab048547d0d7849238ac2a5d3
67
80
  windows:1601558f5fce30bed47bfc6d458a80891e127c61
68
81
  wix:422b8da1dcf706bb4742d83abc44a649522afe83
69
- xfs:7f1033820459324a863b2955e774cfa366fbc70f
70
82
  xml:0b538834aa26c4df5918aa193029d285d7b1d4de
71
83
  yum:b1191511b011790b2fc5c35cfbc78d0cc7bbc5b8
72
- zlib:45342f78d2866c3b2f443e693df562317e37963d
73
- zsh:3bff82836677564478ffc90dfb487ffc986702f3
@@ -0,0 +1 @@
1
+ FC069: Ensure standardized license defined in metadata: ./metadata.rb:1
@@ -0,0 +1 @@
1
+ FC069: Ensure standardized license defined in metadata: ./metadata.rb:1
@@ -0,0 +1,5 @@
1
+ FC017: LWRP does not notify when updated: ./providers/builtins.rb:22
2
+ FC017: LWRP does not notify when updated: ./providers/ruleset.rb:21
3
+ FC059: LWRP provider does not declare use_inline_resources: ./providers/builtins.rb:1
4
+ FC059: LWRP provider does not declare use_inline_resources: ./providers/ruleset.rb:1
5
+ FC069: Ensure standardized license defined in metadata: ./metadata.rb:1
@@ -1,5 +1,5 @@
1
1
  FC007: Ensure recipe dependencies are reflected in cookbook metadata: ./recipes/source.rb:1
2
- FC053: Metadata uses the unimplemented "recommends" keyword: ./metadata.rb:12
2
+ FC053: Metadata uses the deprecated "recommends" keyword: ./metadata.rb:12
3
3
  FC064: Ensure issues_url is set in metadata: ./metadata.rb:1
4
4
  FC065: Ensure source_url is set in metadata: ./metadata.rb:1
5
5
  FC066: Ensure chef_version is set in metadata: ./metadata.rb:1
@@ -1,5 +1,5 @@
1
1
  FC007: Ensure recipe dependencies are reflected in cookbook metadata: ./recipes/default.rb:65
2
- FC052: Metadata uses the unimplemented "suggests" keyword: ./metadata.rb:14
2
+ FC052: Metadata uses the deprecated "suggests" keyword: ./metadata.rb:14
3
3
  FC064: Ensure issues_url is set in metadata: ./metadata.rb:1
4
4
  FC065: Ensure source_url is set in metadata: ./metadata.rb:1
5
5
  FC066: Ensure chef_version is set in metadata: ./metadata.rb:1
@@ -0,0 +1,2 @@
1
+ FC067: Ensure at least one platform supported in metadata: ./metadata.rb:1
2
+ FC069: Ensure standardized license defined in metadata: ./metadata.rb:1
@@ -1,4 +1,3 @@
1
- FC064: Ensure issues_url is set in metadata: ./metadata.rb:1
2
- FC065: Ensure source_url is set in metadata: ./metadata.rb:1
3
1
  FC066: Ensure chef_version is set in metadata: ./metadata.rb:1
2
+ FC067: Ensure at least one platform supported in metadata: ./metadata.rb:1
4
3
  FC069: Ensure standardized license defined in metadata: ./metadata.rb:1
@@ -0,0 +1 @@
1
+ FC070: Ensure supports metadata defines valid platforms: ./metadata.rb:1
@@ -0,0 +1,2 @@
1
+ FC069: Ensure standardized license defined in metadata: ./metadata.rb:1
2
+ FC070: Ensure supports metadata defines valid platforms: ./metadata.rb:1
@@ -0,0 +1,2 @@
1
+ FC015: Consider converting definition to a Custom Resource: ./definitions/nginx_site.rb:1
2
+ FC069: Ensure standardized license defined in metadata: ./metadata.rb:1
@@ -0,0 +1,2 @@
1
+ FC005: Avoid repetition of resource declarations: ./libraries/docker_service_manager_sysvinit_debian.rb:5
2
+ FC069: Ensure standardized license defined in metadata: ./metadata.rb:1
@@ -1,4 +1,2 @@
1
- FC064: Ensure issues_url is set in metadata: ./metadata.rb:1
2
- FC065: Ensure source_url is set in metadata: ./metadata.rb:1
3
1
  FC066: Ensure chef_version is set in metadata: ./metadata.rb:1
4
2
  FC069: Ensure standardized license defined in metadata: ./metadata.rb:1
@@ -1,3 +1,4 @@
1
+ FC059: LWRP provider does not declare use_inline_resources: ./providers/file.rb:1
1
2
  FC064: Ensure issues_url is set in metadata: ./metadata.rb:1
2
3
  FC065: Ensure source_url is set in metadata: ./metadata.rb:1
3
4
  FC066: Ensure chef_version is set in metadata: ./metadata.rb:1
@@ -3,8 +3,8 @@ FC002: Avoid string interpolation where not required: ./attributes/server.rb:206
3
3
  FC002: Avoid string interpolation where not required: ./attributes/server.rb:207
4
4
  FC002: Avoid string interpolation where not required: ./attributes/server.rb:208
5
5
  FC007: Ensure recipe dependencies are reflected in cookbook metadata: ./recipes/client.rb:42
6
- FC052: Metadata uses the unimplemented "suggests" keyword: ./metadata.rb:19
7
- FC052: Metadata uses the unimplemented "suggests" keyword: ./metadata.rb:20
6
+ FC052: Metadata uses the deprecated "suggests" keyword: ./metadata.rb:19
7
+ FC052: Metadata uses the deprecated "suggests" keyword: ./metadata.rb:20
8
8
  FC064: Ensure issues_url is set in metadata: ./metadata.rb:1
9
9
  FC065: Ensure source_url is set in metadata: ./metadata.rb:1
10
10
  FC066: Ensure chef_version is set in metadata: ./metadata.rb:1
@@ -0,0 +1,2 @@
1
+ FC004: Use a service resource to start and stop services: ./recipes/default.rb:24
2
+ FC069: Ensure standardized license defined in metadata: ./metadata.rb:1
@@ -1,4 +1,3 @@
1
- FC064: Ensure issues_url is set in metadata: ./metadata.rb:1
2
- FC065: Ensure source_url is set in metadata: ./metadata.rb:1
1
+ FC059: LWRP provider does not declare use_inline_resources: ./providers/target.rb:1
3
2
  FC066: Ensure chef_version is set in metadata: ./metadata.rb:1
4
3
  FC069: Ensure standardized license defined in metadata: ./metadata.rb:1
@@ -1,4 +1,7 @@
1
1
  FC064: Ensure issues_url is set in metadata: ./metadata.rb:1
2
2
  FC065: Ensure source_url is set in metadata: ./metadata.rb:1
3
3
  FC066: Ensure chef_version is set in metadata: ./metadata.rb:1
4
+ FC067: Ensure at least one platform supported in metadata: ./metadata.rb:1
4
5
  FC069: Ensure standardized license defined in metadata: ./metadata.rb:1
6
+ FC071: Missing LICENSE file: ./LICENSE:1
7
+ FC074: LWRP should use DSL to define resource's default action: ./resources/package.rb:1
@@ -1,8 +1 @@
1
- FC043: Prefer new notification syntax: ./recipes/default.rb:50
2
- FC043: Prefer new notification syntax: ./recipes/default.rb:58
3
- FC043: Prefer new notification syntax: ./recipes/default.rb:67
4
- FC043: Prefer new notification syntax: ./recipes/users.rb:22
5
- FC064: Ensure issues_url is set in metadata: ./metadata.rb:1
6
- FC065: Ensure source_url is set in metadata: ./metadata.rb:1
7
- FC066: Ensure chef_version is set in metadata: ./metadata.rb:1
8
1
  FC069: Ensure standardized license defined in metadata: ./metadata.rb:1
@@ -0,0 +1,7 @@
1
+ FC009: Resource attribute not recognised: ./recipes/vc10.rb:24
2
+ FC009: Resource attribute not recognised: ./recipes/vc11.rb:24
3
+ FC009: Resource attribute not recognised: ./recipes/vc12.rb:24
4
+ FC009: Resource attribute not recognised: ./recipes/vc14.rb:24
5
+ FC009: Resource attribute not recognised: ./recipes/vc6.rb:24
6
+ FC009: Resource attribute not recognised: ./recipes/vc9.rb:24
7
+ FC069: Ensure standardized license defined in metadata: ./metadata.rb:1
@@ -1,7 +1,7 @@
1
1
  require "spec_helper"
2
2
 
3
3
  describe "regression test" do
4
- command("#{File.expand_path("../../../bin/foodcritic", __FILE__)} .", allow_error: true)
4
+ command("#{File.expand_path("../../../bin/foodcritic", __FILE__)} --tags any .", allow_error: true)
5
5
 
6
6
  IO.readlines(File.expand_path("../cookbooks.txt", __FILE__)).each do |line|
7
7
  name, ref = line.strip.split(":")
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: foodcritic
3
3
  version: !ruby/object:Gem::Version
4
- version: 10.3.1
4
+ version: 10.4.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Andrew Crump
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2017-04-10 00:00:00.000000000 Z
11
+ date: 2017-04-13 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: cucumber-core
@@ -324,6 +324,9 @@ files:
324
324
  - lib/foodcritic/rules/fc073.rb
325
325
  - lib/foodcritic/rules/fc074.rb
326
326
  - lib/foodcritic/rules/fc075.rb
327
+ - lib/foodcritic/rules/fc076.rb
328
+ - lib/foodcritic/rules/fc077.rb
329
+ - lib/foodcritic/rules/fc078.rb
327
330
  - lib/foodcritic/template.rb
328
331
  - lib/foodcritic/version.rb
329
332
  - lib/foodcritic/xml.rb
@@ -384,22 +387,34 @@ files:
384
387
  - spec/functional/fc073_spec.rb
385
388
  - spec/functional/fc074_spec.rb
386
389
  - spec/functional/fc075_spec.rb
390
+ - spec/functional/fc076_spec.rb
391
+ - spec/functional/fc077_spec.rb
392
+ - spec/functional/fc078_spec.rb
387
393
  - spec/functional/root_aliases_spec.rb
388
394
  - spec/regression/cookbooks.txt
389
395
  - spec/regression/expected/activemq.txt
396
+ - spec/regression/expected/aix.txt
390
397
  - spec/regression/expected/apparmor.txt
391
398
  - spec/regression/expected/apt.txt
399
+ - spec/regression/expected/ark.txt
400
+ - spec/regression/expected/auditd.txt
392
401
  - spec/regression/expected/aws.txt
393
402
  - spec/regression/expected/bluepill.txt
394
403
  - spec/regression/expected/boost.txt
395
404
  - spec/regression/expected/build-essential.txt
396
405
  - spec/regression/expected/chef-client.txt
406
+ - spec/regression/expected/chef-ingredient.txt
397
407
  - spec/regression/expected/chef-server.txt
408
+ - spec/regression/expected/chef-vault.txt
398
409
  - spec/regression/expected/chef.txt
410
+ - spec/regression/expected/chef_client_updater.txt
399
411
  - spec/regression/expected/chef_handler.txt
412
+ - spec/regression/expected/chef_hostname.txt
413
+ - spec/regression/expected/chef_nginx.txt
400
414
  - spec/regression/expected/cron.txt
401
415
  - spec/regression/expected/database.txt
402
416
  - spec/regression/expected/dmg.txt
417
+ - spec/regression/expected/docker.txt
403
418
  - spec/regression/expected/drbd.txt
404
419
  - spec/regression/expected/dynect.txt
405
420
  - spec/regression/expected/erlang.txt
@@ -416,6 +431,7 @@ files:
416
431
  - spec/regression/expected/jpackage.txt
417
432
  - spec/regression/expected/keepalived.txt
418
433
  - spec/regression/expected/kickstart.txt
434
+ - spec/regression/expected/libarchive.txt
419
435
  - spec/regression/expected/logwatch.txt
420
436
  - spec/regression/expected/lvm.txt
421
437
  - spec/regression/expected/maradns.txt
@@ -436,12 +452,14 @@ files:
436
452
  - spec/regression/expected/resolver.txt
437
453
  - spec/regression/expected/rsync.txt
438
454
  - spec/regression/expected/rsyslog.txt
455
+ - spec/regression/expected/runit.txt
456
+ - spec/regression/expected/smokeping.txt
439
457
  - spec/regression/expected/sql_server.txt
440
- - spec/regression/expected/sqlite.txt
441
458
  - spec/regression/expected/ssh_known_hosts.txt
442
459
  - spec/regression/expected/stompserver.txt
443
460
  - spec/regression/expected/subversion.txt
444
461
  - spec/regression/expected/sudo.txt
462
+ - spec/regression/expected/tar.txt
445
463
  - spec/regression/expected/tftp.txt
446
464
  - spec/regression/expected/tomcat.txt
447
465
  - spec/regression/expected/transmission.txt
@@ -449,16 +467,14 @@ files:
449
467
  - spec/regression/expected/ufw.txt
450
468
  - spec/regression/expected/unicorn.txt
451
469
  - spec/regression/expected/users.txt
470
+ - spec/regression/expected/vcruntime.txt
452
471
  - spec/regression/expected/vim.txt
453
472
  - spec/regression/expected/webpi.txt
454
473
  - spec/regression/expected/whitelist-node-attrs.txt
455
474
  - spec/regression/expected/windows.txt
456
475
  - spec/regression/expected/wix.txt
457
- - spec/regression/expected/xfs.txt
458
476
  - spec/regression/expected/xml.txt
459
477
  - spec/regression/expected/yum.txt
460
- - spec/regression/expected/zlib.txt
461
- - spec/regression/expected/zsh.txt
462
478
  - spec/regression/regression_spec.rb
463
479
  - spec/spec_helper.rb
464
480
  - spec/unit/api_spec.rb
@@ -490,5 +506,5 @@ rubyforge_project:
490
506
  rubygems_version: 2.6.11
491
507
  signing_key:
492
508
  specification_version: 4
493
- summary: foodcritic-10.3.1
509
+ summary: foodcritic-10.4.0
494
510
  test_files: []