File tree Expand file tree Collapse file tree 16 files changed +102
-38
lines changed
unit/puppet-lint/plugins/top_scope_facts Expand file tree Collapse file tree 16 files changed +102
-38
lines changed Original file line number Diff line number Diff line change 11name : " ci"
22
33on :
4+ push :
5+ branches :
6+ - " main"
47 pull_request :
58 branches :
69 - " main"
710 workflow_dispatch :
811
12+ env :
13+ CODECOV_TOKEN : ${{ secrets.CODECOV_TOKEN }}
14+
915jobs :
1016
1117 spec :
1925 uses : " puppetlabs/cat-github-actions/.github/workflows/gem_ci.yml@main"
2026 secrets : " inherit"
2127 with :
28+ rake_task : " spec:coverage"
2229 ruby_version : ${{ matrix.ruby_version }}
2330
2431 acceptance :
Original file line number Diff line number Diff line change 11name : " mend"
22
33on :
4- pull_request :
5- branches :
6- - " main"
4+ pull_request_target :
5+ types :
6+ - opened
7+ - synchronize
78 schedule :
89 - cron : " 0 0 * * *"
910 workflow_dispatch :
Original file line number Diff line number Diff line change 11# This configuration was generated by
22# `rubocop --auto-gen-config`
3- # on 2023-09-12 15:54:37 UTC using RuboCop version 1.48.1 .
3+ # on 2024-01-22 14:59:34 UTC using RuboCop version 1.50.2 .
44# The point is for the user to remove these configuration records
55# one by one as the offenses are removed from the code base.
66# Note that changes in the inspected code, or installation of new
@@ -50,7 +50,7 @@ Metrics/BlockLength:
5050Metrics/BlockNesting :
5151 Max : 5
5252
53- # Offense count: 7
53+ # Offense count: 8
5454# Configuration parameters: CountComments, CountAsOne.
5555Metrics/ClassLength :
5656 Max : 387
@@ -92,7 +92,7 @@ Performance/CollectionLiteralInLoop:
9292 - ' lib/puppet-lint/plugins/check_resources/ensure_first_param.rb'
9393 - ' lib/puppet-lint/plugins/check_whitespace/trailing_whitespace.rb'
9494
95- # Offense count: 408
95+ # Offense count: 409
9696# Configuration parameters: Prefixes, AllowedPatterns.
9797# Prefixes: when, with, without
9898RSpec/ContextWording :
@@ -108,7 +108,7 @@ RSpec/DescribeClass:
108108RSpec/ExampleLength :
109109 Max : 148
110110
111- # Offense count: 138
111+ # Offense count: 119
112112RSpec/MultipleExpectations :
113113 Max : 137
114114
Original file line number Diff line number Diff line change @@ -5,12 +5,29 @@ All notable changes to this project will be documented in this file.
55
66The format is based on [ Keep a Changelog] ( http://keepachangelog.com/en/1.0.0/ ) and this project adheres to [ Semantic Versioning] ( http://semver.org ) .
77
8- ## [ v5.0.0 ] ( https://github.com/puppetlabs/puppet-lint/tree/v5.0.0 ) - 2023-10-18
8+ ## [ v4.2.4 ] ( https://github.com/puppetlabs/puppet-lint/tree/v4.2.4 ) - 2024-02-09
99
10- [ Full Changelog] ( https://github.com/puppetlabs/puppet-lint/compare/v4.2.1 ...v5.0.0 )
10+ [ Full Changelog] ( https://github.com/puppetlabs/puppet-lint/compare/v4.2.3 ...v4.2.4 )
1111
12- ### Changed
13- - (CAT-1248) Update Published Name and Owner [ #158 ] ( https://github.com/puppetlabs/puppet-lint/pull/158 ) ([ david22swan] ( https://github.com/david22swan ) )
12+ ### Fixed
13+
14+ - (GH-189 ) - invalid fact correction for top scope structured fact [ #190 ] ( https://github.com/puppetlabs/puppet-lint/pull/190 ) ([ jordanbreen28] ( https://github.com/jordanbreen28 ) )
15+
16+ ## [ v4.2.3] ( https://github.com/puppetlabs/puppet-lint/tree/v4.2.3 ) - 2023-11-22
17+
18+ [ Full Changelog] ( https://github.com/puppetlabs/puppet-lint/compare/v4.2.2...v4.2.3 )
19+
20+ ### Fixed
21+
22+ - (maint) - Update redundant description [ #179 ] ( https://github.com/puppetlabs/puppet-lint/pull/179 ) ([ jordanbreen28] ( https://github.com/jordanbreen28 ) )
23+
24+ ## [ v4.2.2] ( https://github.com/puppetlabs/puppet-lint/tree/v4.2.2 ) - 2023-11-21
25+
26+ [ Full Changelog] ( https://github.com/puppetlabs/puppet-lint/compare/v4.2.1...v4.2.2 )
27+
28+ ### Fixed
29+
30+ - Use better yardoc tags [ #172 ] ( https://github.com/puppetlabs/puppet-lint/pull/172 ) ([ ekohl] ( https://github.com/ekohl ) )
1431
1532## [ v4.2.1] ( https://github.com/puppetlabs/puppet-lint/tree/v4.2.1 ) - 2023-10-09
1633
Original file line number Diff line number Diff line change @@ -10,8 +10,8 @@ group :test do
1010 gem 'json'
1111
1212 gem 'rspec-json_expectations' , '~> 1.4'
13-
14- gem 'simplecov' , :require => false if ENV [ 'COVERAGE' ] == 'yes'
13+ gem 'simplecov' , :require => false
14+ gem 'simplecov-console ' , :require => false
1515end
1616
1717group :acceptance do
@@ -29,7 +29,7 @@ group :development do
2929end
3030
3131group :rubocop do
32- gem 'rubocop' , '~> 1.48.1 ' , require : false
32+ gem 'rubocop' , '~> 1.50.0 ' , require : false
3333 gem 'rubocop-rspec' , '~> 2.19' , require : false
3434 gem 'rubocop-performance' , '~> 1.16' , require : false
3535end
Original file line number Diff line number Diff line change @@ -27,6 +27,14 @@ rescue LoadError
2727 # Gem not present
2828end
2929
30+ namespace :spec do
31+ desc 'Run RSpec code examples with coverage collection'
32+ task :coverage do
33+ ENV [ 'COVERAGE' ] = 'yes'
34+ Rake ::Task [ 'spec' ] . execute
35+ end
36+ end
37+
3038RSpec ::Core ::RakeTask . new ( :spec ) do |t |
3139 t . exclude_pattern = 'spec/acceptance/**/*_spec.rb'
3240end
Original file line number Diff line number Diff line change @@ -252,7 +252,7 @@ def print_problems
252252 # end
253253 def self . new_check ( name , &block )
254254 class_name = name . to_s . split ( '_' ) . map ( &:capitalize ) . join
255- klass = PuppetLint . const_set ( "Check#{ class_name } " , Class . new ( PuppetLint ::CheckPlugin ) )
255+ klass = PuppetLint . const_set ( : "Check#{ class_name } ", Class . new ( PuppetLint ::CheckPlugin ) )
256256 klass . const_set ( :NAME , name )
257257 klass . class_exec ( &block )
258258 PuppetLint . configuration . add_check ( name , klass )
Original file line number Diff line number Diff line change @@ -121,7 +121,7 @@ def run(fileinfo, data)
121121 # Returns an Array of String check names.
122122 def enabled_checks
123123 @enabled_checks ||= PuppetLint . configuration . checks . select do |check |
124- PuppetLint . configuration . send ( "#{ check } _enabled?" )
124+ PuppetLint . configuration . send ( : "#{ check } _enabled?")
125125 end
126126 end
127127
Original file line number Diff line number Diff line change @@ -17,21 +17,21 @@ def self.add_check(check)
1717 # Public: Determine if the named check is enabled.
1818 #
1919 # Returns true if the check is enabled, otherwise return false.
20- define_method ( "#{ check } _enabled?" ) do
20+ define_method ( : "#{ check } _enabled?") do
2121 settings [ "#{ check } _disabled" ] != true
2222 end
2323
2424 # Public: Disable the named check.
2525 #
2626 # Returns nothing.
27- define_method ( "disable_#{ check } " ) do
27+ define_method ( : "disable_#{ check } ") do
2828 settings [ "#{ check } _disabled" ] = true
2929 end
3030
3131 # Public: Enable the named check.
3232 #
3333 # Returns nothing.
34- define_method ( "enable_#{ check } " ) do
34+ define_method ( : "enable_#{ check } ") do
3535 settings [ "#{ check } _disabled" ] = false
3636 end
3737 end
@@ -92,7 +92,7 @@ def self.add_option(option)
9292 # value - The value to set the option to.
9393 #
9494 # Returns nothing.
95- define_method ( "#{ option } =" ) do |value |
95+ define_method ( : "#{ option } =") do |value |
9696 settings [ option ] = value
9797 end
9898
Original file line number Diff line number Diff line change @@ -117,9 +117,9 @@ def self.build(args = [])
117117 enable_checks = checks . split ( ',' ) . map ( &:to_sym )
118118 PuppetLint . configuration . checks . each do |check |
119119 if enable_checks . include? ( check )
120- PuppetLint . configuration . send ( "enable_#{ check } " )
120+ PuppetLint . configuration . send ( : "enable_#{ check } ")
121121 else
122- PuppetLint . configuration . send ( "disable_#{ check } " )
122+ PuppetLint . configuration . send ( : "disable_#{ check } ")
123123 end
124124 end
125125 end
@@ -130,13 +130,13 @@ def self.build(args = [])
130130
131131 PuppetLint . configuration . checks . each do |check |
132132 opts . on ( "--no-#{ check } -check" , "Skip the #{ check } check." ) do
133- PuppetLint . configuration . send ( "disable_#{ check } " )
133+ PuppetLint . configuration . send ( : "disable_#{ check } ")
134134 end
135135
136- next if PuppetLint . configuration . send ( "#{ check } _enabled?" )
136+ next if PuppetLint . configuration . send ( : "#{ check } _enabled?")
137137
138138 opts . on ( "--#{ check } -check" , "Enable the #{ check } check." ) do
139- PuppetLint . configuration . send ( "enable_#{ check } " )
139+ PuppetLint . configuration . send ( : "enable_#{ check } ")
140140 end
141141 end
142142 end
You can’t perform that action at this time.
0 commit comments