<commit_before>var $ = require('jquery');

var utils = require('./utils');
var uiHelper = require('./ui-helper');

function Renderer (editor, web3, updateFiles, udapp, executionContext, formalVerificationEvent, compilerEvent) {
  this.editor = editor;
  this.web3 = web3;
  this.updateFiles = updateFiles;
  this.udapp = udapp;
  this.executionContext = executionContext;
  var self = this;
  formalVerificationEvent.register('compilationFinished', this, function (success, message, container, noAnnotations) {
    if (!success) {
      self.error(message, container, noAnnotations);
    }
  });
  compilerEvent.register('compilationFinished', this, function (success, data, source) {
    $('#output').empty();
    if (success) {
      self.contracts(data, source);
    } else {
      if (data['error']) {
        self.error(data['error']);
      }
      if (data['errors']) {
        data['errors'].forEach(function (err) {
          self.error(err);
        });
      }<commit_msg>Display warnings even if there were no errors<commit_after>var $ = require('jquery');

var utils = require('./utils');
var uiHelper = require('./ui-helper');

function Renderer (editor, web3, updateFiles, udapp, executionContext, formalVerificationEvent, compilerEvent) {
  this.editor = editor;
  this.web3 = web3;
  this.updateFiles = updateFiles;
  this.udapp = udapp;
  this.executionContext = executionContext;
  var self = this;
  formalVerificationEvent.register('compilationFinished', this, function (success, message, container, noAnnotations) {
    if (!success) {
      self.error(message, container, noAnnotations);
    }
  });
  compilerEvent.register('compilationFinished', this, function (success, data, source) {
    $('#output').empty();
    if (success) {
      self.contracts(data, source);
    }

    // NOTE: still need to display as there might be warnings
    if (data['error']) {
      self.error(data['error']);
    }
    if (data['errors']) {
      data['errors'].forEach(function (err) {
        self.error(err);
      });
{'fraction_non_alphanumeric': 0.1481299212598425, 'fraction_numerical': 0.002952755905511811, 'mean_word_length': 3.7169373549883993, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6136905', 'n_tokens_mistral': 592, 'n_tokens_neox': 591, 'n_words': 140}