foodcritic 2.2.0 → 3.0.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (76) hide show
  1. checksums.yaml +15 -0
  2. data/CHANGELOG.md +83 -0
  3. data/chef_dsl_metadata/chef_0.10.0.json +2 -3
  4. data/chef_dsl_metadata/chef_0.10.10.json +2 -3
  5. data/chef_dsl_metadata/chef_0.10.2.json +2 -3
  6. data/chef_dsl_metadata/chef_0.10.4.json +2 -3
  7. data/chef_dsl_metadata/chef_0.10.6.json +2 -3
  8. data/chef_dsl_metadata/chef_0.10.8.json +2 -3
  9. data/chef_dsl_metadata/chef_0.8.14.json +2 -3
  10. data/chef_dsl_metadata/chef_0.8.16.json +2 -3
  11. data/chef_dsl_metadata/chef_0.9.0.json +2 -3
  12. data/chef_dsl_metadata/chef_0.9.10.json +2 -3
  13. data/chef_dsl_metadata/chef_0.9.12.json +2 -3
  14. data/chef_dsl_metadata/chef_0.9.14.json +2 -3
  15. data/chef_dsl_metadata/chef_0.9.16.json +2 -3
  16. data/chef_dsl_metadata/chef_0.9.18.json +2 -3
  17. data/chef_dsl_metadata/chef_0.9.2.json +2 -3
  18. data/chef_dsl_metadata/chef_0.9.4.json +2 -3
  19. data/chef_dsl_metadata/chef_0.9.6.json +2 -3
  20. data/chef_dsl_metadata/chef_0.9.8.json +2 -3
  21. data/chef_dsl_metadata/chef_10.12.0.json +2 -3
  22. data/chef_dsl_metadata/chef_10.14.0.json +2 -3
  23. data/chef_dsl_metadata/chef_10.14.2.json +2 -3
  24. data/chef_dsl_metadata/chef_10.14.4.json +2 -3
  25. data/chef_dsl_metadata/chef_10.16.0.json +2 -3
  26. data/chef_dsl_metadata/chef_10.16.2.json +2 -3
  27. data/chef_dsl_metadata/chef_10.16.4.json +2 -3
  28. data/chef_dsl_metadata/chef_10.16.6.json +2 -3
  29. data/chef_dsl_metadata/chef_10.18.0.json +2 -3
  30. data/chef_dsl_metadata/chef_10.18.2.json +2 -3
  31. data/chef_dsl_metadata/chef_10.20.0.json +2 -3
  32. data/chef_dsl_metadata/chef_10.22.0.json +2 -3
  33. data/chef_dsl_metadata/chef_10.24.0.json +2 -3
  34. data/chef_dsl_metadata/chef_10.24.4.json +2 -3
  35. data/chef_dsl_metadata/chef_10.26.0.json +2 -3
  36. data/chef_dsl_metadata/chef_11.0.0.json +2 -3
  37. data/chef_dsl_metadata/chef_11.2.0.json +2 -3
  38. data/chef_dsl_metadata/chef_11.4.0.json +2 -3
  39. data/chef_dsl_metadata/chef_11.4.2.json +2 -3
  40. data/chef_dsl_metadata/chef_11.4.4.json +2 -3
  41. data/chef_dsl_metadata/chef_11.6.0.json +9734 -0
  42. data/features/007_check_for_undeclared_recipe_dependencies.feature +18 -34
  43. data/features/017_check_for_no_lwrp_notifications.feature +25 -0
  44. data/features/019_check_for_consistent_node_access.feature +1 -0
  45. data/features/033_check_for_missing_template.feature +20 -64
  46. data/features/034_check_for_unused_template_variables.feature +44 -0
  47. data/features/047_check_for_attribute_assignment_without_precedence.feature +47 -0
  48. data/features/048_check_for_shellout.feature +34 -0
  49. data/features/049_check_for_role_name_mismatch_with_file_name.feature +31 -0
  50. data/features/050_check_for_invalid_name.feature +33 -0
  51. data/features/051_check_for_template_partial_loops.feature +21 -0
  52. data/features/command_line_help.feature +15 -0
  53. data/features/ignore_via_line_comments.feature +18 -0
  54. data/features/individual_file.feature +17 -1
  55. data/features/multiple_paths.feature +26 -2
  56. data/features/step_definitions/cookbook_steps.rb +328 -9
  57. data/features/support/command_helpers.rb +71 -10
  58. data/features/support/cookbook_helpers.rb +88 -6
  59. data/lib/foodcritic/api.rb +89 -20
  60. data/lib/foodcritic/command_line.rb +64 -18
  61. data/lib/foodcritic/domain.rb +26 -7
  62. data/lib/foodcritic/dsl.rb +3 -0
  63. data/lib/foodcritic/linter.rb +93 -61
  64. data/lib/foodcritic/rake_task.rb +3 -2
  65. data/lib/foodcritic/rules.rb +105 -14
  66. data/lib/foodcritic/template.rb +34 -1
  67. data/lib/foodcritic/version.rb +1 -1
  68. data/man/foodcritic.1 +13 -1
  69. data/man/foodcritic.1.ronn +9 -0
  70. data/spec/foodcritic/api_spec.rb +210 -1
  71. data/spec/foodcritic/command_line_spec.rb +13 -0
  72. data/spec/foodcritic/domain_spec.rb +40 -5
  73. data/spec/foodcritic/linter_spec.rb +19 -22
  74. data/spec/foodcritic/template_spec.rb +8 -4
  75. data/spec/regression/expected-output.txt +139 -60
  76. metadata +31 -26
