src/supermarket/engines/fieri/app/models/cookbook_artifact.rb
def criticize
    prep

    tags = ENV["FIERI_FOODCRITIC_TAGS"] || ""
    fail_tags = ENV["FIERI_FOODCRITIC_FAIL_TAGS"]

    args = [work_dir, "--no-progress", "-f #{fail_tags}"]
    tags.split.each do |tag|
      args.push("-t #{tag}")
    end
    cmd = FoodCritic::CommandLine.new(args)
    result, _status = FoodCritic::Linter.run(cmd)
    feedback = result.to_s.gsub("#{work_dir}/", "")
    [feedback, result.failed?]
  end
#
# Runs FoodCritic against an artifact.
#
# @return [Boolean] whether or not FoodCritic passed
# @return [String] the would be command line out from FoodCritic
#
Runs FoodCritic against an artifact.
Runs FoodCritic against an artifact .
def criticize
    prep
    tags = ENV["FIERI_FOODCRITIC_TAGS"] || ""
    fail_tags = ENV["FIERI_FOODCRITIC_FAIL_TAGS"]
    args = [work_dir, "--no-progress", "-f #{fail_tags}"]
    tags.split.each do |tag|
      args.push("-t #{tag}")
    end
    cmd = FoodCritic::CommandLine.new(args)
    result, _status = FoodCritic::Linter.run(cmd)
    feedback = result.to_s.gsub("#{work_dir}/", "")
    [feedback, result.failed?]
  end
def criticize prep tags = ENV [ "FIERI_FOODCRITIC_TAGS" ] || "" fail_tags = ENV [ "FIERI_FOODCRITIC_FAIL_TAGS" ] args = [ work_dir , "--no-progress" , "-f #{fail_tags}" ] tags . split . each do | tag | args . push ( "-t #{tag}" ) end cmd = FoodCritic :: CommandLine . new ( args ) result , _status = FoodCritic :: Linter . run ( cmd ) feedback = result . to_s . gsub ( "#{work_dir}/" , "" ) [ feedback , result . failed? ] end
Runs FoodCritic against an artifact.
Runs FoodCritic against an artifact .
whether or not FoodCritic passed
whether or not FoodCritic passed
Boolean
the would be command line out from FoodCritic
the would be command line out from FoodCritic
String