File tree Expand file tree Collapse file tree 2 files changed +7
-11
lines changed Expand file tree Collapse file tree 2 files changed +7
-11
lines changed Original file line number Diff line number Diff line change @@ -19,12 +19,6 @@ OptionParser.new do |opts|
1919 options [ :namespace ] = namespace
2020 end
2121
22- opts . on ( '-b bolt_project' , '--bolt-project bolt_project' , 'Check all modules within a bolt-project.yaml file.' ) do |bolt_project |
23- raise 'You must specify a valid bolt-project.yaml' unless File . exist? ( bolt_project ) || bolt_project . end_with? ( '.yaml' )
24-
25- options [ :bolt_project ] = bolt_project
26- end
27-
2822 opts . on ( '--endorsement endorsement' , 'Filter a namespace search by endorsement (supported/approved/partner).' ) do |endorsement |
2923 raise 'You may only filter by one endorsement at a time' if options [ :endorsement ]
3024
Original file line number Diff line number Diff line change 88
99# Main runner for DependencyChecker
1010module DependencyChecker
11- class Runner
11+ class Runner # rubocop:disable Metrics/ClassLength
1212 attr_reader :problems
1313
1414 def initialize ( verbose = false , forge_hostname = nil , forge_token = nil )
@@ -184,10 +184,12 @@ def return_modules(path)
184184 raise "*Error:* Ensure syntax of #{ path } file is valid YAML or JSON"
185185 end
186186
187- # transform from IAC supported module hash to simple list
188- modules = modules . filter_map { |_key , val | val [ 'puppet_module' ] } if modules . is_a? Hash
189-
190- modules
187+ # transform from CAT supported module hash to simple list
188+ if path . end_with? '/content-and-tooling-team/modules/list.json'
189+ modules . filter_map { |key , _val | key [ 'name' ] } if modules . is_a? Array
190+ elsif modules . is_a? Hash
191+ modules . filter_map { |_key , val | val [ 'puppet_module' ] }
192+ end
191193 end
192194
193195 # Post message to terminal
You can’t perform that action at this time.
0 commit comments