Sha256: f1b72f7d847a73b1586d538b345711351b95d8b2ab6e10c1f161070300f1f559
Contents?: true
Size: 628 Bytes
Versions: 15
Compression:
Stored size: 628 Bytes
Contents
module Nanoc::Extra::Checking::Checks # @api private class Stale < ::Nanoc::Extra::Checking::Check def run require 'set' item_rep_paths = Set.new(@items.map(&:reps).flatten.map(&:raw_path)) 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 pruner exclude_config = @config.fetch(:prune, {}).fetch(:exclude, []) @pruner ||= Nanoc::Extra::Pruner.new(@site, exclude: exclude_config) end end end
Version data entries
15 entries across 15 versions & 1 rubygems