def run_on_modifications(paths)
      specs = options[:keep_failed] ? paths + last_failed_paths : paths
      specs = Inspector.clean(specs, options) if options[:clean]

      return false if specs.empty?

      results = runner.run(specs)

      if results.empty?
        self.last_failed_paths = last_failed_paths - paths
        run_all if last_run_failed && options[:all_after_pass]
      else
        self.last_failed_paths = last_failed_paths + results.keys
      end

      self.last_run_failed = !results.empty?

      throw :task_has_failed if last_run_failed
    end
def run_on_modifications(paths)
      specs = options[:keep_failed] ? paths + last_failed_paths : paths
      specs = Inspector.clean(specs, options) if options[:clean]

      return false if specs.empty?

      results = runner.run(specs)

      if results.empty?
        self.last_failed_paths = last_failed_paths - paths
        run_all if last_run_failed && options[:all_after_pass]
      else
        self.last_failed_paths = last_failed_paths + results.keys
      end

      self.last_run_failed = !results.empty?

      throw :task_has_failed if last_run_failed
    end
Gets called when watched paths and files have changes.

 @param [Array<String>] paths the changed paths and files
 @raise [:task_has_failed] when run_on_modifications has failed