@!group Reporting
 A list of all violations passed to Danger, we don't
 anticipate users of Danger needing to use this.

 @visibility hidden
 @return     [Hash]
194177
def violation_report
      {
        errors: @errors.clone.freeze,
        warnings: @warnings.clone.freeze,
        messages: @messages.clone.freeze
      }
    end
62860
def check_protected(specs)
      protected = []
      specs.each do |spec|
        msg = Wagons.find(spec.name).protect?
        protected << msg if msg.is_a?(String)
      end
      protected.join("\n").presence
    end
173153
def get_warning_options
      all_options = Warning.all_warnings.inject({}) do |result, warning|
        options = warning.options
        options = [options] if options.any? && !options[0].is_a?(Array)
        options.each do |option|
          result[option.first] = option
        end
        result
      end
      all_options.values
    end
636241
def destroy_all
      if defined?(ActiveRecord)
        if params[:app]
          RailsExceptionHandler::ActiveRecord::ErrorMessage.destroy_all(app_name: params[:app])
        else
          RailsExceptionHandler::ActiveRecord::ErrorMessage.destroy_all
        end
      end
      if defined?(Mongoid)
        if params[:app]
          RailsExceptionHandler::Mongoid::ErrorMessage.where(app_name: params[:app]).destroy
        else
          RailsExceptionHandler::Mongoid::ErrorMessage.all.destroy
        end
      end

      respond_to do |format|
        format.html { redirect_to error_messages_url }
        format.json { head :no_content }
      end
    end
293171
def enabled_vuln_checks
      checks = REXML::XPath.first(@xml, '//VulnerabilityChecks/Enabled')
      checks ? checks.elements.to_a('Check').map { |c| c.attributes['id'] } : []
    end
541254
def error
      @values.each_pair{|observable, value|
        return Error.new(observable, value) if Exception === value
      }
      return nil
    end
773050
def checkPieceHash(pieceIndex)
      id = returnAndIncrRequestId
      return id if @state == :after_stop
      @requests.push [id, :hash_piece, pieceIndex]
      @requestsSemaphore.signal
      id
    end
535452
def safety_cone_filter
      if cone = fetch_cone
        if cone.type == 'notice'
          flash.now["safetycone_#{notice_type(cone.type)}"] = cone.message
        else
          flash["safetycone_#{notice_type(cone.type)}"] = cone.message
        end

        redirect_to safety_redirect if cone.type == 'block'
      end
    end
966171
def errors
      found_errors = @record.all('[data-error-for]')
      error_list = ActiveModel::Errors.new(self)
      found_errors.each do | error |
        attribute = error['data-error-for']
        message = error.text
        error_list.add(attribute, message)
      end
      error_list
    end
422848
Enumeration reportAllNeighbours()
  {
    if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
      SibTr.entry(tc, "reportAllNeighbours");

    // Call out to the Neighbours class to get the list of Neighbours.
    final Enumeration neighbours = _neighbours.getAllNeighbours();

    if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
      SibTr.exit(tc, "reportAllNeighbours");

    return neighbours;
  }
502232
def delete
      security_transgression_unless @comment.can_be_deleted_by?(@user)

      @comment.errors.add(:base, t('commontator.comment.errors.already_deleted')) \
        unless @comment.delete_by(@user)

      respond_to do |format|
        format.html { redirect_to @thread }
        format.js { render :delete }
      end
    end
649161
def members(refresh = false)
      @members = nil if refresh
      @members ||= safe_members.sort{|a,b| a.to_s <=> b.to_s}
    end
343367
def action_checklist(self):
        
        actions = []
        exposure = definition(self.exposure.keywords.get('exposure'))
        actions.extend(exposure.get('actions'))

        hazard = definition(self.hazard.keywords.get('hazard'))
        actions.extend(hazard.get('actions'))

        actions.extend(specific_actions(hazard, exposure))
        return actions
714918
def audit
      res = ::Bundler::Audit::Scanner.new.scan.to_a.map do |vuln|
        case vuln
        when ::Bundler::Audit::Scanner::InsecureSource
          insecure_source_message vuln
        when ::Bundler::Audit::Scanner::UnpatchedGem
          insecure_gem_message vuln
        else
          insecure_message vuln
        end
      end
      if res.any?
        message = "Vulnerabilities found:\n" + res.join("\n")
        color = :red
        notify message
      else
        message = "No vulnerabilities found."
        color = :green
      end
      UI.info(UI.send(:color, message, color))
    end
672380
def hashtags_erb
      retdict = {
        enabled: @config[:hashtags][:enabled],
        top: [],
        nottop: []
      }

      if @config[:hashtags][:enabled]
        top = @parsed[:hashtags].slice(0, @config[:hashtags][:top]) # top X hashtags
        top.each do |hashtag|
          retdict[:top] << hashtag[1]
        end

        nottop = @parsed[:hashtags].slice(@config[:hashtags][:top], @config[:hashtags][:notop]) # not in the top X
        unless nottop.nil?
          nottop.each do |hashtag|
            hashtag[1].delete(:example)
            retdict[:nottop] << hashtag[1]
          end
        end
      end

      retdict
    end
826477
def passed?
      passed = nil
      @report.each { |r|
        if passed == nil
          passed = (r[:status] == PS_OK)
        else
          passed &= (r[:status] == PS_OK)
        end
      }

      passed
    end
912919
def status_report
      {
        errors: @errors.map(&:message).clone.freeze,
        warnings: @warnings.map(&:message).clone.freeze,
        messages: @messages.map(&:message).clone.freeze,
        markdowns: @markdowns.clone.freeze
      }
    end