@@ -442,7 +442,8 @@
442
442
  "nothing"
443
443
  ],
444
444
  "log": [
445
- "nothing"
445
+ "nothing",
446
+ "write"
446
447
  ],
447
448
  "macports_package": [
448
449
  "install",
@@ -496,8 +497,6 @@
496
497
  ],
497
498
  "remote_directory": [
498
499
  "create",
499
- "create",
500
- "delete",
501
500
  "delete",
502
501
  "nothing"
503
502
  ],
@@ -444,7 +444,8 @@
444
444
  "nothing"
445
445
  ],
446
446
  "log": [
447
- "nothing"
447
+ "nothing",
448
+ "write"
448
449
  ],
449
450
  "macports_package": [
450
451
  "install",
@@ -498,8 +499,6 @@
498
499
  ],
499
500
  "remote_directory": [
500
501
  "create",
501
- "create",
502
- "delete",
503
502
  "delete",
504
503
  "nothing"
505
504
  ],
@@ -464,7 +464,8 @@
464
464
  "nothing"
465
465
  ],
466
466
  "log": [
467
- "nothing"
467
+ "nothing",
468
+ "write"
468
469
  ],
469
470
  "macports_package": [
470
471
  "install",
@@ -525,11 +526,9 @@
525
526
  "run"
526
527
  ],
527
528
  "remote_directory": [
528
- "create",
529
529
  "create",
530
530
  "create_if_missing",
531
531
  "delete",
532
- "delete",
533
532
  "nothing"
534
533
  ],
535
534
  "remote_file": [
@@ -469,7 +469,8 @@
469
469
  "nothing"
470
470
  ],
471
471
  "log": [
472
- "nothing"
472
+ "nothing",
473
+ "write"
473
474
  ],
474
475
  "macports_package": [
475
476
  "install",
@@ -530,11 +531,9 @@
530
531
  "run"
531
532
  ],
532
533
  "remote_directory": [
533
- "create",
534
534
  "create",
535
535
  "create_if_missing",
536
536
  "delete",
537
- "delete",
538
537
  "nothing"
539
538
  ],
540
539
  "remote_file": [
@@ -469,7 +469,8 @@
469
469
  "nothing"
470
470
  ],
471
471
  "log": [
472
- "nothing"
472
+ "nothing",
473
+ "write"
473
474
  ],
474
475
  "macports_package": [
475
476
  "install",
@@ -530,11 +531,9 @@
530
531
  "run"
531
532
  ],
532
533
  "remote_directory": [
533
- "create",
534
534
  "create",
535
535
  "create_if_missing",
536
536
  "delete",
537
- "delete",
538
537
  "nothing"
539
538
  ],
540
539
  "remote_file": [
@@ -469,7 +469,8 @@
469
469
  "nothing"
470
470
  ],
471
471
  "log": [
472
- "nothing"
472
+ "nothing",
473
+ "write"
473
474
  ],
474
475
  "macports_package": [
475
476
  "install",
@@ -530,11 +531,9 @@
530
531
  "run"
531
532
  ],
532
533
  "remote_directory": [
533
- "create",
534
534
  "create",
535
535
  "create_if_missing",
536
536
  "delete",
537
- "delete",
538
537
  "nothing"
539
538
  ],
