Sha256: 797a0b9e6087ce7c640e2a8cf9c83b15b6c1f5ae54721b3f39f25df27e5aed89
Contents?: true
Size: 830 Bytes
Versions: 7
Compression:
Stored size: 830 Bytes
Contents
module Nanoc::Checking::Checks # @api private class Stale < ::Nanoc::Checking::Check identifier :stale def run require 'set' output_filenames.each do |f| next if pruner.filename_excluded?(f) next if item_rep_paths.include?(f) add_issue( 'file without matching item', subject: f, ) end end protected def item_rep_paths @item_rep_paths ||= Set.new( @items .flat_map(&:reps) .map(&:unwrap) .flat_map(&:raw_paths) .flat_map(&:values), ) end def pruner exclude_config = @config.fetch(:prune, {}).fetch(:exclude, []) # FIXME: reps=nil is icky @pruner ||= Nanoc::Pruner.new(@config, nil, exclude: exclude_config) end end end
Version data entries
7 entries across 7 versions & 1 rubygems