540
539
  "remote_file": [
@@ -469,7 +469,8 @@
469
469
  "nothing"
470
470
  ],
471
471
  "log": [
472
- "nothing"
472
+ "nothing",
473
+ "write"
473
474
  ],
474
475
  "macports_package": [
475
476
  "install",
@@ -530,11 +531,9 @@
530
531
  "run"
531
532
  ],
532
533
  "remote_directory": [
533
- "create",
534
534
  "create",
535
535
  "create_if_missing",
536
536
  "delete",
537
- "delete",
538
537
  "nothing"
539
538
  ],
540
539
  "remote_file": [
@@ -469,7 +469,8 @@
469
469
  "nothing"
470
470
  ],
471
471
  "log": [
472
- "nothing"
472
+ "nothing",
473
+ "write"
473
474
  ],
474
475
  "macports_package": [
475
476
  "install",
@@ -530,11 +531,9 @@
530
531
  "run"
531
532
  ],
532
533
  "remote_directory": [
533
- "create",
534
534
  "create",
535
535
  "create_if_missing",
536
536
  "delete",
537
- "delete",
538
537
  "nothing"
539
538
  ],
540
539
  "remote_file": [
@@ -469,7 +469,8 @@
469
469
  "nothing"
470
470
  ],
471
471
  "log": [
472
- "nothing"
472
+ "nothing",
473
+ "write"
473
474
  ],
474
475
  "macports_package": [
475
476
  "install",
@@ -530,11 +531,9 @@
530
531
  "run"
531
532
  ],
532
533
  "remote_directory": [
533
- "create",
534
534
  "create",
535
535
  "create_if_missing",
536
536
  "delete",
537
- "delete",
538
537
  "nothing"
539
538
  ],
540
539
  "remote_file": [
@@ -469,7 +469,8 @@
469
469
  "nothing"
470
470
  ],
471
471
  "log": [
472
- "nothing"
472
+ "nothing",
473
+ "write"
473
474
  ],
474
475
  "macports_package": [
475
476
  "install",
@@ -530,11 +531,9 @@
530
531
  "run"
531
532
  ],
532
533
  "remote_directory": [
533
- "create",
534
534
  "create",
535
535
  "create_if_missing",
536
536
  "delete",
537
- "delete",
538
537
  "nothing"
539
538
  ],
540
539
  "remote_file": [
@@ -469,7 +469,8 @@
469
469
  "nothing"
470
470
  ],
471
471
  "log": [
472
- "nothing"
472
+ "nothing",
473
+ "write"
473
474
  ],
474
475
  "macports_package": [
475
476
  "install",
@@ -530,11 +531,9 @@
530
531
  "run"
531
532
  ],
532
533
  "remote_directory": [
533
- "create",
534
534
  "create",
535
535
  "create_if_missing",
536
536
  "delete",
537
- "delete",
538
537
  "nothing"
539
538
  ],
540
539
  "remote_file": [
@@ -469,7 +469,8 @@
469
469
  "nothing"
470
470
  ],
471
471
  "log": [
472
- "nothing"
472
+ "nothing",
473
+ "write"
473
474
  ],
474
475
  "macports_package": [
475
476
  "install",
@@ -530,11 +531,9 @@
530
531
  "run"
531
532
  ],
532
533
  "remote_directory": [
533
- "create",
534
534
  "create",
535
535
  "create_if_missing",
536
536
  "delete",
537
- "delete",
538
537
  "nothing"
539
538
  ],
540
539
  "remote_file": [
@@ -469,7 +469,8 @@
469
469
  "nothing"
470
470
  ],
471
471
  "log": [
472
- "nothing"
472
+ "nothing",
473
+ "write"
473
474
  ],
474
475
  "macports_package": [
475
476
  "install",
@@ -530,11 +531,9 @@
530
531
  "run"
531
532
  ],
532
533
  "remote_directory": [
533
- "create",
534
534
  "create",
535
535
  "create_if_missing",
536
536
  "delete",
537
- "delete",
538
537
  "nothing"
539
538
  ],
540
539
  "remote_file": [
@@ -469,7 +469,8 @@
469
469
  "nothing"
470
470
  ],
471
471
  "log": [
472
- "nothing"
472
+ "nothing",
473
+ "write"
473
474
  ],
474
475
  "macports_package": [
475
476
  "install",
@@ -530,11 +531,9 @@
530
531
  "run"
531
532
  ],
532
533
  "remote_directory": [
533
- "create",
534
534
  "create",
535
535
  "create_if_missing",
536
536
  "delete",
537
- "delete",
538
537
  "nothing"
539
538
  ],
540
539
  "remote_file": [
@@ -469,7 +469,8 @@
469
469
  "nothing"
470
470
  ],
471
471
  "log": [
472
- "nothing"
472
+ "nothing",
473
+ "write"
473
474
  ],
474
475
  "macports_package": [
475
476
  "install",
@@ -530,11 +531,9 @@
530
531
  "run"
531
532
  ],
532
533
  "remote_directory": [
533
- "create",
534
534
  "create",
535
535
  "create_if_missing",
536
536
  "delete",
537
- "delete",
538
537
  "nothing"
539
538
  ],
540
539
  "remote_file": [
@@ -469,7 +469,8 @@
469
469
  "nothing"
470
470
  ],
471
471
  "log": [
472
- "nothing"
472
+ "nothing",
473
+ "write"
473
474
  ],
474
475
  "macports_package": [
475
476
  "install",
@@ -530,11 +531,9 @@
530
531
  "run"
531
532
  ],
532
533
  "remote_directory": [
533
- "create",
534
534
  "create",
535
535
  "create_if_missing",
536
536
  "delete",
537
- "delete",
538
537
  "nothing"
539
538
  ],
540
539
  "remote_file": [
@@ -469,7 +469,8 @@
469
469
  "nothing"
470
470
  ],
471
471
  "log": [
472
- "nothing"
472
+ "nothing",
473
+ "write"
473
474
  ],
474
475
  "macports_package": [
475
476
  "install",
@@ -530,11 +531,9 @@
530
531
  "run"
531
532
  ],
532
533
  "remote_directory": [
533
- "create",
534
534
  "create",
535
535
  "create_if_missing",
536
536
  "delete",
537
- "delete",
538
537
  "nothing"
539
538
  ],
540
539
  "remote_file": [
@@ -442,7 +442,8 @@
442
442
  "nothing"
443
443
  ],
444
444
  "log": [
445
- "nothing"
445
+ "nothing",
446
+ "write"
446
447
  ],
447
448
  "macports_package": [
448
449
  "install",
@@ -510,11 +511,9 @@
510
511
  "nothing"
511
512
  ],
512
513
  "remote_directory": [
513
- "create",
514
514
  "create",
515
515
  "create_if_missing",
516
516
  "delete",
517
- "delete",
518
517
  "nothing"
519
518
  ],
520
519
  "remote_file": [
@@ -442,7 +442,8 @@
442
442
  "nothing"
443
443
  ],
444
444
  "log": [
445
- "nothing"
445
+ "nothing",
446
+ "write"
446
447
  ],
447
448
  "macports_package": [
448
449
  "install",
@@ -510,11 +511,9 @@
510
511
  "nothing"
511
512
  ],
512
513
  "remote_directory": [
513
- "create",
514
514
  "create",
515
515
  "create_if_missing",
516
516
  "delete",
517
- "delete",
518
517
  "nothing"
519
518
  ],
520
519
  "remote_file": [
@@ -442,7 +442,8 @@
442
442
  "nothing"
443
443
  ],
444
444
  "log": [
445
- "nothing"
445
+ "nothing",
446
+ "write"
446
447
  ],
447
448
  "macports_package": [
448
449
  "install",
@@ -510,11 +511,9 @@
510
511
  "nothing"
511
512
  ],
512
513
  "remote_directory": [
513
- "create",
514
514
  "create",
515
515
  "create_if_missing",
516
516
  "delete",
517
- "delete",
518
517
  "nothing"
519
518
  ],
520
519
  "remote_file": [
@@ -442,7 +442,8 @@
442
442
  "nothing"
443
443
  ],
444
444
  "log": [
445
- "nothing"
445
+ "nothing",
446
+ "write"
446
447
  ],
447
448
  "macports_package": [
448
449
  "install",
@@ -510,11 +511,9 @@
510
511
  "nothing"
511
512
  ],
512
513
  "remote_directory": [
513
- "create",
514
514
  "create",
515
515
  "create_if_missing",
516
516
  "delete",
517
- "delete",
518
517
  "nothing"
519
518
  ],
520
519
  "remote_file": [